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

xen-users

[Top] [All Lists]

Re: [Xen-users] lomount + lvm

To: Brian Krusic <brian@xxxxxxxxxx>
Subject: Re: [Xen-users] lomount + lvm
From: John Haxby <john.haxby@xxxxxxxxxx>
Date: 2009年2月06日 15:56:23 +0000
Cc: ryanduff.list@xxxxxxxxx, xen-users list <xen-users@xxxxxxxxxxxxxxxxxxx>
Delivery-date: 2009年2月06日 08:27:30 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <8816A16F-448D-4BE0-B29C-B3E6284E2AFD@xxxxxxxxxx>
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/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <D9C7B3A1-49C3-4D81-8839-06A05971D7C7@xxxxxxxxxx> <498B9FBC.70906@xxxxxxxxx> <8816A16F-448D-4BE0-B29C-B3E6284E2AFD@xxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.19 (X11/20090105)
Brian Krusic wrote:
Forgot, my conf files disk line of interest looks like this;
disk = [ "tap:aio:/var/lib/xen/images/foo.img,xvda,w" ]
First make sure your guest isn't running unless you want to trash its file systems.
losetup -f /var/lib/xen/images/foo.img
losetup -a
# Make a note of which device corresponds to /var/lib/images/foo.img,
# 'll call it /dev/loopN but it's probably /dev/loop0
kpartx -va /dev/loopN
You'll get two new entries in /dev/mapper now: /dev/mapper/loopNp1 and /dev/mapper/loopNp2. loopNp1 is /boot (asume you have got a standard layout). loopNp2 is a volume group. You can just mount
/dev/loopNp1 to poke around the /boot file system.
Now
vgscan
This is where you might come unstuck. The default volume group for Red Hat and similar is "VolGroup00". If your dom0 is using LVM and so is the guest then you'll have do VolGroup00's and that's bad. The best thing to do now is to boot a rescue image in a different domU and rename the guest's volume group. You'll need to undo the kpartx and losetup (see below first) and when you've all finished then you'll need to either fix up the guest's /boot/initrd*.img, /etc/fstab and /boot/grub/grub.conf to hold the new name or you'll have to rename it back again in the rescue guest.
Anyway, assuming you don't get a clash:
vgchange -ay VolGroup00
The guest's file systems are now in /dev/VolGroup00 and you can mount them as normal.
To undo everything:
1. umount any file systyems you mounted
2. vgchange -an VolGroup00
3. kpartx -d /dev/loopN
4. losetup -d /dev/loopN
And next time you build a system, change the name of its volume group so you don't wind up with two systems with the same volume group name! And I wish Red Hat had listened to me years ago when I said that "VolGroup00" was a really poor idea.
jch
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
<Prev in Thread] Current Thread [Next in Thread>
Previous by Date: [Xen-community] Weekly Xen.org Community Update , Stephen Spector
Next by Date: Re: [Xen-users] domU inside another domU? , Grant McWilliams
Previous by Thread: Re: [Xen-users] lomount + lvm , jonr
Next by Thread: Re: [Xen-users] lomount + lvm , Brian Krusic
Indexes: [Date] [Thread] [Top] [All Lists]

Copyright ©, Citrix Systems Inc. All rights reserved. Legal and Privacy
Citrix This site is hosted by Citrix

AltStyle によって変換されたページ (->オリジナル) /