Guillaume Rousse
2009-Jul-21 15:17 UTC
[Xen-users] Troubles converting a pv host from dom0-hosted kernel to self-contained kernel
Hello list. I have a perfectly working PV host, with this configuration: kernel = "/boot/vmlinuz-2.6.18.8-xen-3.3.0-7mdv" ramdisk = "/boot/initrd-2.6.18.8-xen-3.3.0-7mdv.img" root = "/dev/sda1 ro" extra = "(hd0)/boot/grub/menu.lst" memory = 256 maxmem = 512 name = "sexonthebeach" uuid = "f36962f5-0dec-4708-84a0-f5b4dea48d34" disk = [ ''phy:/dev/vg0/sexonthebeach,sda1,w'' ] vif = [ ''mac=00:16:3e:00:00:13, bridge=services'' ] As this involves heavy coupling between dom0 and domU, I''m trying to make the PV host self-contained. AFAIK, the only way to do it is via pvgrub. Here is the configuration: kernel = "/usr/lib/xen/boot/pv-grub-x86_64.gz" extra = "(hd0)/boot/grub/menu.lst" memory = 256 maxmem = 512 name = "sexonthebeach" uuid = "f36962f5-0dec-4708-84a0-f5b4dea48d34" disk = [ ''phy:/dev/vg0/sexonthebeach,sda1,w'' ] vif = [ ''mac=00:16:3e:00:00:13, bridge=services'' ] The domU grub configuration: timeout 10 color black/cyan yellow/cyan default 0 title linux kernel (hd0)/boot/vmlinuz-server root=/dev/xvda1 initrd (hd0)/boot/initrd-server.img First issue: I found than it was mandatory to use root=/dev/xvda1 in order to mount root device when booting, despite the partition being exported as sda1 according to domU configuration. Is this normal ? Second issue, the boot stop at root partition mount time, trying to force fsck: [/sbin/fsck.ext3 (1) -- /] fsck.ext3 -a -a /dev/sda1 fsck.ext3: No such file or directory while trying to open /dev/sda1 /dev/sda1: The superblock could not be read or does not describe a correct ext2 filesystem. If the device is valid and it really contains an ext2 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock: e2fsck -b 8193 <device> This happens whatever device I use for root partition in domU /etc/fstab (/dev/sda1 or /dev/xdva1). However, I can perfectly mount /dev/vg0/sexonthebeach as an ext3 partition in domU. Morevoer, the emergency shell has expected content monted under / in both case... Last question, loosely related to this problem: is there a way to easily convert a partition-based host to a disk-based host (phy:/dev/vg0/foo,sda1 -> phy:/dev/vg0/foo,sda) ? -- Guillaume Rousse Service des Moyens Informatiques INRIA Saclay - Île-de-France Parc Orsay Université, 4 rue J. Monod 91893 Orsay Cedex France Tel: 01 69 35 69 62 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Guillaume Rousse
2009-Jul-21 15:22 UTC
Re: [Xen-users] Troubles converting a pv host from dom0-hosted kernel to self-contained kernel
Guillaume Rousse a écrit :> Hello list.I forgot the following informations: I''m running xen 3.3.1 with a 2.6.27.23 kernel on the dom0, and I''m booting a 2.6.27.24 kernel on the domU, both of them being x86_64 linux mandriva hosts. And I forced the loading of xenblk and xennet modules in domU initrd. -- Guillaume Rousse Service des Moyens Informatiques INRIA Saclay - Île-de-France Parc Orsay Université, 4 rue J. Monod 91893 Orsay Cedex France Tel: 01 69 35 69 62 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fabian Zimmermann
2009-Jul-21 15:28 UTC
Re: [Xen-users] Troubles converting a pv host from dom0-hosted kernel to self-contained kernel
Hi Guillaume Rousse,> First issue: I found than it was mandatory to use root=/dev/xvda1 in > order to mount root device when booting, despite the partition being > exported as sda1 according to domU configuration. Is this normal ?As far as I know, this depends on your DomU-Kernel. Did you try the xen.org-2.6.18.8?> Second issue, the boot stop at root partition mount time, trying to > force fsck: > [/sbin/fsck.ext3 (1) -- /] fsck.ext3 -a -a /dev/sda1 > fsck.ext3: No such file or directory while trying to open /dev/sda1 > /dev/sda1: > The superblock could not be read or does not describe a correct ext2 > filesystem. If the device is valid and it really contains an ext2 > filesystem (and not swap or ufs or something else), then the superblock > is corrupt, and you might try running e2fsck with an alternate superblock: > e2fsck -b 8193 <device> > > This happens whatever device I use for root partition in domU /etc/fstab > (/dev/sda1 or /dev/xdva1). However, I can perfectly mount > /dev/vg0/sexonthebeach as an ext3 partition in domU. Morevoer, the > emergency shell has expected content monted under / in both case...Try to boot your initramfs with init=/bin/bash and play around to find the right device-name (if any) f.e.: mkdir /tmp/testme/ mount /dev/sda1 /tmp/testme/ mount /dev/xvda1 /tmp/testme/ ..> Last question, loosely related to this problem: is there a way to easily > convert a partition-based host to a disk-based host > (phy:/dev/vg0/foo,sda1 -> phy:/dev/vg0/foo,sda) ?Maybe you find this useful: http://wiki.z-technologies.de/doku.php?id=partitiontabelle_nachtraeglich_erstellen Bye, Fabian _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Guillaume Rousse
2009-Jul-21 15:37 UTC
Re: [Xen-users] Troubles converting a pv host from dom0-hosted kernel to self-contained kernel
Fabian Zimmermann a écrit :>> Last question, loosely related to this problem: is there a way to >> easily convert a partition-based host to a disk-based host >> (phy:/dev/vg0/foo,sda1 -> phy:/dev/vg0/foo,sda) ? > > Maybe you find this useful: > http://wiki.z-technologies.de/doku.php?id=partitiontabelle_nachtraeglich_erstellenDo you have an english version by any chance ? My german is a bit... rusty :) -- Guillaume Rousse Service des Moyens Informatiques INRIA Saclay - Île-de-France Parc Orsay Université, 4 rue J. Monod 91893 Orsay Cedex France Tel: 01 69 35 69 62 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fabian Zimmermann
2009-Jul-21 17:00 UTC
Re: [Xen-users] Troubles converting a pv host from dom0-hosted kernel to self-contained kernel
Hi Guillaume Rousse:> Do you have an english version by any chance ? My german is a bit... > rusty :)Here my quick-and-dirty translation: http://wiki.z-technologies.de/doku.php?id=add_partition_table_to_disk Bye, Fabian _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Fajar A. Nugraha
2009-Jul-22 02:20 UTC
Re: [Xen-users] Troubles converting a pv host from dom0-hosted kernel to self-contained kernel
On Tue, Jul 21, 2009 at 10:17 PM, Guillaume Rousse<Guillaume.Rousse@inria.fr> wrote:> First issue: I found than it was mandatory to use root=/dev/xvda1 in order > to mount root device when booting, despite the partition being exported as > sda1 according to domU configuration. Is this normal ?It is, since you use 2.6.27. It will silently change [hs]da to xvda.> > Second issue, the boot stop at root partition mount time, trying to force > fsck: > [/sbin/fsck.ext3 (1) -- /] fsck.ext3 -a -a /dev/sda1 > fsck.ext3: No such file or directory while trying to open /dev/sda1 > /dev/sda1: > The superblock could not be read or does not describe a correct ext2 > filesystem. If the device is valid and it really contains an ext2 > filesystem (and not swap or ufs or something else), then the superblock > is corrupt, and you might try running e2fsck with an alternate superblock: > e2fsck -b 8193 <device> > > This happens whatever device I use for root partition in domU /etc/fstab > (/dev/sda1 or /dev/xdva1). However, I can perfectly mount > /dev/vg0/sexonthebeach as an ext3 partition in domU. Morevoer, the emergency > shell has expected content monted under / in both case...This is odd. What is the EXACT message you got when fstab use xvda1? I''d try : - modifying domU config to use xvda1 - change fstab to use xvda - rebuild domU''s initrd - try again> Last question, loosely related to this problem: is there a way to easily > convert a partition-based host to a disk-based host (phy:/dev/vg0/foo,sda1 > -> phy:/dev/vg0/foo,sda) ?None that I know of. Normal cp/tar/rsync/dd should do. I like partition-based host setup better, since it''s easier to mount on dom0 and resize the disk when necessary. -- Fajar _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Guillaume Rousse
2009-Jul-22 08:50 UTC
Re: [Xen-users] Troubles converting a pv host from dom0-hosted kernel to self-contained kernel
Fajar A. Nugraha a écrit :>> Second issue, the boot stop at root partition mount time, trying to force >> fsck: >> [/sbin/fsck.ext3 (1) -- /] fsck.ext3 -a -a /dev/sda1 >> fsck.ext3: No such file or directory while trying to open /dev/sda1 >> /dev/sda1: >> The superblock could not be read or does not describe a correct ext2 >> filesystem. If the device is valid and it really contains an ext2 >> filesystem (and not swap or ufs or something else), then the superblock >> is corrupt, and you might try running e2fsck with an alternate superblock: >> e2fsck -b 8193 <device> >> >> This happens whatever device I use for root partition in domU /etc/fstab >> (/dev/sda1 or /dev/xdva1). However, I can perfectly mount >> /dev/vg0/sexonthebeach as an ext3 partition in domU. Morevoer, the emergency >> shell has expected content monted under / in both case... > > This is odd. What is the EXACT message you got when fstab use xvda1? > I''d try : > - modifying domU config to use xvda1 > - change fstab to use xvda > - rebuild domU''s initrd > - try againWell, I probably made a typo in my first try. I finally succeded, using xvda everywhere. Thanks both of you for your help.>> Last question, loosely related to this problem: is there a way to easily >> convert a partition-based host to a disk-based host (phy:/dev/vg0/foo,sda1 >> -> phy:/dev/vg0/foo,sda) ? > > None that I know of. Normal cp/tar/rsync/dd should do. I like > partition-based host setup better, since it''s easier to mount on dom0 > and resize the disk when necessary.Indeed. I have to balance this with harmonisation with my hardware-virtualised hosts, which are disk-based. -- Guillaume Rousse Service des Moyens Informatiques INRIA Saclay - Île-de-France Parc Orsay Université, 4 rue J. Monod 91893 Orsay Cedex France Tel: 01 69 35 69 62 _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users