ZFS snapshot renames failing after upgrade to 9.2

Steven Hartland killing at multiplay.co.uk
Thu Nov 14 19:30:42 UTC 2013


This could also be due to the following issue which there
will be a fix soon:
https://www.illumos.org/issues/4322

    Regards
    Steve

----- Original Message ----- 
From: "Steven Hartland" <killing at multiplay.co.uk>
To: "Matt Magoffin" <matt at msqr.us>; <freebsd-fs at freebsd.org>
Sent: Thursday, November 14, 2013 6:43 PM
Subject: Re: ZFS snapshot renames failing after upgrade to 9.2


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


================================================
This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. 

In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337
or return the E.mail to postmaster at multiplay.co.uk.



More information about the freebsd-fs mailing list