From owner-freebsd-geom@FreeBSD.ORG Sun Nov 9 14:09:54 2008 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 227651065672 for ; Sun, 9 Nov 2008 14:09:54 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id B480E8FC1D for ; Sun, 9 Nov 2008 14:09:53 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63 (FreeBSD)) (envelope-from ) id 1KzAWH-000P1P-4Y; Sun, 09 Nov 2008 15:40:01 +0200 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id mA9DdnjE050434 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 9 Nov 2008 15:39:49 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id mA9DdnNH072520; Sun, 9 Nov 2008 15:39:49 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id mA9Ddmng072519; Sun, 9 Nov 2008 15:39:48 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 9 Nov 2008 15:39:48 +0200 From: Kostik Belousov To: Pawel Jakub Dawidek Message-ID: <20081109133948.GN18100@deviant.kiev.zoral.com.ua> References: <20081107192150.GA3007@troutmask.apl.washington.edu> <20081109111917.GB2340@garage.freebsd.pl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ueS8F0zlRxS4iow4" Content-Disposition: inline In-Reply-To: <20081109111917.GB2340@garage.freebsd.pl> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.93.3, clamav-milter version 0.93.3 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, SUBJECT_FUZZY_TION autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua X-Virus-Scanned: mail.terabit.net.ua 1KzAWH-000P1P-4Y 19fa5e19b1c3b0c4e77dfde685cea8f5 X-Terabit: YES Cc: Steve Kargl , freebsd-geom@freebsd.org Subject: Re: RW and RO semantic and unable to umount a partition? X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Nov 2008 14:09:54 -0000 --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--