From owner-freebsd-current@FreeBSD.ORG Fri Jan 3 16:15:06 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9CD7EF2 for ; Fri, 3 Jan 2014 16:15:06 +0000 (UTC) Received: from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de [130.133.4.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2EBE61A44 for ; Fri, 3 Jan 2014 16:15:05 +0000 (UTC) Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost.zedat.fu-berlin.de (Exim 4.82) with esmtp (envelope-from ) id <1Vz7Ok-002J0j-JW>; Fri, 03 Jan 2014 17:14:58 +0100 Received: from telesto.geoinf.fu-berlin.de ([130.133.86.198] helo=telesto) by inpost2.zedat.fu-berlin.de (Exim 4.82) with esmtpsa (envelope-from ) id <1Vz7Ok-0028ZW-Fz>; Fri, 03 Jan 2014 17:14:58 +0100 Date: Fri, 3 Jan 2014 17:14:57 +0100 From: "O. Hartmann" To: "Steven Hartland" Subject: Re: ZFS command can block the whole ZFS subsystem! Message-ID: <20140103171457.0fbf0cd4@telesto> In-Reply-To: References: <20140103130021.30569db4@thor.walstatt.dyndns.org> Organization: FU Berlin X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.22; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/qIJdiwaAtXbSayjZ/65qFZf"; protocol="application/pgp-signature" X-Originating-IP: 130.133.86.198 X-ZEDAT-Hint: A Cc: FreeBSD CURRENT X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jan 2014 16:15:06 -0000 --Sig_/qIJdiwaAtXbSayjZ/65qFZf Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Fri, 3 Jan 2014 14:38:03 -0000 "Steven Hartland" wrote: >=20 > ----- Original Message -----=20 > From: "O. Hartmann" > >=20 > > For some security reasons, I dumped via "dd" a large file onto a 3TB > > disk. The systems is 11.0-CURRENT #1 r259667: Fri Dec 20 22:43:56 > > CET 2013 amd64. Filesystem in question is a single ZFS pool. > >=20 > > Issuing the command > >=20 > > "rm dumpfile.txt" > >=20 > > and then hitting Ctrl-Z to bring the rm command into background via > > fg" (I use FreeBSD's csh in that console) locks up the entire > > command and even worse - it seems to wind up the pool in question > > for being exported! >=20 > I cant think of any reason why backgrounding a shell would export a > pool. I sent the job "rm" into background and I didn't say that implies an export of the pool! I said that the pool can not be exported once the bg-command has been issued.=20 >=20 > > I expect to get the command into the background as every other UNIX > > command does when sending Ctrl-Z in the console. Obviously, ZFS > > related stuff in FreeBSD doesn't comply.=20 > >=20 > > The file has been removed from the pool but the console is still > > stuck with "^Z fg" (as I typed this in). Process list tells me: > >=20 > > top > > 17790 root 1 20 0 8228K 1788K STOP 10 0:05 > > 0.00% rm > >=20 > > for the particular "rm" command issued. >=20 > Thats not backgrounded yet otherwise it wouldnt be in the state STOP. As I said - the job never backgrounded, locked up the terminal and makes the whole pool inresponsive. >=20 > > Now, having the file deleted, I'd like to export the pool for > > further maintainance >=20 > Are you sure the delete is complete? Also don't forget ZFS has TRIM by > default, so depending on support of the underlying devices you could > be seeing deletes occuring. Quite sure it didn't! It takes hours (~ 8 now) and the drive is still working, although I tried to stop.=20 >=20 > You can check that gstat -d command report 100% acticity on the drive. I exported the pool in question in single user mode and now try to import it back while in miltiuser mode. Shortly after issuing the command zpool import POOL00 the terminal is stuck again, the drive is working at 100% for two hours now and it seems the great ZFS is deleting every block per pedes. Is this supposed to last days or a week? =20 >=20 > > but that doesn't work with > >=20 > > zpool export -f poolname > >=20 > > This command is now also stuck blocking the terminal and the pool > > from further actions. >=20 > If the delete hasnt completed and is stuck in the kernel this is > to be expected. At this moment I will not imagine myself what will happen if I have to delete several deka terabytes. If the weird behaviour of the current system can be extrapolated, then this is a no-go. > >=20 > > This is painful. Last time I faced the problem, I had to reboot > > prior to take any action regarding any pool in the system, since > > one single ZFS command could obviously block the whole subsystem (I > > tried to export and import). > >=20 > > What is up here? >=20 > Regards > Steve >=20 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > This e.mail is private and confidential between Multiplay (UK) Ltd. > and the person or entity to whom it is addressed. In the event of > misdirection, the recipient is prohibited from using, copying, > printing or otherwise disseminating it or any information contained > in it.=20 >=20 > In the event of misdirection, illegible or incomplete transmission > please telephone +44 845 868 1337 or return the E.mail to > postmaster@multiplay.co.uk. Regards, Oliver --Sig_/qIJdiwaAtXbSayjZ/65qFZf Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQEcBAEBAgAGBQJSxuICAAoJEOgBcD7A/5N8E88IAIK3oaDby+H0PhAepujc3LB+ iWRPVADTz3RF/IAfYAxvaCzNejfV7T4dKjOxkFhFK/rTK996NuvJ9/63IvhwOwjO 4/WpIjbrFKWF1tiMfd6DA3tmysOmdC1oir4bE0GbIJuzi/RsfCGs9LkHVUpPZyuZ jB56kKA9KDaegX3AZvqUsLvUl5Isd6xnje1TjFkSD/KbeCOgOpvn8d+EdGXoXXON orOcfy4knDqb/ZDiRhmwKRK8MMQS5ZRFqimIk1nMtjcLBnAC7CG4izoalxL+RvAL boPp5jdyNm6wilQnzEoSlyXwsREkAEwrqZpe67KdDKCa7ZKEoH4KoR12aOeEIgQ= =8174 -----END PGP SIGNATURE----- --Sig_/qIJdiwaAtXbSayjZ/65qFZf--