Date: Thu, 11 Sep 2014 08:12:37 +0100 From: Ben Morrow <ben@morrow.me.uk> To: freebsd-stable@freebsd.org Subject: Snapshots that won't delete [was: Re: ZFS on root booting...] Message-ID: <20140911071233.GA50585@anubis.morrow.me.uk> In-Reply-To: <5411159F.6060608@egr.msu.edu> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
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. /home/mauzo% sudo zfs destroy zroot/DATA/R@broken-dump-20140906 cannot destroy snapshot zroot/DATA/R@broken-dump-20140906: dataset is busy /home/mauzo% mount | grep @ /home/mauzo% zfs list -o name,origin | grep broken-dump /home/mauzo% zfs list -o name,userrefs zroot/DATA/R@broken-dump-20140906 NAME USERREFS zroot/DATA/R@broken-dump-20140906 0 /home/mauzo% zfs holds zroot/DATA/R@broken-dump-20140906 NAME TAG TIMESTAMP /home/mauzo% Presumably this is indicative of some sort of serious problem with either the pool or the filesystem, and the only permanent solution is to rebuild the whole thing? ZFS doesn't seem to have a fsck-equivalent for the ZFS layer. I've run a scrub, and it found no problems. I was about to upgrade the machine to the latest 10-STABLE, but I can put that off if anyone thinks this is worth investigating. Once I reboot I'm fairly sure the current stuck snapshots will fix themselves, and of course I can't be sure when this will happen again. [Also: it would be really nice to have an alias for 'zfs destroy' that will only destroy snapshots. When running something like 'zfs destroy -r zroot/DATA@whatever' I find I have to check at least three times that I have definitely put that @ in the right place before pressing Return. *Especially* when I'm doing it because I'm running a dump, and it's just fallen over because it can't delete a snapshot.] Ben
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140911071233.GA50585>