Suggestions for Migration of Xen image with LVM?
I have a server running Fedora (Fedora 8, 64 bit), Xen, and using LVM. I built each of my Xen images in its own logical volume (actually started with one image that I hardened, then cloned to a new logical volume and specialized for different tasks like web, database, or application) Now I am trying to figure out the best way to migrate these images to my Linode.
Not sure it matters, but my hardened image is built using Fedora Core 6, 64 bit and uses LVM for custom partitioning (including the swap).
On my server running Xen I have successfully replicated images either using virt-clone or dd. My initial thought is that I might be able to set up a raw image on the Linode, mount it using Finnix and use dd to move the image from my server to the Linode. After poking around, however, I am curious if this will not work or if there might be a better way.
I did read the custom howto, but I fear that the fact my image uses LVM for the custom partitioning might mean this won't work in my case. My image is 6GB, so I thought I might see if anyone has any tips or suggestions before I waste the bandwidth on something that might not work.
Any help is appreciated, thank you for your time.
Brad
6 Replies
@CVG001:
Not sure it matters, but my hardened image is built using Fedora Core 6, 64 bit
probably don't need to tell you this, but make sure you choose one of the x86_64 kernels.
> I did read the custom howto, but I fear that the fact my image uses LVM for the custom partitioning might mean this won't work in my case.
I've never tried using it within the linode, but the linode kernel does appear to include LVM support.````
#
Multi-device support (RAID and LVM)
#
CONFIGMD=y
CONFIGBLKDEVMD=y
CONFIGMDLINEAR=y
CONFIGMDRAID0=y
CONFIGMDRAID1=y
CONFIGMDRAID10 is not set
CONFIGMDRAID456=y
CONFIGMDRAID5_RESHAPE is not set
CONFIGMDMULTIPATH=y
CONFIGMDFAULTY is not set
CONFIGBLKDEVDM=y CONFIGDMCRYPT=y CONFIGDMSNAPSHOT=y CONFIGDM_MIRROR=y
CONFIGDMZERO is not set
CONFIGDMMULTIPATH is not set
````
# pvcreate /dev/xvdh
Physical volume "/dev/xvdh" successfully created
# vgcreate lvmtest /dev/xvdh
Volume group "lvmtest" successfully created
# lvcreate -L10M -npart1 lvmtest
Rounding up size to full physical extent 12.00 MB
Logical volume "part1" created
# lvcreate -L20M -npart2 lvmtest
Logical volume "part2" created
# lvcreate -L30M -npart3 lvmtest
Rounding up size to full physical extent 32.00 MB
Logical volume "part3" created
# vgs
VG #PV #LV #SN Attr VSize VFree
lvmtest 1 3 0 wz--n- 96.00M 32.00M
# lvs
LV VG Attr LSize Origin Snap% Move Log Copy% Convert
part1 lvmtest -wi-a- 12.00M
part2 lvmtest -wi-a- 20.00M
part3 lvmtest -wi-a- 32.00M
# mke2fs -cc /dev/lvmtest/part1
mke2fs 1.40.9 (27-Apr-2008)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
3072 inodes, 12288 blocks
614 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=12582912
2 block groups
8192 blocks per group, 8192 fragments per group
1536 inodes per group
Superblock backups stored on blocks:
8193
Testing with pattern 0xaa: done
Reading and comparing: done
Testing with pattern 0x55: done
Reading and comparing: done
Testing with pattern 0xff: done
Reading and comparing: done
Testing with pattern 0x00: done
Reading and comparing: done
Writing inode tables: done
Writing superblocks and filesystem accounting information: done
#
The resulting partitions mount and behave properly as far as I can tell.
Brad
@pclissold:
I've used LVM on my Linodes for several years without problems - under both UML and Xen.
My problem now seems to be that the system is not finding my root partition, which is under LVM. Are the root partitions on your installations on LVM or outside of LVM? If they use LVM, is there anything special you did to your configuration to make it run? I am kind of stumped,
Please let me know if you have a chance, thank you!
@CVG001:
Are the root partitions on your installations on LVM or outside of LVM?
My root partitions are regular Linode images. I have experimented with LVM root partitions but I have never yet got the initrd to work.