⑴在Linux系统中,如果要扩展磁盘容量,可以新建虚拟磁盘空间。新建虚拟磁盘重启后就能生效了,当然如果你有什么重要的在执行的任务,而不想重启,也是有办法的。本文就来介绍一下Linux如何在VMware下扩展磁盘。
⑵:VMware虚拟磁盘扩容
⑶如下所示,VMware虚拟磁盘扩容后,使用fdisk -l看不到任何变化
⑷[rootlocalhost ~]# fdisk -l
⑸Disk /dev/sda: . GB, bytes
⑹ heads, sectors/track, cylinders
⑺Units = cylinders of * = bytes
⑻Device Boot Start End Blocks Id System
⑼/dev/sda * Linux
⑽/dev/sda e Linux LVM
⑾/dev/sda Linux
⑿/dev/sda + Linux
⒀Disk /dev/dm-: . GB, bytes
⒁ heads, sectors/track, cylinders
⒂Units = cylinders of * = bytes
⒃Disk /dev/dm- doesn‘t contain a valid partition table
⒄Disk /dev/dm-: MB, bytes
⒅ heads, sectors/track, cylinders
⒆Units = cylinders of * = bytes
⒇Disk /dev/dm- doesn’t contain a valid partition table
⒈方法:echo 》 /sys/class/scsi_device/device/rescan
⒉[rootlocalhost ~]# cd /sys/class/scsi_disk/
⒊[rootlocalhost scsi_disk]# ls
⒋[rootlocalhost scsi_disk]# cd :::/
⒌[rootlocalhost :::]# echo ‘’ 》 device/rescan
⒍[rootlocalhost :::]# fdisk -l
⒎Disk /dev/sda: . GB, bytes
⒏ heads, sectors/track, cylinders
⒐Units = cylinders of * = bytes
⒑Device Boot Start End Blocks Id System
⒒/dev/sda * Linux
⒓/dev/sda e Linux LVM
⒔/dev/sda Linux
⒕/dev/sda + Linux
⒖Disk /dev/dm-: . GB, bytes
⒗ heads, sectors/track, cylinders
⒘Units = cylinders of * = bytes
⒙Disk /dev/dm- doesn‘t contain a valid partition table
⒚Disk /dev/dm-: MB, bytes
⒛ heads, sectors/track, cylinders
①Units = cylinders of * = bytes
②Disk /dev/dm- doesn’t contain a valid partition table
③方法:重新扫描特定的 SCSI Device
④echo 》 /sys/block/$DEVICE/device/rescan 用sda, sdb, sdc等替换$DEVICE
⑤[rootlocalhost ~]# echo 》 /sys/block/sda/device/rescan
⑥:VMware新增虚拟磁盘
⑦首先找到您的主机总线编号
⑧[rootlocalhost ~]# grep mpt /sys/class/scsi_host/host?/proc_name
⑨/sys/class/scsi_host/host/proc_name:mptspi
⑩使用下面命令扫描SCSI总线
Ⅰ[rootlocalhost ~]# echo “- - -” 》 /sys/class/scsi_host/host/scan
Ⅱ以上就是Linux如何在VMware下扩展磁盘的介绍了,使用上面的两个步骤扩展磁盘,不需要重启系统,虚拟磁盘就能立即被系统识别。