Snapshots that won't delete [was: Re: ZFS on root booting...]
Shane Ambler
FreeBSD at ShaneWare.Biz
Sat Sep 13 04:14:55 UTC 2014
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 at 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 at 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
More information about the freebsd-stable
mailing list