Wednesday, February 8, 2012

Moving a physical volume using pvmove

Sponsored Links
Suppose we want to move a physical volume /dev/sda3 from hard disk /dev/sda to /dev/sde3 of hard disk /dev/sde

First make the /dev/sde3 to a physical volume using the following command.
#pvcreate /dev/sde3

verify it using the command.

add the newly created physical volume to the Volume group.
#vgextend  vg_name  /dev/sde3

Now move the /dev/sda3 to /dev/sde3
#pvmove   /dev/sda3  /dev/sde3

After completing the move, you can remove the  /dev/sda3 from the VG.
#vgreduce   vg_name  /dev/sda3

Now we can remove the physical volume itself
#pvremove /dev/sda3

You can check the vg status using following commands.
Sponsored Links

No comments:

Post a Comment

Be nice. That's all.