Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Sep 2014 13:39:54 +0200
From:      Willem Jan Withagen <wjw@digiware.nl>
To:        Steven Hartland <killing@multiplay.co.uk>,  Shane Ambler <FreeBSD@ShaneWare.Biz>, freebsd-stable@freebsd.org
Subject:   Re: Snapshots that won't delete [was: Re: ZFS on root booting...]
Message-ID:  <54157E8A.9060301@digiware.nl>
In-Reply-To: <E13A5BF5177545C0B03F1617BBEA98D7@multiplay.co.uk>
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> <E13A5BF5177545C0B03F1617BBEA98D7@multiplay.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
On 12-9-2014 10:19, Steven Hartland wrote:
> Is there a hold on the snapshot?
> 
> ----- Original Message ----- From: "Shane Ambler" <FreeBSD@ShaneWare.Biz>
> 
> 
>> On 11/09/2014 16:42, Ben Morrow wrote:
>>> Quoth Adam McDougall <mcdouga9@egr.msu.edu>:
>>>>
>>>> Were you running a newer kernel with an older format zpool?  I heard
>>>> ixsystems had customers doing that and ran into corruption when they
>>>> tried to modify the zpool in some way (expand? I don't remember).
>>>> http://www.bsdnow.tv/episodes/2014_07_09-zfs_war_stories
>>>
>>> Oh! Might this be what's causing a problem I've been meaning to ask
>>> about?
>>>
>>> My desktop at home is running (a patched, but not anywhere to do with
>>> ZFS) 10-STABLE from a while ago, with a zpool that was created under
>>> 8.2-R and is still at version 15. I have been deliberately not upgrading
>>> it, because I saw no reason to and it seemed safer to leave things as
>>> they were.
>>>
>>> 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.
>>
>> It seems that some aging of the snapshot needs to happen. Testing a
>> rotate, access, rotate keeps working ok, but access last nights
>> snapshot and then rotate and it blocks.
>>
>> I'm fairly sure that I was running 9.1 when I created this zpool and
>> then later upgraded to 9.2. zpool upgrade says "This system supports
>> ZFS pool feature flags" and "Pool 'zrpleader' already has all supported
>> features enabled".

I've had more or less the same happen to me in a backup-with-snapshot
script...
The solution that worked from me uptill now is:
	zfs unmount -f <pool>

For me that is easy to do, since this pool holds a remote backup, and is
only written at nighttime. So at other times there is no harm if I
unmount.... But if you normally "live" in the pool, that might be
somewhat harder.

--WjW




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?54157E8A.9060301>