smartctl --all /dev/sda
如果是RAID,要用RAID管理软件,比如HP服务器的 hpacucli
第一种:cat /sys/block/sda/queue/rotational
注意:
命令中的sba是你的磁盘名称,可以通过df命令查看磁盘,然后修改成你要的
结果:
返回0:SSD盘
返回1:SATA盘
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 438574514378174 4996215 83 Linux
/dev/sda414378175 625137344 3053795855 Extended
/dev/sda5143782383437909910000431 83 Linux
/dev/sda63437916344371529 4996183+ 83 Linux
/dev/sda7443715937561795415623181 83 Linux
/dev/sda875618018 10686437915623181 83 Linux
/dev/sda9 106864443 12686530410000431 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。
同理查看其它硬盘序列号。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)