Hi all, Successfully running a built from source xen 3.0.2-2 & linux 2.6.16 on fedora 4 with lvm. I''m trying to share a read only /usr across multiple domU''s. Logical volume "/dev/vg0/usr" is read only. Within the domU''s fstab /usr is "ro". Here is the disk option from the domU definition. disk = [ ''phy:vg0/fc4,hda1,w'' , ''phy:vg0/usr,hda2,r'' , ''phy:vg0/swap,hda3,w'' ] This fails with an unable to write block error. Now if the vg0/usr volume is specified with ''w'' it works without complaint until I try to use it in a different domU. Then the complaint is that it is already in use in another guest domain. Q 1: is inability to specify a phy: as read only a bug? Q 2: what is the proper way to share/use a read only volume among domU''s? Thanks for any help, Mike Wright _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
list user <xktnniuymlla@mailinator.com> wrote on 04/25/2006 03:18:45 PM:> Hi all, > > Successfully running a built from source xen 3.0.2-2 & linux 2.6.16 on > fedora 4 with lvm. > > I''m trying to share a read only /usr across multiple domU''s. > > Logical volume "/dev/vg0/usr" is read only. Within the domU''s fstab > /usr is "ro". Here is the disk option from the domU definition. > > disk = [ ''phy:vg0/fc4,hda1,w'' , > ''phy:vg0/usr,hda2,r'' , > ''phy:vg0/swap,hda3,w'' ] > > This fails with an unable to write block error. > > Now if the vg0/usr volume is specified with ''w'' it works without > complaint until I try to use it in a different domU. Then the complaint > is that it is already in use in another guest domain. > > Q 1: is inability to specify a phy: as read only a bug? > Q 2: what is the proper way to share/use a read only volume among domU''s? > > Thanks for any help, > Mike WrightWe use a shared read-only device for /usr in our test setups quite successfully. The disk line in the domU config file looks like: disk [''phy:/dev/virt-blkdev-backend/dom1,sda1,w'',''phy:/dev/virt-blkdev-backend/usr,sda2,r'',''phy:/dev/virt-blkdev-disk_io_test/dom1,sda3,w''] First device is /, second device is /usr, third device is shows up as a raw disk for testing. We are running FC4 in the domUs. What is it that fails? xm create? the boot up in the domU? In our setup I have seen an error or two during bootup in the domU because something in the initialization wants to write to /usr. It''s usually some function we don''t care about so we ignore it. Is something in your init scripts trying to write to /usr? Steve D. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Steve Dobbelstein wrote:> list user <xktnniuymlla@mailinator.com> wrote on 04/25/2006 03:18:45 PM: > > >>Hi all, >> >>Successfully running a built from source xen 3.0.2-2 & linux 2.6.16 on >>fedora 4 with lvm. >> >>I''m trying to share a read only /usr across multiple domU''s. >> >>Logical volume "/dev/vg0/usr" is read only. Within the domU''s fstab >>/usr is "ro". Here is the disk option from the domU definition. >> >>disk = [ ''phy:vg0/fc4,hda1,w'' , >> ''phy:vg0/usr,hda2,r'' , >> ''phy:vg0/swap,hda3,w'' ] >> >>This fails with an unable to write block error. >> >>Now if the vg0/usr volume is specified with ''w'' it works without >>complaint until I try to use it in a different domU. Then the complaint >>is that it is already in use in another guest domain. >> >>Q 1: is inability to specify a phy: as read only a bug? >>Q 2: what is the proper way to share/use a read only volume among domU''s? >> >>Thanks for any help, >>Mike Wright > > > We use a shared read-only device for /usr in our test setups quite > successfully. The disk line in the domU config file looks like: > disk > [''phy:/dev/virt-blkdev-backend/dom1,sda1,w'',''phy:/dev/virt-blkdev-backend/usr,sda2,r'',''phy:/dev/virt-blkdev-disk_io_test/dom1,sda3,w''] > First device is /, second device is /usr, third device is shows up as a raw > disk for testing. We are running FC4 in the domUs. > > What is it that fails? xm create? the boot up in the domU?Thanks for your help. It seems to be failing at an "fsck". Here''s a section of the boot: ... Checking all file systems. [/sbin/fsck.ext3 (1) -- /] fsck.ext3 -a /dev/hda1 /dev/hda1: clean, 177498/2048256 files, 1535857/2048000 blocks [/sbin/fsck.ext3 (1) -- /usr] fsck.ext3 -a /dev/hda2 Error writing block 731 (Attempt to write block from filesystem resulted in short write). /dev/hda2: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY. (i.e., without -a or -p options) ... Last 2 lines repeat indefinitely.> > In our setup I have seen an error or two during bootup in the domU because > something in the initialization wants to write to /usr. It''s usually some > function we don''t care about so we ignore it. Is something in your init > scripts trying to write to /usr? > > Steve D. > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Steve Dobbelstein wrote:> list user <xktnniuymlla@mailinator.com> wrote on 04/25/2006 03:18:45 PM: > > >>Hi all, >> >>Successfully running a built from source xen 3.0.2-2 & linux 2.6.16 on >>fedora 4 with lvm. >> >>I''m trying to share a read only /usr across multiple domU''s. >> >>Logical volume "/dev/vg0/usr" is read only. Within the domU''s fstab >>/usr is "ro". Here is the disk option from the domU definition. >> >>disk = [ ''phy:vg0/fc4,hda1,w'' , >> ''phy:vg0/usr,hda2,r'' , >> ''phy:vg0/swap,hda3,w'' ] >> >>This fails with an unable to write block error. >> >>Now if the vg0/usr volume is specified with ''w'' it works without >>complaint until I try to use it in a different domU. Then the complaint >>is that it is already in use in another guest domain. >> >>Q 1: is inability to specify a phy: as read only a bug? >>Q 2: what is the proper way to share/use a read only volume among domU''s? >> >>Thanks for any help, >>Mike Wright > > > We use a shared read-only device for /usr in our test setups quite > successfully. The disk line in the domU config file looks like: > disk > [''phy:/dev/virt-blkdev-backend/dom1,sda1,w'',''phy:/dev/virt-blkdev-backend/usr,sda2,r'',''phy:/dev/virt-blkdev-disk_io_test/dom1,sda3,w''] > First device is /, second device is /usr, third device is shows up as a raw > disk for testing. We are running FC4 in the domUs. > > What is it that fails? xm create? the boot up in the domU?Sorry for not answering your question the first time. The "xm create test-1" returns successfully. Fails during domU boot. It seems to be failing at "fsck". Here''s a section of the boot: ... Checking all file systems. [/sbin/fsck.ext3 (1) -- /] fsck.ext3 -a /dev/hda1 /dev/hda1: clean, 177498/2048256 files, 1535857/2048000 blocks [/sbin/fsck.ext3 (1) -- /usr] fsck.ext3 -a /dev/hda2 Error writing block 731 (Attempt to write block from filesystem resulted in short write). /dev/hda2: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY. (i.e., without -a or -p options) ... Last 2 lines repeat indefinitely.> > In our setup I have seen an error or two during bootup in the domU because > something in the initialization wants to write to /usr. It''s usually some > function we don''t care about so we ignore it. Is something in your init > scripts trying to write to /usr? > > Steve D. > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Steve Dobbelstein
2006-Apr-25 22:51 UTC
Re: [Xen-users] [repost] read only disk option in domUs
list user <xktnniuymlla@mailinator.com> wrote on 04/25/2006 04:58:04 PM:> It seems to be failing at "fsck". Here''s a section of the boot: > > ... > Checking all file systems. > [/sbin/fsck.ext3 (1) -- /] fsck.ext3 -a /dev/hda1 > /dev/hda1: clean, 177498/2048256 files, 1535857/2048000 blocks > [/sbin/fsck.ext3 (1) -- /usr] fsck.ext3 -a /dev/hda2 > Error writing block 731 (Attempt to write block from filesystem resulted > in short write). > > /dev/hda2: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY. > (i.e., without -a or -p options) > ... > Last 2 lines repeat indefinitely.I have seen that, too. You have probably already figured out the fix: shutdown the domain, run fsck on the device /dev/vg0/usr in dom0, then restart the domain. That worked for me. Steve D. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Javier Guerra
2006-Apr-26 00:56 UTC
Re: [Xen-users] [repost] read only disk option in domUs
On Tuesday 25 April 2006 5:51 pm, Steve Dobbelstein wrote:> list user <xktnniuymlla@mailinator.com> wrote on 04/25/2006 04:58:04 PM: > > It seems to be failing at "fsck". Here''s a section of the boot: > I have seen that, too. You have probably already figured out the fix: > shutdown the domain, run fsck on the device /dev/vg0/usr in dom0, then > restart the domain. That worked for me.also make sure the /dev/hda2 entry in /etc/fstab mounts it as read-only, and put a zero at the last two parameters (or omit them), so that it won''t try to fsck it (if it''s readonly; it can''t be fixed, so a fsck can''t do any good) -- Javier _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
list user wrote:> Hi all, > > Successfully running a built from source xen 3.0.2-2 & linux 2.6.16 on > fedora 4 with lvm. > > I''m trying to share a read only /usr across multiple domU''s. > > Logical volume "/dev/vg0/usr" is read only. Within the domU''s fstab > /usr is "ro". Here is the disk option from the domU definition. > > disk = [ ''phy:vg0/fc4,hda1,w'' , > ''phy:vg0/usr,hda2,r'' , > ''phy:vg0/swap,hda3,w'' ] > > This fails with an unable to write block error. > > Now if the vg0/usr volume is specified with ''w'' it works without > complaint until I try to use it in a different domU. Then the complaint > is that it is already in use in another guest domain. > > Q 1: is inability to specify a phy: as read only a bug? > Q 2: what is the proper way to share/use a read only volume among domU''s?Following up on the resolution: I tried various combinations of ro/rw at different levels of the filesystem hierarchy from lvm -> xen domU -> fstab using ext2 & ext3. The only thing that worked for me ''read-only'' was "ext2" formatting. That said, the other domU''s now *happily* share /usr. :m)> > Thanks for any help, > Mike Wright > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Tuesday 25 April 2006 8:16 pm, list user wrote:> The only thing that worked for me ''read-only'' was "ext2" formatting.makes (some) sense, if the only difference betwee ext2 and ext3 is the journalling... and if you don''t write to a filsystem, you don''t ''journal'' it. even so, i think it should be possible to mount as ext3 with options=ro, and it should be exactly the same as mounting as ext2/ro (of course, still no fsck in any case) -- Javier _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Javier Guerra wrote:> On Tuesday 25 April 2006 8:16 pm, list user wrote: > >>The only thing that worked for me ''read-only'' was "ext2" formatting. > > > makes (some) sense, if the only difference betwee ext2 and ext3 is the > journalling... and if you don''t write to a filsystem, you don''t ''journal'' it. > > even so, i think it should be possible to mount as ext3 with options=ro, and > it should be exactly the same as mounting as ext2/ro > > (of course, still no fsck in any case) >Read your post just after I sent a "resolved" to the list. Oh well. Created a test fs with ext3 and set the mount options in fstab to "0 0" and that eliminated the original problem. The domU''s are now sharing /usr with ext3 read-only. Thanks Javier.> > > ------------------------------------------------------------------------ > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users