How do you zfs rename a dataset that has children?
Trent Nelson
trent at snakebite.org
Sun Aug 28 07:36:33 UTC 2011
This has me scratching my head:
[root at usbkey/ttypts/0(~)#] zfs create tank/host/foo
[root at usbkey/ttypts/0(~)#] zfs create tank/host/foo/bar
[root at usbkey/ttypts/0(~)#] zfs rename tank/host/foo tank/host/test
Assertion failed: (!clp->cl_alldependents), file /usr/src/cddl/lib/libzfs/../../../cddl/contrib/opensolaris/lib/libzfs/common/libzfs_changelist.c, line 470.
zsh: abort (core dumped) zfs rename tank/host/foo tank/host/test
Say wha'?
Renaming the child dataset first works, but it's not what I want, obviously:
[root at usbkey/ttypts/0(~)#] zfs rename tank/host/foo/bar tank/host/test/bar
cannot create 'tank/host/test/bar': parent does not exist
[root at usbkey/ttypts/0(~)#] zfs rename -p tank/host/foo/bar tank/host/test/bar
[root at usbkey/ttypts/0(~)#] zfs rename tank/host/foo tank/host/test/bar
cannot rename 'tank/host/foo': dataset already exists
[root at usbkey/ttypts/0(~)#] uname -a
FreeBSD usbkey.home.trent.me 8.2-STABLE FreeBSD 8.2-STABLE #2 r224667M: Sat Aug 6 04:11:46 EDT 2011 root at home.trent.me:/usr/obj/usr/src/sys/GENERIC amd64
(The 'M' in r224667M is due to a device ID I changed in e1000.h; unrelated to this issue.)
What am I doing wrong?
(My actual use case is more complicated than the test case above; I built a new system, named 'fulcrum', from an existing build, named 'flanker'. I want to rename tank/host/flanker -> tank/host/fulcrum (hence booting from the usbkey).)
Regards,
Trent.
More information about the freebsd-fs
mailing list