In creating LVMs during the Fedora install. I created the following layout; /dev/sdb /dev/sdb1 /boot /dev/sdb2 VolGroup01 /dev/sdb3 VolGroup02 VolGroup00 LogVol01 swap LogVol00 / VolGroup01 LogVol00 /guest1 LogVol01 /guest2 I then used virt-install to create HVMs. However I created them using a file system: ''/xen/file.img''. Later I used the dd command to copy the image as follows: dd if=/xen/file.img of=/dev/VolGroup01/guest1 I added the following to the config: disk [''phy:VolGroup/guest1,xvda1,w''] and get the following error: Error: Device 770 (vbd) could not be connected. Device /dev/VolGroup01/guest1 is mounted in the privileged domain, and so cannot be mounted by a guest. After rebooting I get this error: fsck.ext3: Bad magic number in super-block while trying to open /dev/VolGroup01/guest1 Can I recover from the above if so how? What is the correct procedure to convert the image to the LVM? Help is greatly appreciated! _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Di, Apr 01, 2008 at 11:54:07 -0400, Johnson, Tony M wrote:> In creating LVMs during the Fedora install. I created the following > layout; > > /dev/sdb > /dev/sdb1 /boot > /dev/sdb2 VolGroup01 > /dev/sdb3 VolGroup02 > > VolGroup00 > LogVol01 swap > LogVol00 / > > VolGroup01 > LogVol00 /guest1 > LogVol01 /guest2 > > I then used virt-install to create HVMs. However I created them using a > file system: ''/xen/file.img''. > Later I used the dd command to copy the image as follows: dd > if=/xen/file.img of=/dev/VolGroup01/guest1 > > I added the following to the config: disk > [''phy:VolGroup/guest1,xvda1,w''] and get the following error: Error: > Device 770 (vbd) could not be connected. Device /dev/VolGroup01/guest1 > is mounted in the privileged domain, and so cannot be mounted by a > guest. > After rebooting I get this error: fsck.ext3: Bad magic number in > super-block while trying to open /dev/VolGroup01/guest1Do file /xen/file.img contains only one partition or all the system (with MBR and so on)? If /xen/file.img contains MBR (and one or more partitions), you sholed specify [''phy:VolGroup/guest1,xvda,w''] instead of [''phy:VolGroup/guest1,xvda1,w''] If it works, you can split partitions (insidde /xen/file.img) to several volumes, in a way described here [1], [2]. [1] http://bitsandchaos.wordpress.com/2007/12/08/how-to-manipulate-the-files-stored-inside-a-xen-virtual-machine/ [2] http://publib.boulder.ibm.com/infocenter/eserver/v1r2/index.jsp?topic=/eica7/eica7_creating_custom_image_xen_manually.htm> > Can I recover from the above if so how? What is the correct procedure to > convert the image to the LVM?dd is ok> Help is greatly appreciated! > > > >> _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users-- WBR, i.m.chubin _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> In creating LVMs during the Fedora install. I created the following > layout; > > /dev/sdb > /dev/sdb1 /boot > /dev/sdb2 VolGroup01 > /dev/sdb3 VolGroup02 > > VolGroup00 > LogVol01 swap > LogVol00 / > > VolGroup01 > LogVol00 /guest1 > LogVol01 /guest2 > > I then used virt-install to create HVMs. However I created them using a > file system: ''/xen/file.img''. > Later I used the dd command to copy the image as follows: dd > if=/xen/file.img of=/dev/VolGroup01/guest1That all sounds sensible.> I added the following to the config: disk > [''phy:VolGroup/guest1,xvda1,w''] and get the following error: Error: > Device 770 (vbd) could not be connected. Device /dev/VolGroup01/guest1 > is mounted in the privileged domain, and so cannot be mounted by a > guest.Well, that suggests you had the filesystem mounted (or somehow "in use", at least) in dom0. The control tools stop you from starting the domain in this case as mounting a filesystem in multiple domains simultaneously (or whilst one is paused / suspended) will produce severe filesystem corruption.> After rebooting I get this error: fsck.ext3: Bad magic number in > super-block while trying to open /dev/VolGroup01/guest1Was this previously a mountable filesystem, configured in /etc/fstab? Apparently it''s not mountable anymore. If what you dd-ed was a *whole disk image* rather than just a *partition image* then it''s not going to be possible to directly mount this volume anymore. I think this is probably the case here... if I''m right about that, then you can just remove the line from /etc/fstab.> Can I recover from the above if so how? What is the correct procedure to > convert the image to the LVM?What you did sounds right, as long as the LV was big enough. You mapped the LV to xvda1 in the guest - that''s a partition. If it''s a whole disk image then that''s not going to work. Export it as xvda instead.> Help is greatly appreciated!Hope that helps, Cheers, Mark -- Push Me Pull You - Distributed SCM tool (http://www.cl.cam.ac.uk/~maw48/pmpu/) _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Tony M Johnson wrote on Tue, 1 Apr 2008 23:54:07 -0400:> LogVol00 /guest1 > LogVol01 /guest2You have to unmount these in Dom0 and use phy:VolGroup/LogVol00 for the DomU. Kai -- Kai Schätzl, Berlin, Germany Get your web at Conactive Internet Services: http://www.conactive.com _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
You should not mount /guest1 and /guest2 in Dom0. Just comment those LVMs out of /etc/fstab. From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Johnson, Tony M Sent: Tuesday, April 01, 2008 8:54 PM To: xen-users@lists.xensource.com Subject: [Xen-users] Error moving DomU image to LVM In creating LVMs during the Fedora install. I created the following layout; /dev/sdb /dev/sdb1 /boot /dev/sdb2 VolGroup01 /dev/sdb3 VolGroup02 VolGroup00 LogVol01 swap LogVol00 / VolGroup01 LogVol00 /guest1 LogVol01 /guest2 I then used virt-install to create HVMs. However I created them using a file system: ''/xen/file.img''. Later I used the dd command to copy the image as follows: dd if=/xen/file.img of=/dev/VolGroup01/guest1 I added the following to the config: disk = [''phy:VolGroup/guest1,xvda1,w''] and get the following error: Error: Device 770 (vbd) could not be connected. Device /dev/VolGroup01/guest1 is mounted in the privileged domain, and so cannot be mounted by a guest. After rebooting I get this error: fsck.ext3: Bad magic number in super-block while trying to open /dev/VolGroup01/guest1 Can I recover from the above if so how? What is the correct procedure to convert the image to the LVM? Help is greatly appreciated! _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users