In VMware ESXi 5.5 I have Centos 6.8 64 bit with hard disk of 60 GB which is partitioned into two partitions:
/dev/sda1 partition, 512 MB, type: Linux 83 (boot partition)
/dev/sda2 partition, 60 GB, type: LVM 8e
/dev/mapper/vg_centos is the volume group which has /dev/sda2 physical volume
I have has 2 logical volume: lv_swap and lv_root.
How can I shrink physical hard disk (e.g. from 60 GB to 45 GB) without to lost data, particularly LVM partition /dev/sda2?
I tried by Gparted, before disactivating volume, but nothing!
I can power off server if it's necessary of course.
shrink physical volume
Re: shrink physical volume
The order to do it in is:
1) Shrink the filesystem (depends on the FS used).
2) Reduce the volume (lvreduce)
3) Reduce the VolumeGroup (vgreduce)
4) Resize the physical (pvresize)
Oh and at 0) Backup everything.
1) Shrink the filesystem (depends on the FS used).
2) Reduce the volume (lvreduce)
3) Reduce the VolumeGroup (vgreduce)
4) Resize the physical (pvresize)
Oh and at 0) Backup everything.