"Karl E. Jorgensen" <k...@jorgensen.org.uk> writes: > Hi > > On Wed, Nov 19, 2014 at 12:24:27AM +0100, lee wrote: >> Hi, >> >> so far, I managed to pvmove a LV to my USB stick and from there to a >> backup disk in another machine. Doing so, I found that I can split off >> LVs from a volume group and that this inevitably creates a new VG. That >> leaves you stuck because it's impossible to move a LV from one VG to >> another, and it's also impossible to merge multiple VGs into one VG :( >> How stupid is that?? > > Well - you can merge VGs. and You and split VGs. so you could: > > - pvcreate /dev/${usbdevice} > - use pvmove to move your LV of choice onto the USB stick. > - use vgsplit to split /dev/${usbdevice} into its on VG > - Sneakernet the USB stick to a new box > - Use vgmerge to join the USB stick to the box's VG > - Use pvmove to move the LV onto a local disk > - Use vgsplit to make the USB its own VG again > - Sneakernet the USB stick back to the original box > - Rinse and repeat. > > But that's a fair number of steps... You could also just:
Oh! Thank you, that solves my problem! :) I looked for something like vgmerge and didn't find it. I've done one step already, and when I move another VM to the USB stick, I should be able to move the whole remaining VG onto the stick. Three steps isn't too bad. > - Create a file system on the USB device. and mount it. > - dd if=/dev/oldvg/vgname | gzip --best > /media/usbstick/somefile.gz > - Unmount and sneakernet to the new box Hmmm, how would I put the copy of the VG back? Once the copying is all done, I'll remove the remaining two discs from the server and plug 6 discs in from which I'll make a RAID-5 which will have about 6TB. Then I'll pvcreate the whole RAID volume and probably re-install dom0 in its own LV. The next step is to create two VGs, one for the guest VMs and a large one for data. I don't want to re-install dom0, but apparently just copying it with 'cp -a' into the new LV might not allow me to make it bootable without trouble. What does Debian do in regard to grub? Can I just 'cp -a' dom0 over, boot into a rescue system and install grub? Dom0 is currently not in a LV. > etc.. I'm sure you get the idea. No need to make it more complicated > than absolutely necessary. Yes --- though I don't mind when it's a bit more complicated now and easier later. I can simply go through the same procedure a couple times and do it forth and back; it's not like I had hundreds of VMs :) >> (Note to self: Do not partition LVs but create LVs for swap partitions >> instead.) > > Sounds like a sensible note. Unfortunately, if you use virtualisation, > you will often end up slicing off LVs to be presented to the virtual > machines as disks. And the VMs then partition them and/or create PVs > on them. Nested stuff galore. Guess what :) I found out that I accidentially had managed to give dom0 and a VM the very same partition as swap partition. It even worked ... -- Again we must be afraid of speaking of daemons for fear that daemons might swallow us. Finally, this fear has become reasonable. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/87egszrn23....@yun.yagibdah.de