Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Sep 2014 13:44:50 +0930
From:      Shane Ambler <FreeBSD@ShaneWare.Biz>
To:        Andriy Gapon <avg@FreeBSD.org>, freebsd-stable@FreeBSD.org,  amvandemore@gmail.com, killing@multiplay.co.uk
Subject:   Re: Snapshots that won't delete [was: Re: ZFS on root booting...]
Message-ID:  <5413C4BA.7080302@ShaneWare.Biz>
In-Reply-To: <541293D0.4080907@FreeBSD.org>
References:  <FE64613E-B083-436C-8A08-13923ED88797@icloud.com> <7F008C560B48412AB66A1EBD9382DDAE@multiplay.co.uk> <CC276D59-F83C-4C78-BD9B-84040D3DE3E4@icloud.com> <9315C209-701A-49EF-85D3-ACCCD1513EC3@icloud.com> <959C54D2C8EB4AC8983DC1DA3CE042E3@multiplay.co.uk> <9F24DD48FBEA46C39F98DF600D46DA1A@multiplay.co.uk> <B4A16726-142D-458A-9B3A-153BDD579A63@icloud.com> <BAB9F50F-9D2C-435C-8035-659E2B412FC7@icloud.com> <4450778127F4407EB6566A0FE11CD651@multiplay.co.uk> <090135D4-8B1F-42B4-82FC-6FD2F1DBDDA8@icloud.com> <20140911071233.GA50585@anubis.morrow.me.uk> <541280D8.9090500@ShaneWare.Biz> <541293D0.4080907@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 12/09/2014 16:03, Andriy Gapon wrote:
> On 12/09/2014 08:12, Shane Ambler wrote:
>> On 11/09/2014 16:42, Ben Morrow wrote:

>>> Recently, though, my dump script has started having occasional problems
>>> with snapshots that won't delete. Pending further investigation I have
>>> been renaming them to allow the recursive delete to succeed, and (so
>>> far) rebooting has always made it possible to get rid of them. 
>>
>> I have seen that issue with 9.2 and at least one other person mentioned
>> it as well. I currently have a snapshot that I accessed at least 3 weeks
>> ago and renamed to keep rotations working and have not accessed since,
>> it still won't delete as it is busy. I can only delete these snapshots
>> after a reboot.
>>
>> The only cause I know is accessing the snapshot.
>> I can simply ls .zfs/snapshot/daily.01/somefolder to prevent it being
>> deleted. With a manual zfs destroy I get "dataset is busy" and have not
>> found a way to find any process that has hold of it.
> 
> Look for it in `mount` output.

There is no entry in mount or df for the snapshot

The zfs mounted property is only yes for real filesystems - all
snapshots show as '-'

On 12/09/2014 16:44, Adam Vande More wrote:
>
> What exactly have you tried and what were the results?

zfs rename works
zfs destroy fails both before and after rename with
'cannot destroy snapshot zrpleader/home/shane@daily.bad: dataset is busy'

I can't find anything with fstat or lsof to indicate a process has
anything open within the snapshot path.

I haven't done a lot of digging for info so don't think I've tried
anything else yet.

On 12/09/2014 17:49, Steven Hartland wrote:
>
> Is there a hold on the snapshot?

Don't know how to tell that.


The first time I encountered this I think I sent xfe to the snapshot
dir and opened a video with vlc. The one I have from a few weeks ago I
did cp ~/.zfs/snapshot/daily.01/folder/file ~/folder/ from a terminal
as a normal user.

The original snapshots were created with
zfs snapshot -r zrpleader@daily.01

I have manually destroyed each of the individual filesystem snapshots
that I could and have two bad snapshots remaining, one from a few weeks
ago and one from a few days ago.

Both of these I can not access now. ls .zfs/snapshot/daily.bad says
'ls: .zfs/snapshot/daily.bad: Device busy'

-- 
FreeBSD - the place to B...Serving Data

Shane Ambler




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5413C4BA.7080302>