LINUX查询工作站多硬盘的硬盘序列号方法:
1、确认安装yaourt hdparm
2、运行下面命令查看共有多少硬盘
[root@myhost detect]# fdisk -l
Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sda1 * 63 385559 192748+ 83 Linux
/dev/sda2 385560 4385744 2000092+ 82 Linux swap / Solaris
/dev/sda3 4385745 14378174 4996215 83 Linux
/dev/sda4 14378175 625137344 305379585 5 Extended
/dev/sda5 14378238 34379099 10000431 83 Linux
/dev/sda6 34379163 44371529 4996183+ 83 Linux
/dev/sda7 44371593 75617954 15623181 83 Linux
/dev/sda8 75618018 106864379 15623181 83 Linux
/dev/sda9 106864443 126865304 10000431 83 Linux
/dev/sda10 126865368 625137344 249135988+ 83 Linux
由上可见,只有一个硬盘sda,其中,sda1到sda10是说该硬盘共有十个分区。
多个硬盘的话会看到sdb、sdc等;
3、查看sda硬盘的序列号,
[root@myhost detect]# hdparm -i /dev/sda
/dev/sda:
Model=ST3320418AS, FwRev=CC66, SerialNo=6VMDEMJM
Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs RotSpdTol>.5% }
RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=4
BuffType=unknown, BuffSize=16384kB, MaxMultSect=16, MultSect=16
CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=625142448
IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
PIO modes: pio0 pio1 pio2 pio3 pio4
DMA modes: mdma0 mdma1 mdma2
UDMA modes: udma0 udma1 udma2 udma3 udma4 *udma5
AdvancedPM=no WriteCache=enabled
Drive conforms to: unknown: ATA/ATAPI-4,5,6,7
由上可见,sda硬盘的序列号为6VMDEMJM。
同理查看其它硬盘序列号。
取消
评论