From owner-freebsd-current@FreeBSD.ORG Fri Jan 3 14:38:21 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C41BA6E8 for ; Fri, 3 Jan 2014 14:38:21 +0000 (UTC) Received: from mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5F4401276 for ; Fri, 3 Jan 2014 14:38:21 +0000 (UTC) Received: from r2d2 ([82.69.141.170]) by mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) (MDaemon PRO v10.0.4) with ESMTP id md50007365919.msg for ; Fri, 03 Jan 2014 14:38:12 +0000 X-Spam-Processed: mail1.multiplay.co.uk, Fri, 03 Jan 2014 14:38:12 +0000 (not processed: message from valid local sender) X-MDDKIM-Result: neutral (mail1.multiplay.co.uk) X-MDRemoteIP: 82.69.141.170 X-Return-Path: prvs=108062f7db=killing@multiplay.co.uk X-Envelope-From: killing@multiplay.co.uk X-MDaemon-Deliver-To: freebsd-current@freebsd.org Message-ID: From: "Steven Hartland" To: "O. Hartmann" , "FreeBSD CURRENT" References: <20140103130021.30569db4@thor.walstatt.dyndns.org> Subject: Re: ZFS command can block the whole ZFS subsystem! Date: Fri, 3 Jan 2014 14:38:03 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 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 14:38:21 -0000 ----- Original Message ----- From: "O. Hartmann" > > 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. > > Issuing the command > > "rm dumpfile.txt" > > 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! I cant think of any reason why backgrounding a shell would export a pool. > 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. > > 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: > > top > 17790 root 1 20 0 8228K 1788K STOP 10 0:05 > 0.00% rm > > for the particular "rm" command issued. Thats not backgrounded yet otherwise it wouldnt be in the state STOP. > Now, having the file deleted, I'd like to export the pool for further > maintainance 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. You can check that gstat -d > but that doesn't work with > > zpool export -f poolname > > This command is now also stuck blocking the terminal and the pool from > further actions. If the delete hasnt completed and is stuck in the kernel this is to be expected. > > 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). > > What is up here? Regards Steve ================================================ 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. 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.