vmware vsphere esxi vms在线磁盘扩容
echo 1 > /sys/block/扩展的磁盘/device/rescan
扩展的磁盘,如 sda sdb sdc 等
虚拟机识别磁盘并分区
================================
echo 1 > /sys/block/sdc/device/rescan
dd if=/dev/sdc of=gpt-partition-sdc20200630 bs=512 count=34 ###分区之前备份sdc的GPT分区表,小心使得万年船
parted /dev/sdc
----------------------------------------------------------------------------------------------------------------------------------------------
------Error: The backup GPT table is not at the end of the disk, as it should be. This might mean that another operating -------------system believes the disk is smaller. Fix, by moving the backup to the end (and removing the old backup)?
-------------Fix/Ignore/Cancel? Fix
------Warning: Not all of the space available to /dev/sdc appears to be used, you can fix the GPT to use all of the space -------------(an extra 1258291200 blocks) or continue with the current setting?
-------------Fix/Ignore? Fix
==>print
==>mkpart primarry 上次分区的结尾G 100%
==>quit
lvm扩容
================================
pvcreate /dev/sdc4
vgextend datavg /dev/sdc4
lvextend -l +100%FREE /dev/mapper/datavg-lv_data
resize2fs /dev/mapper/datavg-lv_data
df -TPh /data

浙公网安备 33010602011771号