Date: Wed, 29 Nov 2006 16:25:11 +0200 From: Kostik Belousov <kostikbel@gmail.com> To: Jason Vance <jason@theyhost.com> Cc: freebsd-stable@freebsd.org Subject: Re: Is there conflicts between gmirror and a quota enabled filesystem? Message-ID: <20061129142511.GE69556@deviant.kiev.zoral.com.ua> In-Reply-To: <033101c713bd$eac76030$18f48a59@Uhura> References: <20061129120046.8999F16A65C@hub.freebsd.org> <033101c713bd$eac76030$18f48a59@Uhura>
next in thread | previous in thread | raw e-mail | index | archive | help
--Ns7jmDPpOpCD+GE/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 29, 2006 at 05:54:40AM -0800, Jason Vance wrote: > Posted Monday Nov 27th. >=20 > Is there a known conflict between gmirror and a quota enabled filesystem? >=20 > ---- >=20 > I have a FreeBSD 5.5-STABLE box that is setup with a gmirror RAID 1 using > two identical harddrives. >=20 > I installed quotas on the filesystem by enabling it 'options QUOTA' and > rebuilding the kernel. I added userquota to the /etc/fstab for the /usr > partition and I added 'enable_quotas=3DYES' and 'check_quotas=3DNO' to the > /etc/rc.conf file thinking i can get it to build the quota table on the f= ly > instead of it doing that at boot time. >=20 > The system boots up but as soon as I do any disk access ie 'repquota -a' = or > write a file to the harddrive, the system hangs. I can still connect to t= he > various services via telnet to their port, but none of them respond. >=20 > Now that I've disabled quotas I am able to use the system however fsck has > reported many various file corruptions and destroyed some of my important > system files. >=20 > Is there a known conflict between gmirror and a quota enabled filesystem? > How can I properly set these up? I think this has nothing to do with gmirror. It's the situation described in PR kern/30958. The actual problem is the following call sequence: some process (it may be even a syncer) tries to write the quota (for instance, syncer called ffs_sync, that calls qsync(), that calls dqsync()). dqsync() issues VOP_WRITE() on the quota file, while locked the corresponding dquot. Since file needs to be extended, ffs_balloc_* is entered. There, call to ffs_alloc checks for quota of the owner of the quota file, entering chkdq. This leads to deadlock, since chkdq waits while dqout becomes unlocked. I believe that this scenario is fixed in my mp-safe quota patch. See http://people.freebsd.org/~kib/quotagiant for the patch against CURRENT. As workaround, use quotacheck before enabling quota. --Ns7jmDPpOpCD+GE/ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFbZhGC3+MBN1Mb4gRAgudAKCXR5FpYkS4BbxaCItiHq1GlKVaTQCgm5cD sXa/Jd8g9fMTZJQ+kLME9D0= =qg3z -----END PGP SIGNATURE----- --Ns7jmDPpOpCD+GE/--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061129142511.GE69556>