Sharing Knowledge | System Admin Articles

Online Data Relocation to another disk in Linux




You can move data while the system is in use with the pvmove command in Linux server. This will be helpfull if you want to take the disk out from the linux server. After pvmove, you have to remove the PV from volume group to take out from the server.


The pvmove command breaks up the data to be moved into sections and creates a temporary mirror to move each section. 


The following command moves all allocated space off the physical volume /dev/sdb1 to other free physical volumes in the volume group:


pvmove /dev/sdb1


The following command moves just the extents of the logical volume MyLVOL1.


pvmove -n MyLVOL1 /dev/sdb1


The following command moves all extents allocated to to the physical volume /dev/sdb1 over to /dev/sdc1 in the background.


pvmove -b /dev/sdc1 /dev/sdf1


The following command reports the progress of the move as a percentage at five second intervals.


pvmove -i5 /dev/sdd1


Labels: Linux, Quick HOWTO

My Profile PhotoAbout the Author

I'm Parthiban, An UNIX System Admin by Profession. I'm Experienced in Linux/Unix System Administration and Scripting. I have done lot of work on the infrastructure Mgmt side in Linux, UNIX and Windows system administration, Hardware, Storage and Data center. I'm blogging since 2008.
Follow Me On Twitter or On Facebook

0 Comments for "Online Data Relocation to another disk in Linux"

What do you think about this Article? Add your Opinion..!

Back To Top