Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Dec 2013 10:55:03 +0100
From:      Gerrit =?ISO-8859-1?Q?K=FChn?= <gerrit.kuehn@aei.mpg.de>
To:        "Steven Hartland" <killing@multiplay.co.uk>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: ZFS snapshot renames failing after upgrade to 9.2
Message-ID:  <20131219105503.3a8d1df3.gerrit.kuehn@aei.mpg.de>
In-Reply-To: <333D57C6A4544067880D9CFC04F02312@multiplay.co.uk>
References:  <0C9FD4E1-0549-4849-BFC5-D8C5D4A34D64@msqr.us> <54D3B3C002184A52BEC9B1543854B87F@multiplay.co.uk> <333D57C6A4544067880D9CFC04F02312@multiplay.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 14 Nov 2013 19:30:33 -0000 "Steven Hartland"
<killing@multiplay.co.uk> wrote about Re: ZFS snapshot renames failing
after upgrade to 9.2:

Hi,

Is there already a solution for this available? I think I am seeing the
same issue here (also with 9.2):

---
root@shapeshifter:~ # ll /tank/git/.zfs/snapshot/
ls: daily.3: Device busy
ls: daily.6: Device busy
total 30
drwxr-xr-x  12 211   211    24 Dec 16 00:00 daily.0/
drwxr-xr-x  12 211   211    24 Dec 18 00:00 daily.1/
drwxr-xr-x  12 211   211    24 Dec 17 00:00 daily.2/
drwxr-xr-x  12 211   211    24 Dec 14 00:00 daily.4/
drwxr-xr-x  12 211   211    24 Dec 13 00:00 daily.5/
drwxr-xr-x  12 211   211    24 Dec 15 00:00 weekly.0/
drwxr-xr-x  12 211   211    24 Dec  8 00:00 weekly.1/
drwxr-xr-x  12 211   211    24 Dec  1 00:00 weekly.2/
drwxr-xr-x  12 211   211    24 Nov 17 00:00 weekly.3/
drwxr-xr-x  12 211   211    24 Nov 10 00:00 weekly.4/
drwxr-xr-x   2 root  wheel   3 Oct 20 00:00 weekly.5/
drwxr-xr-x   2 root  wheel   3 Oct  6 00:00 weekly.6/
---


cu
  Gerrit


SH> This could also be due to the following issue which there
SH> will be a fix soon:
SH> https://www.illumos.org/issues/4322
SH> 
SH>     Regards
SH>     Steve
SH> 
SH> ----- Original Message ----- 
SH> From: "Steven Hartland" <killing@multiplay.co.uk>
SH> To: "Matt Magoffin" <matt@msqr.us>; <freebsd-fs@freebsd.org>
SH> Sent: Thursday, November 14, 2013 6:43 PM
SH> Subject: Re: ZFS snapshot renames failing after upgrade to 9.2
SH> 
SH> 
SH> > Sounds like you may have an automatic hold still present.
SH> >
SH> > What does the following report:
SH> > zfs holds -r <snapshot>
SH> >
SH> >    Regards
SH> >    Steve
SH> > ----- Original Message ----- 
SH> > From: "Matt Magoffin" <matt@msqr.us>
SH> > To: <freebsd-fs@freebsd.org>
SH> > Sent: Thursday, November 14, 2013 6:35 PM
SH> > Subject: ZFS snapshot renames failing after upgrade to 9.2
SH> >
SH> >
SH> > Hello,
SH> >
SH> > I have a system that had been running FreeBSD 9.1 for some time, and
SH> > I recently upgraded to 9.2. I've been using this simple script to
SH> > create daily, rotating ZFS snapshots via cron:
SH> >
SH> > http://andyleonard.com/2010/04/07/automatic-zfs-snapshot-rotation-on-freebsd/
SH> >
SH> > Essentially the snapshots are renamed and then a new snapshot is
SH> > created with the same name as the most recently created snapshot.
SH> > Since the upgrade to 9.2, however, the snapshots aren't able to be
SH> > renamed. I end up with an error like this:
SH> >
SH> > cannot rename 'zdata/home': a child dataset already has a snapshot
SH> > with the new name cannot create snapshot 'zdata/home@daily.0':
SH> > dataset already exists
SH> >
SH> > Once that happens, zfs will show two snapshots:
SH> >
SH> > # zfs list -t snapshot -o name,creation,used,referenced |grep
SH> > # zdata/home
SH> > zdata/home@daily.1                                Wed Nov 13  0:00
SH> > 2013  50.5K  91.0G zdata/home@daily.0
SH> > Thu Nov 14  0:00 2013      0  91.0G
SH> >
SH> > However, trying to list the snapshots results in this error:
SH> >
SH> > # ls .zfs/snapshot/
SH> > ls: daily.1: Device busy
SH> > daily.0
SH> >
SH> > I can destroy the daily.1 snapshot:
SH> >
SH> > # zfs destroy zdata/home@daily.1
SH> > # zfs list -t snapshot -o name,creation,used,referenced |grep
SH> > # zdata/home
SH> > zdata/home@daily.0                                Thu Nov 14  0:00
SH> > 2013      0  91.0G
SH> > # ls .zfs/snapshot/
SH> > daily.0
SH> >
SH> > Then if I try to rename it like the script would, I end up in the
SH> > same "Device busy" state:
SH> >
SH> > # zfs rename zdata/home@daily.0 zdata/home@daily.1
SH> > # zfs list -t snapshot -o name,creation,used,referenced |grep
SH> > # zdata/home
SH> > zdata/home@daily.1                                Thu Nov 14  0:00
SH> > 2013      0  91.0G
SH> > # ls .zfs/snapshot/
SH> > ls: daily.1: Device busy
SH> >
SH> > Does anyone have any ideas how to get the renames working?
SH> >
SH> > -- m@
SH> >
SH> >
SH> >
SH> > ================================================
SH> > This e.mail is private and confidential between Multiplay (UK) Ltd.
SH> > and the person or entity to whom it is addressed. In the event of
SH> > misdirection, the recipient is prohibited from using, copying,
SH> > printing or otherwise disseminating it or any information contained
SH> > in it. In the event of misdirection, illegible or incomplete
SH> > transmission please telephone +44 845 868 1337 or return the E.mail
SH> > to postmaster@multiplay.co.uk.
SH> >
SH> > _______________________________________________
SH> > freebsd-fs@freebsd.org mailing list
SH> > http://lists.freebsd.org/mailman/listinfo/freebsd-fs
SH> > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org"
SH> > 
SH> 
SH> 
SH> ================================================
SH> This e.mail is private and confidential between Multiplay (UK) Ltd.
SH> and the person or entity to whom it is addressed. In the event of
SH> misdirection, the recipient is prohibited from using, copying,
SH> printing or otherwise disseminating it or any information contained in
SH> it. 
SH> 
SH> In the event of misdirection, illegible or incomplete transmission
SH> please telephone +44 845 868 1337 or return the E.mail to
SH> postmaster@multiplay.co.uk.
SH> 
SH> _______________________________________________
SH> freebsd-fs@freebsd.org mailing list
SH> http://lists.freebsd.org/mailman/listinfo/freebsd-fs
SH> To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131219105503.3a8d1df3.gerrit.kuehn>