From owner-freebsd-fs@FreeBSD.ORG Mon Aug 18 15:18:03 2014 Return-Path: Delivered-To: freebsd-fs@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 532162A8 for ; Mon, 18 Aug 2014 15:18:03 +0000 (UTC) Received: from smarthost1.greenhost.nl (smarthost1.greenhost.nl [195.190.28.81]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 149B8334E for ; Mon, 18 Aug 2014 15:18:02 +0000 (UTC) Received: from smtp.greenhost.nl ([213.108.104.138]) by smarthost1.greenhost.nl with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1XJOh0-0004KS-44 for freebsd-fs@freebsd.org; Mon, 18 Aug 2014 17:17:54 +0200 Content-Type: text/plain; charset=iso-8859-15; format=flowed; delsp=yes To: freebsd-fs@freebsd.org Subject: Re: Strange effect of zfs rename References: <53E61706.4010604@digiware.nl> Date: Mon, 18 Aug 2014 17:17:53 +0200 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Ronald Klop" Message-ID: In-Reply-To: <53E61706.4010604@digiware.nl> User-Agent: Opera Mail/12.17 (Win32) X-Authenticated-As-Hash: 398f5522cb258ce43cb679602f8cfe8b62a256d1 X-Virus-Scanned: by clamav at smarthost1.samage.net X-Spam-Level: - X-Spam-Score: -1.0 X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED, BAYES_40 autolearn=disabled version=3.3.2 X-Scan-Signature: 0cb660a7d4ce909c6359c48b0bded22a X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2014 15:18:03 -0000 On Sat, 09 Aug 2014 14:41:42 +0200, Willem Jan Withagen wrote: > Hoi, > > In the process of creating backups I have this sequence of: > > /sbin/zfs destroy zfsraid/backups@Saturday-2 > /sbin/zfs rename -f zfsraid/backups@Saturday zfsraid/backups@Saturday-2 > /sbin/zfs snapshot zfsraid/backups@Saturday > > But then I end up with: > # cd /backups/.zfs/snapshot > # ll > ls: Saturday-2: Device busy > total 116 > 0 dr-xr-xr-x 11 root wheel 11 Aug 9 14:15 ./ > 0 dr-xr-xr-x 4 root wheel 4 Jul 30 22:07 ../ > 17 drwxr-xr-x 13 root wheel 16 Jul 31 09:54 20140801/ > 17 drwxr-xr-x 18 root wheel 21 Aug 5 01:03 Friday/ > 17 drwxr-xr-x 16 root wheel 19 Aug 3 01:03 Monday/ > 17 drwxr-xr-x 15 root wheel 18 Aug 2 01:03 Sunday/ > 17 drwxr-xr-x 18 root wheel 21 Aug 5 01:03 Thursday/ > 17 drwxr-xr-x 17 root wheel 20 Aug 4 01:03 Tuesday/ > 17 drwxr-xr-x 18 root wheel 21 Aug 5 01:03 Wednesday/ > Exit 1 > > And the device does not becomen not-busy even after a "long" wait. > > The way to remedy this is: > /sbin/zfs unmount -f zfsraid/backups > /sbin/zfs mount zfsraid/backups > > After that the snapshot-dir is as it should. > > I'm running: > FreeBSD zfs.digiware.nl 9.3-STABLE FreeBSD 9.3-STABLE #272 r269145M: Sun > Jul 27 06:50:06 CEST 2014 > root@zfs.digiware.nl:/usr/obj/usr/srcs/src9/src/sys/ZFS amd64 > > Can other reproduce this? Or is my system suffering from bitrot? > > Regards, > --WjW I don't see this. I used to work on 9-STABLE and now on 10-STABLE (from august 5th). I use zfs rename a lot for handling my snapshots, but I do not use the -f option. I must say I never need to go into the .zfs/snapshot directories, so they are mounted seldom. I just went into them today for a test, but I don't have 'Device busy' problems. Do you keep such a directory active somewhere? Ronald.