WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] dual personalities

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] dual personalities
From: Kent Watsen <kent@xxxxxxxxxx>
Date: Wed, 28 Sep 2005 08:33:57 -0700
Delivery-date: Wed, 28 Sep 2005 15:31:50 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <433A6EDC.2040603@xxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <433A64F1.7010804@xxxxxxxxxx> <433A6EDC.2040603@xxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla Thunderbird 1.0.6 (Macintosh/20050716)

I have a working DomU when located on a physical partition (i.e. hdb, a 2nd HD that I'm using to stage guest domains), but it all goes bad when I copy the root/swap partitions into LVM-based partitions. Specifically, I have a working guest domain on hdb2 (swap is hdb1). I created the logical volumes using the usual mix of pvcreate, vgcreate, and lvcreate:

   pvcreate /dev/hda5vgcreate xen-vg /dev/hda5
   lvcreate -L5G -n suse-root xen-vg
   mkfs.reiserfs /dev/xen-vg/suse-root
   cp -ax /<the real parition> /<the new partition> (yes, this seemed
   to work as expected)


Sorry, I am confused by this. Are you copying
a filesystem image or a tree of files on a mounted
filesystem?

The absence on any mount commands suggests the former.
The presence of the mkfs.reiserfs command suggests the latter.

Incidently I tend to avoid using cp because I can never
remember how it works. I tend to dd to copy disk images
and a pair of tar commnds in a pipeline to copy file trees
around.


Yes, there were some mount commands also - I was trying to save the list some of the details, but they were something like:

   mkdir /mnt/hdb; mount /dev/hdb1 /mnt/hdb1
   mkdir /mnt/suse-root; mount /dev/xen-vg/suse-root /mnt/suse-root

then the `cp` was like:

   cp -ax /mnt/hdb1 /mnt/suse-root


and, of course, after the copy finished, I cleaned up as follows:

   umount /mnt/hdb1; rmdir /mnt/hdb1
   umount /mnt/suse-root; rmdir /mnt/suse-root




   lvcreate -L256M -n suse-swap xen-vg
   mkswap /dev/xen-vg/suse-swap

The only other modification I made was to the start-up script as follows:

   < disk = [ 'phy:xen-vg/suse-root,hdb2,w',
   'phy:xen-vg/suse-swap,hdb1,w' ]
   ---
    > disk = [ 'phy:hdb2,hdb2,w', 'phy:hdb1,hdb1,w' ]


I am using xen-2.0.7

For my domU configuration file I have:

  disk = [ 'phy:/dev/system/domU1_root,hda1,w',
           'phy:/dev/system/domU1_swap,hda2,w']

i.e. are you missing a /dev/ prefix somewhere?

I'm not sure this is causing you a problem though,
it just seems better to use an explicit path.

If you fsck and mount your LVM filesystem images,
do they check OK, mount OK, contain all the
files you expect to be there?

From the user-guide, this appears to be the right syntax when using LVM - besides, the guest boot was almost successful...



Kent


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users