From owner-freebsd-geom@FreeBSD.ORG Sun Nov 9 09:58:24 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 33718106564A for ; Sun, 9 Nov 2008 09:58:24 +0000 (UTC) (envelope-from jmrueda@diatel.upm.es) Received: from edison.ccupm.upm.es (edison.ccupm.upm.es [138.100.4.49]) by mx1.freebsd.org (Postfix) with ESMTP id B43988FC12 for ; Sun, 9 Nov 2008 09:58:23 +0000 (UTC) (envelope-from jmrueda@diatel.upm.es) Received: from smtp.euitt.upm.es (acherontia2.euitt.upm.es [138.100.52.79]) by edison.ccupm.upm.es (8.13.8/8.13.8) with ESMTP id mA99lTYP013189 for ; Sun, 9 Nov 2008 10:47:30 +0100 Received: from localhost (localhost [127.0.0.1]) by smtp.euitt.upm.es (Postfix) with ESMTP id 7DFF956439 for ; Sun, 9 Nov 2008 10:47:29 +0100 (CET) Received: from smtp.euitt.upm.es ([127.0.0.1]) by localhost (smtp.euitt.upm.es [127.0.0.1]) (amavisd-new, port 11124) with ESMTP id 5p5pr+Duy0vt for ; Sun, 9 Nov 2008 10:47:18 +0100 (CET) Received: from aurora.diatel.upm.es (unknown [138.100.49.70]) (Authenticated sender: jmrueda) by smtp.euitt.upm.es (Postfix) with ESMTPSA id A3A5256424 for ; Sun, 9 Nov 2008 10:47:18 +0100 (CET) Received: from [172.29.9.10] ([172.29.9.10]) by aurora.diatel.upm.es (8.14.2/8.14.2) with ESMTP id mA99lDDX015264 for ; Sun, 9 Nov 2008 10:47:14 +0100 (CET) (envelope-from jmrueda@diatel.upm.es) Message-ID: <4916B19B.7000803@diatel.upm.es> Date: Sun, 09 Nov 2008 10:47:07 +0100 From: =?ISO-8859-1?Q?Javier_Mart=EDn_Rueda?= User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: freebsd-geom@freebsd.org References: <20081107192150.GA3007@troutmask.apl.washington.edu> In-Reply-To: <20081107192150.GA3007@troutmask.apl.washington.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit 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 09:58:24 -0000 Steve Kargl escribió: > So, I may have done something in the category of "Don't do that!". > > 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: > > n18:root[32] mount /dev/mirror/data /data > > Now, I tried the the following: > > On n18, I created /etc/gg.exports > > n18:root[33] cat /etc/gg.exports > 192.168.0.17 RW /dev/mirror/data > n18:root[34] ggated -v > > On node n17 (yes, a third system). I do > > n17:root[08] ggatec create -o rw 192.168.0.18 /dev/mirror/data > > The above command does not create /dev/ggate0. So, I tried > > ggatec create -o ro 192.168.0.18 /dev/mirror/data > > This created the /dev/ggate0 device. Now, the interesting > part > > 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 > > Three questions. Why is RW not permitted? Why does umount > fail? How the heck to I force umount or the unmounting of /mnt? > > > RW is not permitted because gmirror has already opened /dev/ad4s1e for RW. The rule is this: you can open a geom provider (disks are also geom providers) RW only once at a time, but you can open a geom provider RO as many times as you want simultaneously or even combine it with one (and only one) RW open. I'm not 100% sure about the umount, but I imagine that, as you mounted it read-write, when you unmount it, it attempts to update the superblock and ggate denies the write because the device is read-only. With regards to forcing the umount, have you tried umount -f /mnt? Finally, even if you manage somehow to open a filesystem RW from two different systems, don't do that. The UFS filesystem is designed so that the disk store is managed by a single kernel, and if you modify it from two or more different kernels at the same time, you will definitely get corruption and panics. From owner-freebsd-geom@FreeBSD.ORG Sun Nov 9 11:50:18 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 7371C1065677 for ; Sun, 9 Nov 2008 11:50:18 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (chello087206045082.chello.pl [87.206.45.82]) by mx1.freebsd.org (Postfix) with ESMTP id C3CB58FC1B for ; Sun, 9 Nov 2008 11:50:16 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 146D245B26; Sun, 9 Nov 2008 12:19:25 +0100 (CET) Received: from localhost (chello087206045082.chello.pl [87.206.45.82]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id C4B6F45684; Sun, 9 Nov 2008 12:19:19 +0100 (CET) Date: Sun, 9 Nov 2008 12:19:17 +0100 From: Pawel Jakub Dawidek To: Steve Kargl Message-ID: <20081109111917.GB2340@garage.freebsd.pl> References: <20081107192150.GA3007@troutmask.apl.washington.edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="aM3YZ0Iwxop3KEKx" Content-Disposition: inline In-Reply-To: <20081107192150.GA3007@troutmask.apl.washington.edu> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 8.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=BAYES_00 autolearn=ham version=3.0.4 Cc: 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 11:50:18 -0000 --aM3YZ0Iwxop3KEKx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 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. > 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? Not sure why. It might be that file system changed under you (node n18 modified it), so now n17 sees some strange inconsistencies. 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. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --aM3YZ0Iwxop3KEKx Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFJFsc0ForvXbEpPzQRAp+6AJ0VaVHDniS65VE0XWq8ZKJbJ1zn+ACgiv9L 4ZWkEyiDNkfHc/OKcFujHdY= =W/LL -----END PGP SIGNATURE----- --aM3YZ0Iwxop3KEKx-- 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-- From owner-freebsd-geom@FreeBSD.ORG Sun Nov 9 17:09:10 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 38B851065676 for ; Sun, 9 Nov 2008 17:09:10 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (chello087206045082.chello.pl [87.206.45.82]) by mx1.freebsd.org (Postfix) with ESMTP id 890ED8FC1B for ; Sun, 9 Nov 2008 17:09:09 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id C862145B36; Sun, 9 Nov 2008 18:09:07 +0100 (CET) Received: from localhost (chello087206045082.chello.pl [87.206.45.82]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id DF6B7456AB; Sun, 9 Nov 2008 18:09:02 +0100 (CET) Date: Sun, 9 Nov 2008 18:09:00 +0100 From: Pawel Jakub Dawidek To: Kostik Belousov Message-ID: <20081109170900.GC2340@garage.freebsd.pl> References: <20081107192150.GA3007@troutmask.apl.washington.edu> <20081109111917.GB2340@garage.freebsd.pl> <20081109133948.GN18100@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Sr1nOIr3CvdE5hEN" Content-Disposition: inline In-Reply-To: <20081109133948.GN18100@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 8.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-2.6 required=3.0 tests=BAYES_00 autolearn=ham version=3.0.4 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 17:09:10 -0000 --Sr1nOIr3CvdE5hEN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Nov 09, 2008 at 03:39:48PM +0200, Kostik Belousov wrote: > On Sun, Nov 09, 2008 at 12:19:17PM +0100, Pawel Jakub Dawidek wrote: > > 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. >=20 > 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. Yes, I know, I even had patch for that, although here I was talking about mounting the same FS read-only on few separate machines using ggate. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --Sr1nOIr3CvdE5hEN Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFJFxkrForvXbEpPzQRAqCNAJ99HJFbObJJ5AtV6N0656xmfJM7WQCeKC0C nQeBYVNV/dy3svKnFkwS0oc= =Jbok -----END PGP SIGNATURE----- --Sr1nOIr3CvdE5hEN-- From owner-freebsd-geom@FreeBSD.ORG Sun Nov 9 17:38:56 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 BAB061065670; Sun, 9 Nov 2008 17:38:56 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.208.78.105]) by mx1.freebsd.org (Postfix) with ESMTP id 857968FC0C; Sun, 9 Nov 2008 17:38:56 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.3/8.14.3) with ESMTP id mA9HcuG3018514; Sun, 9 Nov 2008 09:38:56 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.3/8.14.3/Submit) id mA9HcuYW018513; Sun, 9 Nov 2008 09:38:56 -0800 (PST) (envelope-from sgk) Date: Sun, 9 Nov 2008 09:38:56 -0800 From: Steve Kargl To: Pawel Jakub Dawidek Message-ID: <20081109173856.GA18430@troutmask.apl.washington.edu> References: <20081107192150.GA3007@troutmask.apl.washington.edu> <20081109111917.GB2340@garage.freebsd.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081109111917.GB2340@garage.freebsd.pl> User-Agent: Mutt/1.4.2.3i Cc: 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 17:38:56 -0000 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!". > > > > 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: > > > > n18:root[32] mount /dev/mirror/data /data > > > > Now, I tried the the following: > > > > On n18, I created /etc/gg.exports > > > > n18:root[33] cat /etc/gg.exports > > 192.168.0.17 RW /dev/mirror/data > > n18:root[34] ggated -v > > > > On node n17 (yes, a third system). I do > > > > n17:root[08] ggatec create -o rw 192.168.0.18 /dev/mirror/data > > > > The above command does not create /dev/ggate0. So, I tried > > 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. > Thanks for the reply. Unfortunately, my experiment with geom leads me to believe that it lacks the features that I need. My attempts at using geom with n17 has necessitated a re-install of the OS because n17 can no longer use NFS to mount filesystems without a Read/Write error. -- Steve From owner-freebsd-geom@FreeBSD.ORG Mon Nov 10 11:06:51 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 072E810656A3 for ; Mon, 10 Nov 2008 11:06:51 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id E25AE8FC16 for ; Mon, 10 Nov 2008 11:06:50 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id mAAB6oVW049718 for ; Mon, 10 Nov 2008 11:06:50 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id mAAB6oAm049714 for freebsd-geom@FreeBSD.org; Mon, 10 Nov 2008 11:06:50 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 10 Nov 2008 11:06:50 GMT Message-Id: <200811101106.mAAB6oAm049714@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-geom@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-geom@FreeBSD.org 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: Mon, 10 Nov 2008 11:06:51 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/128529 geom [gjournal] root FS on GEOM Journal cannot boot when jo o kern/128398 geom [PATCH] glabel(8): teach geom_label to recognise gpt l f kern/128276 geom [gmirror] machine lock up when gmirror module is used o kern/126902 geom [geom] [geom_label] Kernel panic during install boot o kern/124973 geom [gjournal] [patch] boot order affects geom_journal con o kern/124969 geom gvinum(8): gvinum raid5 plex does not detect missing s o kern/124294 geom [geom] gmirror(8) have inappropriate logic when workin o kern/124130 geom [gmirror][usb] gmirror fails to start usb devices that o kern/123962 geom [panic] [gjournal] gjournal (455Gb data, 8Gb journal), o kern/123630 geom [patch] [gmirror] gmirror doesnt allow the original dr o kern/123122 geom [geom] GEOM / gjournal kernel lock f kern/122415 geom [geom] UFS labels are being constantly created and rem o kern/122067 geom [geom] [panic] Geom crashed during boot o kern/121559 geom [patch] [geom] geom label class allows to create inacc o kern/121364 geom [gmirror] Removing all providers create a "zombie" mir o kern/120231 geom [geom] GEOM_CONCAT error adding second drive o kern/120044 geom [msdosfs] [geom] incorrect MSDOSFS label fries adminis o kern/120021 geom [geom] [panic] net-p2p/qbittorrent crashes system when o kern/119743 geom [geom] geom label for cds is keeped after dismount and f kern/115547 geom [geom] [patch] [request] let GEOM Eli get password fro o kern/114532 geom [geom] GEOM_MIRROR shows up in kldstat even if compile o kern/113957 geom [gmirror] gmirror is intermittently reporting a degrad o kern/113885 geom [gmirror] [patch] improved gmirror balance algorithm o kern/113837 geom [geom] unable to access 1024 sector size storage o kern/113419 geom [geom] geom fox multipathing not failing back p bin/110705 geom gmirror(8) control utility does not exit with correct o kern/107707 geom [geom] [patch] [request] add new class geom_xbox360 to o kern/104389 geom [geom] [patch] sys/geom/geom_dump.c doesn't encode XML o kern/98034 geom [geom] dereference of NULL pointer in acd_geom_detach o kern/94632 geom [geom] Kernel output resets input while GELI asks for o kern/90582 geom [geom] [panic] Restore cause panic string (ffs_blkfree o bin/90093 geom fdisk(8) incapable of altering in-core geometry a kern/89660 geom [vinum] [patch] [panic] due to g_malloc returning null o kern/89546 geom [geom] GEOM error s kern/89102 geom [geom] [panic] panic when forced unmount FS from unplu o kern/87544 geom [gbde] mmaping large files on a gbde filesystem deadlo o kern/84556 geom [geom] GBDE-encrypted swap causes panic at shutdown o kern/79251 geom [2TB] newfs fails on 2.6TB gbde device o kern/79035 geom [vinum] gvinum unable to create a striped set of mirro o bin/78131 geom gbde(8) "destroy" not working. s kern/73177 geom kldload geom_* causes panic due to memory exhaustion 41 problems total. From owner-freebsd-geom@FreeBSD.ORG Mon Nov 10 11:41:27 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 177081065686 for ; Mon, 10 Nov 2008 11:41:27 +0000 (UTC) (envelope-from gcubfg-freebsd-geom@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id 8B8F58FC2E for ; Mon, 10 Nov 2008 11:41:26 +0000 (UTC) (envelope-from gcubfg-freebsd-geom@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1KzV91-0002RG-Pu for freebsd-geom@freebsd.org; Mon, 10 Nov 2008 11:41:23 +0000 Received: from 195.208.174.178 ([195.208.174.178]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 10 Nov 2008 11:41:23 +0000 Received: from vadim_nuclight by 195.208.174.178 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 10 Nov 2008 11:41:23 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-geom@freebsd.org From: Vadim Goncharov Date: Mon, 10 Nov 2008 11:41:15 +0000 (UTC) Organization: Nuclear Lightning @ Tomsk, TPU AVTF Hostel Lines: 46 Message-ID: References: <48FF2607.10807@icyb.net.ua> <63F8346D-0116-4F41-BCAA-C235E9657BD8@mac.com> <48FF82BA.3020309@icyb.net.ua> <48FF913A.9070700@icyb.net.ua> <7334715F-FAE1-40EE-92EB-468041587410@mac.com> <0244407E-F10C-4374-9D68-557C1DA31EB3@mac.com> X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 195.208.174.178 X-Comment-To: Marcel Moolenaar User-Agent: slrn/0.9.8.1 (FreeBSD) Sender: news Subject: Re: gpart oddity X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: vadim_nuclight@mail.ru List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2008 11:41:27 -0000 Hi Marcel Moolenaar! On Wed, 05 Nov 2008 09:28:19 -0800; Marcel Moolenaar wrote about 'Re: gpart oddity': >> The question is, how much strict it is? Currently I have an 6.2-S >> system with >> gmirror(8)'ed slices, not disks, as it was converted from existing >> system >> with different sizes of disks. I have had edit their labels that >> partition >> 'c' doesn't cover entire unit (and last partition was reformatted to >> be not >> truncated, too). This is needed to be sure that last sector gets not >> overwritten by gmirror(8) metadata, but bsdlabel(8) always complains >> about it >> that it doesn't cover bla-bla-bla. Moreover, labeled partitions and >> slices >> exist on their own, despite of gmirror(8). And yet more, if I try to >> do a >> bsdlabel(8) on a gm0, it will complain about 63 sectors boot offset, >> while >> on ad0s1 it will not, so I need to hack a lot if I need to resize >> partitions. >> >> What is the cause of the trouble? > From what you tell, I think the problem is caused by > forcing the proverbial square peg into the proverbial > round hole. > We made it too easy for people to create invalid labels > because we simply didn't do any real sanity checking > and/or didn't provide any real tools to help the user > achieve what they want. > The fact that gmirror puts the metadata in the last > sector and only adjusts the media size of the provider > when in use, means that we have introduced ambiguity > in how the GEOMs are stacked and while the gmirror > approach is a feature on the one hand, we have done so > without regard for the validity of disklabels. We > handwaved the problems as unimportant or aesthetic. But the question is, what I will have to do with my setup? Will it still work in future versions? -- WBR, Vadim Goncharov. ICQ#166852181 mailto:vadim_nuclight@mail.ru [Moderator of RU.ANTI-ECOLOGY][FreeBSD][http://antigreen.org][LJ:/nuclight] From owner-freebsd-geom@FreeBSD.ORG Mon Nov 10 11:50:04 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 CE9391065677 for ; Mon, 10 Nov 2008 11:50:04 +0000 (UTC) (envelope-from gcubfg-freebsd-geom@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id 4E03F8FC1D for ; Mon, 10 Nov 2008 11:50:04 +0000 (UTC) (envelope-from gcubfg-freebsd-geom@m.gmane.org) Received: from root by ciao.gmane.org with local (Exim 4.43) id 1KzVHP-0002nR-4H for freebsd-geom@freebsd.org; Mon, 10 Nov 2008 11:50:03 +0000 Received: from 195.208.174.178 ([195.208.174.178]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 10 Nov 2008 11:50:03 +0000 Received: from vadim_nuclight by 195.208.174.178 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 10 Nov 2008 11:50:03 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-geom@freebsd.org From: Vadim Goncharov Date: Mon, 10 Nov 2008 11:45:54 +0000 (UTC) Organization: Nuclear Lightning @ Tomsk, TPU AVTF Hostel Lines: 45 Message-ID: References: <9e77bdb50810011331y7216eac3yf85907f96f5e8370@mail.gmail.com> <7353F23F-F944-47C9-A97D-6DE247F958AE@mac.com> <0A1A5002-A643-4738-B775-5E450C02486A@mac.com> X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 195.208.174.178 X-Comment-To: Marcel Moolenaar User-Agent: slrn/0.9.8.1 (FreeBSD) Sender: news Subject: Re: Experiences with Gpart X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: vadim_nuclight@mail.ru List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2008 11:50:04 -0000 Hi Marcel Moolenaar! On Wed, 05 Nov 2008 09:39:43 -0800; Marcel Moolenaar wrote about 'Re: Experiences with Gpart': >>>>>>> Despite the intent of gpt's being to make such nesting >>>>>>> unnecessary, as >>>>>>> a means of defining the structure of gmirrors, which take up the >>>>>>> entire extent of whatever encloses them, the nesting was very >>>>>>> helpful. >>>>>> >>>>>> Maybe nesting simply works if you comment the first if in >>>>>> g_part_gpt_probe() in >>>>>> sys/geom/part/g_part_gpt.c ? I don't get why this is restricted, >>>>>> should be >>>>>> my >>>>>> decision to nest or not imo. >>>>> >>>>> Nesting is not allowed as per the GPT specification. >>>> >>>> OK. It doesn't make much sense for slices too, but is still allowed. >>> A nested MBR provides for backward compatibility by >>> presenting a GPT partition as a drive to those legacy >>> OSes or tools. I don't think it was needed, but it >>> was envisioned that way, AFAICT. It makes sense in a >>> weird way. >> >> But, allowing for configuring partitioning as user wants (and >> complex nesting, >> if one wish) was always strong benefit of the GEOM. So why not? It >> is allowed >> author of this thread to manage mirrors the way he wants, not the >> way somebody >> enforces. Unix is tools, not policy (c) > > Gratuitous non-compliance in the name of freedom is > not the Unix-way of things. Unix always had at least knob allow_me_to_shoot_in_the_foot, if now allowed this directly. So what alternative do you propose to group partitions together or to split GPT partitions? bsdlabel? But that is limited to 26 partitions and 2^32 sectors. -- WBR, Vadim Goncharov. ICQ#166852181 mailto:vadim_nuclight@mail.ru [Moderator of RU.ANTI-ECOLOGY][FreeBSD][http://antigreen.org][LJ:/nuclight] From owner-freebsd-geom@FreeBSD.ORG Tue Nov 11 13:24:50 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 00C28106568E for ; Tue, 11 Nov 2008 13:24:50 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 1FFEE8FC0C for ; Tue, 11 Nov 2008 13:24:48 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id PAA28569 for ; Tue, 11 Nov 2008 15:24:47 +0200 (EET) (envelope-from avg@icyb.net.ua) Message-ID: <4919879E.5080900@icyb.net.ua> Date: Tue, 11 Nov 2008 15:24:46 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.17 (X11/20081106) MIME-Version: 1.0 To: freebsd-geom@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: "unused" partition: disklabel vs. gpart 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: Tue, 11 Nov 2008 13:24:50 -0000 It seems that there is a difference in how disklabel-based code and part code handle partitions with type "unused". As I understand disklabel sees a difference between partitions that do not exist (i.e. lines are not there in disklabel output) and partitions marked unused. geom_bsd code doesn't create devices for the former and does create for the latter. On the other hand geom_part_bsd code seems to treat "unused" as non-existent and doesn't create device for them and doesn't display them in gpart show output. E.g. I had a label with a single partition 'd' with type unused. I actually put ZFS pool into this partition, but marked it 'unused', so that some smart scripts on certain live cds do not try to mount or swappon the partitions. This worked OK with geom_bsd, but geom_part_bsd considered the slice entirely empty, it didn't find the 'd' partition in it. -- Andriy Gapon From owner-freebsd-geom@FreeBSD.ORG Tue Nov 11 13:35:25 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 EB8041065689; Tue, 11 Nov 2008 13:35:25 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id D15EF8FC37; Tue, 11 Nov 2008 13:35:24 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id PAA29352; Tue, 11 Nov 2008 15:35:23 +0200 (EET) (envelope-from avg@icyb.net.ua) Message-ID: <49198A1A.3080600@icyb.net.ua> Date: Tue, 11 Nov 2008 15:35:22 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.17 (X11/20081106) MIME-Version: 1.0 To: freebsd-geom@freebsd.org, freebsd-fs@freebsd.org References: <4911C3E9.405@icyb.net.ua> In-Reply-To: <4911C3E9.405@icyb.net.ua> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Subject: Re: zfs: affected by geom_(mbr|bsd) => geom_part_(mbr|bsd) ? 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: Tue, 11 Nov 2008 13:35:26 -0000 on 05/11/2008 18:03 Andriy Gapon said the following: > Using GENERIC amd64 7-BETA2 system (installed from "official" ISO) I > partitioned my disk for ZFS root file system more or less as described here: > https://ish.com.au/solutions/articles/freebsdzfs > > Big difference is that I created a separate slice to contain a partition > for ZFS pool, so that ZFS pool is ad4s2d (and UFS2 boot is ad4s1a). > > Everything was fine, ZFS root was mounted as expected. > > Then I built a custom kernel with nooptions for GEOM_(BSD|MBR) and > options for GEOM_PART_(BSD|MBR). When I tried to boot this kernel it > couldn't mount ZFS root and I simply rebooted my machine when I stuck at > mountroot prompt (I couldn't enter UFS2 root because of unrelated > keyboard problem). > The boot was verbose and I didn't see any peculiar GEOM or GEOM_PART > messages (errors, warnings). > > I'll try to debug this further by booting into UFS root and running > gpart, but I'd like to ask for an advice upfront. So I did this. Here are some data: $ gpart show => 63 976773105 ad6 MBR (500.1GB) 63 12578832 1 freebsd [active] (6.4GB) 12578895 964189170 2 freebsd (493.7GB) 976768065 5103 - free - (2.6MB) => 0 12578832 ad6s1 BSD (6.4GB) 0 16 - free - (8.2KB) 16 2097152 1 freebsd-ufs (1073.7MB) 2097168 2097152 - free - (1073.7MB) 4194320 8384512 2 freebsd-swap (4.3GB) => 0 964189170 ad6s2 BSD (493.7GB) 0 16 - free - (8.2KB) 16 964189154 4 freebsd-swap (493.7GB) $ zpool status pool: tank state: UNAVAIL status: One or more devices could not be opened. There are insufficient replicas for the pool to continue functioning. action: Attach the missing device and online it using 'zpool online'. see: http://www.sun.com/msg/ZFS-8000-D3 scrub: none requested config: NAME STATE READ WRITE CKSUM tank UNAVAIL 0 0 0 insufficient replicas ad6s2d UNAVAIL 0 0 0 cannot open So gpart sees ad6s2d perfectly well, it has the same parameters as disklabel previously reported and /dev/ad6s2d exists. But zfs "cannot open" it. What I did next was: 1. reboot into "disklabel" kernel single-user 2. zpool export tank 3. reboot into gpart kernel single-user 4. zpool import - it saw tank correctly 5. zpool import tank 6. profit! :-) As I see it, zpool.cache contained something about ad6s2d that prevented gpart ad6s2d from being recognized as the same device as "disklabel" one. I really wonder what that could have been? Or maybe gpart reported some subtle property of the device differently... -- Andriy Gapon