如果在系统开启之前的硬盘信息,可以通过 fdisk -l查看。

如果系统启动之后,再添加的硬盘信息可能通过 fdisk -l查询不到。

此时重新扫面:
[root@localhost /]# echo “- – – “> /sys/class/scsi_host/host0/scan
[root@localhost /]# echo “- – – “> /sys/class/scsi_host/host1/scan
[root@localhost /]# echo “- – – “> /sys/class/scsi_host/host2/scan

再查看:

[root@localhost /]# fdisk -lDisk /dev/sda: 21.5 GB, 21474836480 bytes, 41943040 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk label type: dosDisk identifier: 0x000c9cf0 Device BootStart EndBlocks IdSystem/dev/sda1 *2048 2099199 1048576 83Linux/dev/sda2 20992004194303919921920 8eLinux LVMDisk /dev/sdb: 21.5 GB, 21474836480 bytes, 41943040 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk /dev/mapper/centos-root: 18.2 GB, 18249416704 bytes, 35643392 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk /dev/mapper/centos-swap: 2147 MB, 2147483648 bytes, 4194304 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytes[root@localhost /]#