寻找磁盘的SN

以下俩种方式可以参考下

root@xxxx:~#  ll /dev/disk/by-id/|grep sdq
lrwxrwxrwx 1 root root  9 Feb 17 14:52 ata-ST8000NC0002-1XX112_ZA163Y00 -> ../../sdq
lrwxrwxrwx 1 root root 10 Feb 17 14:52 ata-ST8000NC0002-1XX112_ZA163Y00-part1 -> ../../sdq1
lrwxrwxrwx 1 root root  9 Feb 17 14:52 wwn-0x5000c500939b53a3 -> ../../sdq
lrwxrwxrwx 1 root root 10 Feb 17 14:52 wwn-0x5000c500939b53a3-part1 -> ../../sdq1

ZA163Y00 这个就是该块盘的SN了
root@xxxx:~# smartctl -a /dev/sda1
...
Serial Number:    PHDV702401Q0150MGN

你可能感兴趣的:(寻找磁盘的SN)