Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu Aug 21, 2008 6:05 pm 
Offline
Newbie

Joined: Thu Aug 21, 2008 5:45 pm
Posts: 3
Howdy, all.

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


Top
   
PostPosted: Thu Aug 21, 2008 6:46 pm 
Offline
Senior Member

Joined: Fri Dec 07, 2007 1:37 am
Posts: 385
Location: NC, USA
CVG001 wrote:
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.

Quote:
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.
Code:
#
# Multi-device support (RAID and LVM)
#
CONFIG_MD=y
CONFIG_BLK_DEV_MD=y
CONFIG_MD_LINEAR=y
CONFIG_MD_RAID0=y
CONFIG_MD_RAID1=y
# CONFIG_MD_RAID10 is not set
CONFIG_MD_RAID456=y
# CONFIG_MD_RAID5_RESHAPE is not set
CONFIG_MD_MULTIPATH=y
# CONFIG_MD_FAULTY is not set
CONFIG_BLK_DEV_DM=y
CONFIG_DM_CRYPT=y
CONFIG_DM_SNAPSHOT=y
CONFIG_DM_MIRROR=y
# CONFIG_DM_ZERO is not set
# CONFIG_DM_MULTIPATH is not set


Top
   
 Post subject:
PostPosted: Thu Aug 21, 2008 7:29 pm 
Offline
Senior Member

Joined: Fri Dec 07, 2007 1:37 am
Posts: 385
Location: NC, USA
You got me curious enough to try it out on my linode:
Code:
 # 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.


Top
   
 Post subject:
PostPosted: Fri Aug 22, 2008 5:14 am 
Offline
Senior Member
User avatar

Joined: Fri Oct 24, 2003 3:51 pm
Posts: 965
Location: Netherlands
I've used LVM on my Linodes for several years without problems - under both UML and Xen.

_________________
/ Peter


Top
   
 Post subject: Thanks everyone!
PostPosted: Mon Aug 25, 2008 7:15 am 
Offline
Newbie

Joined: Thu Aug 21, 2008 5:45 pm
Posts: 3
I appreciate the assistance. I am getting closer, I uploaded the image and used vgscan to find all of the logical volumes. Now I think I just need to figure out how to get the image mounted with LVM (guessing the "root device" setting is needed on the configuration profile screen)

Brad


Top
   
 Post subject:
PostPosted: Tue Sep 02, 2008 11:52 am 
Offline
Newbie

Joined: Thu Aug 21, 2008 5:45 pm
Posts: 3
pclissold wrote:
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!


Top
   
 Post subject:
PostPosted: Tue Sep 02, 2008 8:25 pm 
Offline
Senior Member
User avatar

Joined: Fri Oct 24, 2003 3:51 pm
Posts: 965
Location: Netherlands
CVG001 wrote:
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.

_________________
/ Peter


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group