SAS drives report type: unknown in disks list despite correct smartctl rotation rate

eangulus

New Member
Dec 17, 2024
5
2
3
On a 3-node PVE cluster, SAS hard drives report type: unknown in
/nodes/{node}/disks/list, even though smartctl -i clearly reports
Rotation Rate: 10000 rpm. SAS SSDs reporting Solid State Device are
classified correctly as ssd. The disk type is therefore unreliable
for SAS HDDs.

Expected: type should be hdd.
Actual: type is unknown.

smartctl -i /dev/sdj:

Vendor: SEAGATE
Product: ST1200MM0088
Revision: TT31
Compliance: SPC-4
User Capacity: 1,200,243,695,616 bytes [1.20 TB]
Rotation Rate: 10000 rpm
Form Factor: 2.5 inches
Transport protocol: SAS (SPL-4)

pvesh get /nodes/PVE-KRC-01/disks/list:

/dev/sdj ST1200MM0088 5000c5008f347a3b OK unknown

Reproduces on 7x ST1200MM0088 and 2x X422_HCOBE600A10 per node,
across all 3 nodes. The 7x PX05SVQ192B SAS SSDs are correctly
reported as ssd.

Version:
proxmox-ve: 9.2.0 (running kernel: 7.0.14-24-pve)
pve-manager: 9.2.21 (running version: 9.2.21/4f6e0ac86f9e8c7f)
smartmontools: 7.5-pve2
libpve-storage-perl: 9.1.13
 
Sorry for late reply, was away.


Code:
root@PVE-KRC-01:~# cat /sys/block/sdj/queue/rotational
1
root@PVE-KRC-01:~# udevadm info /dev/sdj | grep -i rotation
root@PVE-KRC-01:~#
 
rotational is 1, no ID_ATA_ROTATION_RATE_RPM — expected for SAS.

The hdd assignment in get_disks() is gated on that ATA attribute rather than the rotational flag. /usr/share/perl5/PVE/Diskmanage.pm lines 587-594 (9.2.21):

Code:
} elsif ($sysdata->{rotational} == 1) {
    if ($data->{rpm} != -1) {
        $type = 'hdd';
    } elsif ($data->{usb}) {
        $type = 'usb';
        $data->{rpm} = 0;
    }
}

rpm stays -1 for SAS, so the branch never fires and type falls through to unknown.

Proposed:

Code:
} elsif ($sysdata->{rotational} == 1) {
    if ($data->{usb}) {
        $type = 'usb';
        $data->{rpm} = 0;
    } else {
        $type = 'hdd';
    }
}

rpm remains -1 unless pulled from smartctl, but type no longer depends on an ATA-only attribute.

Same root cause as the 2020 "SAS drives are shown as unknown type" thread.
 
  • Like
Reactions: Onslow
Not only the GUI column.

`/nodes/{node}/disks/list` returns `type: unknown` for these, so every consumer of that endpoint gets wrong data — here ProxMenux Monitor renders the wrong badge, but the same applies to any dashboard or script reading the API.

Node 1, pvesh against sysfs:

Code:
devpath   model               pve_type   sysfs_rotational
/dev/sda  PX05SVQ192B         ssd        0
/dev/sdb  X422_HCOBE600A10    unknown    1
/dev/sdc  X422_HCOBE600A10    unknown    1
/dev/sdd  PX05SVQ192B         ssd        0
/dev/sde  PX05SVQ192B         ssd        0
/dev/sdf  PX05SVQ192B         ssd        0
/dev/sdg  PX05SVQ192B         ssd        0
/dev/sdh  PX05SVQ192B         ssd        0
/dev/sdi  PX05SVQ192B         ssd        0
/dev/sdj  ST1200MM0088        unknown    1
/dev/sdk  ST1200MM0088        unknown    1
/dev/sdl  ST1200MM0088        unknown    1
/dev/sdm  ST1200MM0088        unknown    1
/dev/sdn  ST1200MM0088        unknown    1
/dev/sdo  ST1200MM0088        unknown    1
/dev/sdp  ST1200MM0088        unknown    1

Nodes 2 and 3: same result, 7 ssd / 9 unknown each. 27 SAS drives across the cluster, every rotational=1 drive reported as unknown, every rotational=0 drive reported as ssd, no exceptions.

An SAS SSD would also come back as `unknown`, indistinguishable from an HDD for anything consuming the field.

The diff above is a one-branch change and doesn't touch the existing SATA/NVMe paths.