Nov 2, 2008

How to remove a VG and using its space to extend another VG?

**************************************************
test:/tmp>df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/sys_vg-root_lv
48G 26G 20G 58% /
/dev/sda1 99M 13M 82M 14% /boot
none 2.0G 0 2.0G 0% /dev/shm

**************************************************
test:/tmp>pvscan
PV /dev/sda3 VG ifmx_vg lvm2 [222.93 GB / 119.93 GB free]
PV /dev/sda2 VG sys_vg lvm2 [49.97 GB / 32.00 MB free]
Total: 2 [272.90 GB] / in use: 2 [272.90 GB] / in no VG: 0 [0 ]

**************************************************
If i want to remove ifmx_vg,then using the free space to extend sys_vg, How I should do?

**************************************************
step follows:
1,lvremove /dev/ifmx_vg/plogdbs --remove lv
2,vgchange -a n ifmx_vg --stop vg
3,vgremove ifmx_vg --remove vg
4,vgextend sys_vg /dev/sda3 --extend sys_vg
5,lvextend -L +20000M /dev/sys_vg/root_lv --extend root_lv
6,ext2online /dev/sys_vg/root_lv

Is the six step ==ext2online /dev/sys_vg/root_lv ==must done, not sure?




No comments:

Post a Comment