要寫程式取得, 請查詢另一篇 Linux SCSI Pass Through Interface
CDB Inquiry Command
建議使用 udevadm 比較詳細
# udevadm info -q all -n /dev/sda | grep ID_SERIAL
udevadm 的原始程式, 請看另一篇 How To Compiler udev (udevadm)
# udevadm info -q all -n /dev/sdb | grep ID_SERIAL
E: ID_SERIAL=35000c50041ea5267
E: ID_SERIAL_SHORT=5000c50041ea5267
# udevadm info -q all -n /dev/sdc | grep ID_SERIAL
E: ID_SERIAL=35000c500418fac3b
E: ID_SERIAL_SHORT=5000c500418fac3b
# udevadm info -q all -n /dev/sdd | grep ID_SERIAL
E: ID_SERIAL=35000c5000d2161f3
E: ID_SERIAL_SHORT=5000c5000d2161f3
# udevadm info -q all -n /dev/sde | grep ID_SERIAL
E: ID_SERIAL=ST3500413AS_Z2A1T57D
E: ID_SERIAL_SHORT=Z2A1T57D
# udevadm info -q all -n /dev/sdf | grep ID_SERIAL
E: ID_SERIAL=ST1000VX000-1CU162_S1DEQYS3
E: ID_SERIAL_SHORT=S1DEQYS3
# udevadm info -q all -n /dev/sdg | grep ID_SERIAL
E: ID_SERIAL=ST1000DM003-1CH162_S1D7TBZC
E: ID_SERIAL_SHORT=S1D7TBZC
# udevadm info -q all -n /dev/sdh | grep ID_SERIAL
E: ID_SERIAL=ST1000DM003-9YN162_W1D0VD8S
E: ID_SERIAL_SHORT=W1D0VD8S
# apt-get install smartmontools
# smartctl -i /dev/sda
# apt-get install lshw
# lshw -class disk
沒有留言:
張貼留言