On Sat, Oct 31, 2009 at 10:57:33AM +0100, Gilles Mocellin wrote: > On Sat, Oct 31, 2009 at 07:12:10AM +1100, Alex Samad wrote: > > [...] > > > > 3) move the data to the external disk with pvmove (2 solutions) > > > - pvmove -n LV1 /dev/sdXY for each LV or > > > - pvmove /dev/sdAB /dev/sdXY for each PV in VG1 (if there is only > > > one, > > > it's just one command comparing to solution 1) > > > > aren't you missing a step to that the pv out of the vggroup ? > > Yes, it's possible. > - vgreduce VG1 /dev/sdXY > > But, if he deletes VG1 after, it's not necessary to remove the PV. > > > > 4) deactivate VG1 on server 1 > > > - vgchange -a n VG1 (you can delete it after, I don't think it's > > > wise to > > > delete it now) > > [...] > > Unless you speak about the PV on the external disk. > Here, I must admit that I don't know if the data will be still there if > we do a vgreduce of the PV containing it. > > I will do a test, as I want to know if what I said is possible ! > Soon here.
Well, it's not so easy. Adding a PV with data to a VG does not bring the metadata and does not make the LVs visible. I manage to transfert LV via pvmove this way : 1) vgsplit to isolate the LVs to move in a separate VG (VGTEMP). If you want to move all the LVs, no need to vgsplit. 2) Add a new PV to VGTEMP from an external drive (Here, I've just think you can use a network exported block device, like nbd, iscsi, aoe) 3) pvmove from local PV to the external one 4) vgexport VGTEMP 5) move the external drive (or unexport/reexport the network block device) 6) pvscan eventually and vgimport VGTEMP 7) vgmerge VG2 VGTEMP 6) pvmove from external drive to local drives 7) vgreduce VG2 to remove external drive I don't really think that this method is faster than a raw copy of the LV block devices...
signature.asc
Description: Digital signature