Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Nov 2008 15:39:48 +0200
From:      Kostik Belousov <kostikbel@gmail.com>
To:        Pawel Jakub Dawidek <pjd@freebsd.org>
Cc:        Steve Kargl <sgk@troutmask.apl.washington.edu>, freebsd-geom@freebsd.org
Subject:   Re: RW and RO semantic and unable to umount a partition?
Message-ID:  <20081109133948.GN18100@deviant.kiev.zoral.com.ua>
In-Reply-To: <20081109111917.GB2340@garage.freebsd.pl>
References:  <20081107192150.GA3007@troutmask.apl.washington.edu> <20081109111917.GB2340@garage.freebsd.pl>

next in thread | previous in thread | raw e-mail | index | archive | help

--ueS8F0zlRxS4iow4
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Nov 09, 2008 at 12:19:17PM +0100, Pawel Jakub Dawidek wrote:
> On Fri, Nov 07, 2008 at 11:21:50AM -0800, Steve Kargl wrote:
> > So, I may have done something in the category of "Don't do that!".
> >=20
> > On node n19, I export /dev/ad4s1e and combine it into a mirror
> > on node n18 with n18's /dev/ad4s1e.  On n18 I have /dev/mirror/data,
> > and I've successfully mounted /dev/mirror/data:
> >=20
> > n18:root[32] mount /dev/mirror/data /data
> >=20
> > Now, I tried the the following:
> >=20
> > On n18, I created /etc/gg.exports
> >=20
> > n18:root[33] cat /etc/gg.exports
> > 192.168.0.17 RW /dev/mirror/data
> > n18:root[34] ggated -v
> >=20
> > On node n17 (yes, a third system).  I do
> >=20
> > n17:root[08] ggatec create -o rw 192.168.0.18 /dev/mirror/data
> >=20
> > The above command does not create /dev/ggate0.  So, I tried=20
>=20
> Because /dev/mirror/data is already open for writting by UFS. If you
> unmount /data on n18, you will be able to attach /dev/mirror/data on n17
> for writting.
>=20
> > ggatec create -o ro 192.168.0.18 /dev/mirror/data
> >=20
> > This created the /dev/ggate0 device.  Now, the interesting
> > part
> >=20
> > n17:root[10] mount /dev/ggate0 /mnt
> > n17:root[11] ls /mnt
> > .snap/  fcurra/ kargl/
> > n17:root[12] umount /mnt
> > umount: unmount of /mnt failed: Operation not permitted
> > n17:root[13] umount -f /mnt
> > umount: unmount of /mnt failed: Operation not permitted
> >=20
> > Three questions.  Why is RW not permitted?  Why does umount
> > fail?  How the heck to I force umount or the unmounting of /mnt?
>=20
> Not sure why. It might be that file system changed under you (node n18
> modified it), so now n17 sees some strange inconsistencies.
>=20
> All in all, you can eigher mount the same file system multiple times
> read-only OR one time read-write and zero times read-only.

Better not mount ufs volume more then once regardless of the mount mode.
See the start of the ffs_mountfs(). ffs mount modifies devvp bufobj with
reference to geom consumer.

--ueS8F0zlRxS4iow4
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (FreeBSD)

iEYEARECAAYFAkkW6CQACgkQC3+MBN1Mb4ht4QCeICjRs4f6sU3E5B2FwwceN5sB
sC0AoITKVLjgiSblDthbP8JwcNv2iZwa
=HhYT
-----END PGP SIGNATURE-----

--ueS8F0zlRxS4iow4--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081109133948.GN18100>