Hello, It is well known that mounting a filesystem read write on two places simultaneously destroys systematically this filesystem. I done a script that mount read only the filesystem of a domU on the dom0. Bad idea : after a while, the filesystem becomes read-only to the domU, although mounts appear to be rw. At the reboot of this domU, the root filesystem were corrupted and the domU entered in maintenance mode. The fsck fixed the inconsistency and now things seem to be OK. Big fear. I don''t understand how a read-only mount can corrupt a filesystem. Does it mean that something is written on the device, even if it is read-only ? Or does the read-only mount disturb the regular disk activity that is mounted rw elsewhere ? I am interested by your advice on this problem. Thanks. Alain. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Javier Guerra Giraldez
2008-Jun-04 12:23 UTC
Re: [Xen-users] Bad experience in mounting a domU disk
On Wednesday 04 June 2008, Alain Barthe wrote:> I don''t understand how a read-only mount can corrupt a filesystem. Does it > mean that something is written on the device, even if it is read-only ? Or > does the read-only mount disturb the regular disk activity that is mounted > rw elsewhere ?remember that even a r/o mount uses cache, so if somebody else (the DomU) writes to the filesystem, the Dom0 cache will be wrong and inconsistent. this inconsistency has been known to hang the r/o domain. i was surprised that the FS was corrupted on disk, but i guess the Dom0 process that serves the block device to DomU have it as r/w, but doesn''t know about DomU''s caches. usually it''s OK, but it might have interfered with the r/o FS''s cache, on the same Dom0. -- Javier _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Wed, Jun 04, 2008 at 11:00:43AM +0200, Alain Barthe wrote: Hello,> I don''t understand how a read-only mount can corrupt a filesystem. Does it > mean that something is written on the device, even if it is read-only ? Or > does the read-only mount disturb the regular disk activity that is mounted > rw elsewhere ?Many journalled filesystems do replay journal even if mounted with ''ro'' option. XFS has norecovery option to truly read-only disk access. Similar option has been recently added to ext3. I think that the best approach is to take LVM snapshot of domU filesystem and then mount (with journal replayed) that snapshot. Regards, Kupson -- Great software without the knowledge to run it is pretty useless. (Linux Gazette #1) _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
2008/6/4 Rafał Kupka <rkupka+Listy.Xen@pronet.com.pl<rkupka%2BListy.Xen@pronet.com.pl>>:> On Wed, Jun 04, 2008 at 11:00:43AM +0200, Alain Barthe wrote: > > Many journalled filesystems do replay journal even if mounted with 'ro' > option. XFS has norecovery option to truly read-only disk access. > Similar option has been recently added to ext3. > > I think that the best approach is to take LVM snapshot of domU > filesystem and then mount (with journal replayed) that snapshot. >Thanks Rafal and Javier for your explanation, I begin to understand what happened. The ext3 fs has the option "noload" to disable the load of the journal. I looked for something like "nocache" to disable the cache, but it appears not to exist. My goal in mounting the filesystem of a alive domU is to monitor it (content of key files, free space, etc) in a non intrusive manner. Dealing with LVM snapshot is not obvious as we have no place enough for that. Does somebody have a similar need ? Thanks again. Alain. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Andreï V. Fomitchev
2008-Jun-04 16:00 UTC
Re: [Xen-users] Bad experience in mounting a domU disk
Hi, I am studying XEN for a project and I am trying to answer similar questions. Currently, I think NFS "partition" and/or libvirt based application. Best regards, --- En date de : Mer 4.6.08, Alain Barthe <ab266061@gmail.com> a écrit : De: Alain Barthe <ab266061@gmail.com> Objet: Re: [Xen-users] Bad experience in mounting a domU disk À: xen-users@lists.xensource.com Date: Mercredi 4 Juin 2008, 17h47 2008/6/4 Rafał Kupka <rkupka+Listy.Xen@pronet.com.pl>: On Wed, Jun 04, 2008 at 11:00:43AM +0200, Alain Barthe wrote: Many journalled filesystems do replay journal even if mounted with ''ro'' option. XFS has norecovery option to truly read-only disk access. Similar option has been recently added to ext3. I think that the best approach is to take LVM snapshot of domU filesystem and then mount (with journal replayed) that snapshot. Thanks Rafal and Javier for your explanation, I begin to understand what happened. The ext3 fs has the option "noload" to disable the load of the journal. I looked for something like "nocache" to disable the cache, but it appears not to exist. My goal in mounting the filesystem of a alive domU is to monitor it (content of key files, free space, etc) in a non intrusive manner. Dealing with LVM snapshot is not obvious as we have no place enough for that. Does somebody have a similar need ? Thanks again. Alain. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users __________________________________________________ Do You Yahoo!? En finir avec le spam? Yahoo! Mail vous offre la meilleure protection possible contre les messages non sollicités http://mail.yahoo.fr Yahoo! Mail _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Nuno Fernandes
2008-Jun-04 17:27 UTC
Re: [Xen-users] Bad experience in mounting a domU disk
On Wednesday 04 June 2008 16:47:07 Alain Barthe wrote:> 2008/6/4 Rafał Kupka > <rkupka+Listy.Xen@pronet.com.pl<rkupka%2BListy.Xen@pronet.com.pl> > > > On Wed, Jun 04, 2008 at 11:00:43AM +0200, Alain Barthe wrote: > > > > Many journalled filesystems do replay journal even if mounted with ''ro'' > > option. XFS has norecovery option to truly read-only disk access. > > Similar option has been recently added to ext3. > > > > I think that the best approach is to take LVM snapshot of domU > > filesystem and then mount (with journal replayed) that snapshot. > > Thanks Rafal and Javier for your explanation, I begin to understand what > happened. > > The ext3 fs has the option "noload" to disable the load of the journal. I > looked for something like "nocache" to disable the cache, but it appears > not to exist. > > My goal in mounting the filesystem of a alive domU is to monitor it > (content of key files, free space, etc) in a non intrusive manner. Dealing > with LVM snapshot is not obvious as we have no place enough for that. > > Does somebody have a similar need ?if the filesystem is ext3, mount it ext2 and read-only.. It won''t replay the journal as ext2 doesn''t have any journal support... Best regards, Nuno Fernandes> > Thanks again. > > Alain._______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users