在线扩容:不能够停机,在线扩容磁盘,添加磁盘无法识别的问题。
1.虚拟磁盘扩容无法显示真正的数据容量
(扫描指定的磁盘块大小,即可解决原有磁盘扩容磁盘容量无法识别的问题)
Rescan Specific SCSI Device
This command consistently rescanned the specific SCSI device.
Replace $DEVICE with sda, sdb, sdc, etc.
echo 1 > /sys/block/$DEVICE/device/rescan
2.重新扫描整个主机的SCSI总线。
(扫描整个主机的SCSI总线,即可解决添加的磁盘无法识别的问题)
Rescan Entire Host SCSI Bus
This command never consistently rescanned the host SCSI bus.
Replace $HOST with the SCSI host you want to scan which could be host0, host1, host2, etc. Typically $HOST is host0.
echo "- - -" > /sys/class/scsi_host/$HOST/scan
The triple dashes, - - -, are wildcards that rescan every channel, every target, and every LUN on the specificed SCSI host.
3.以上均是自动完成的,不建议使用下面的方法(手动添加磁盘)
Rescan Specific SCSI Device (Deprecated)
This command never consistently rescanned the specific SCSI bus and has been deprecated by Red Hat.
The Host:Bus:Target:LUN (0:0:2:0 in this example) may be different for you. Run ls -al /dev/disk/by-path to find it.
echo "scsi remove-single-device 0:0:2:0" > /proc/scsi/scsi
echo "scsi add-single-device 0:0:2:0" > /proc/scsi/scsi