zfsonfreebsd / ZoF

ZFS on FreeBSD - the official out of tree OpenZFS implementation for FreeBSD
https://freebsd.org
Other
100 stars 8 forks source link

Recursively renaming snapshot fails #121

Closed ghost closed 5 years ago

ghost commented 5 years ago

The top level snapshot is renamed with rename -r but it does not recurse.

truncate -s 1G disk0
zpool create testpool `pwd`/disk0
zfs create testpool/testfs
zfs snapshot -r testpool@snap
zfs list -tall
# NAME                   USED  AVAIL     REFER  MOUNTPOINT
# testpool               164K   832M     25.5K  /testpool
# testpool@snap            0B      -     25.5K  -
# testpool/testfs         24K   832M       24K  /testpool/testfs
# testpool/testfs@snap     0B      -       24K  -
zfs rename -r testpool@snap testpool@snap-new
zfs list -tall
# NAME                   USED  AVAIL     REFER  MOUNTPOINT
# testpool               171K   832M     25.5K  /testpool
# testpool@snap-new        0B      -     25.5K  -
# testpool/testfs         24K   832M       24K  /testpool/testfs
# testpool/testfs@snap     0B      -       24K  -

Expected behavior is for the snapshots to all have been renamed.

ghost commented 5 years ago

This affects both FreeBSD and Linux.

ghost commented 5 years ago

Fixed in projects/pr-rebase