I accidentally extended the volume to utilized 100% free disk space on LVM group volume. I need it to utilized only
/dev/sdb disk but it took free space from both disk, since they were on the same group. Is there a way to reverse this.
[root@server]# pvscan PV /dev/sda3 VG myvg lvm2 [13.84 GB / 13.84 GB free] PV /dev/sdb3 VG myvg lvm2 [22.06 GB / 8.22 GB free] Total: 2 [35.91 GB] / in use: 2 [35.91 GB] / in no VG: 0 [0 ] [root@server]# lvextend -l +100%FREE /dev/myvg/rootvol Extending logical volume rootvol to 35.91 GB Logical volume rootvol successfully resized [root@server]# pvscan PV /dev/sda3 VG myvg lvm2 [13.84 GB / 0 free] PV /dev/sdb3 VG myvg lvm2 [22.06 GB / 0 free] Total: 2 [35.91 GB] / in use: 2 [35.91 GB] / in no VG: 0 [0 ]
I actually need to remove
This is on RHEL 5.9 system.
Please note that I do not want to loss the data
If I use temporary disk then I will need about the same size of the disk, if I pvmove only one volume then how can I make sure there there is nothing in other disk and the data will not get corrupted.
I added a new larger disk and
/dev/sdc3 (new disk). I am not sure why df still showing newly added free space on root volume.
[root@server]# pvscan PV /dev/sdc3 VG myvg lvm2 [47.06 GB / 11.16 GB free] PV /dev/sda3 lvm2 [13.85 GB] PV /dev/sdb3 lvm2 [22.07 GB] Total: 3 [82.98 GB] / in use: 1 [47.06 GB] / in no VG: 2 [35.92 GB] [root@server]# lvscan ACTIVE '/dev/myvg/rootvol' [35.91 GB] inherit [root@server]# df -kh . Filesystem Size Used Avail Use% Mounted on /dev/mapper/myvg-rootvol 14G 12G 1.3G 91% /