zfs rename … cannot create '…': missing dataset name

Moderators: jhartley, MSR734, nola

zfs rename … cannot create '…': missing dataset name

Post by grahamperrin » Thu Nov 01, 2012 2:39 am

From the synopsis in the man page for zfs(8) in ZEVO Community Edition 1.1.1:

Code: Select all
zfs rename [-p] filesystem filesystem


Here:

Code: Select all
macbookpro08-centrim:~ gjp22$ zfs list | grep Butlins
Butlins                     1.07Mi  1.69Gi   704Ki  /Volumes/Butlins
macbookpro08-centrim:~ gjp22$ zfs rename Butlins donkey
cannot create 'donkey': missing dataset name


Back to basics. What am I doing wrong?
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom

Re: zfs rename … cannot create '…': missing dataset name

Post by dbrady » Fri Nov 02, 2012 1:13 am

Back to basics. What am I doing wrong?


Looks like your are attempting to rename a top-level file system. Since the top-level file system shares its name with the pool, you essentially need to rename the pool. Since that is a pain (export/import) we allow you to use the Finder's GetInfo on the Volume to rename the top-level. Here's the correct sequence for renaming a top-level/pool using the CLI:

Code: Select all
$ sudo zpool export OWC
$ sudo zpool import OWC newname
$ zpool list
NAME       SIZE   ALLOC    FREE     CAP  HEALTH  ALTROOT
newname   296Gi   104Gi   192Gi     34%  ONLINE  -


Note that this works fine for non top-level file systems:
Code: Select all
$ zfs create tank/foo
$ zfs rename tank/foo tank/bar
$ zfs list
NAME          USED   AVAIL   REFER  MOUNTPOINT
tank          104Gi   188Gi   104Gi  /Volumes/tank
tank/bar     32.5Ki   188Gi  32.5Ki  /Volumes/tank/bar


It would probably be a good idea to note this in the zfs man page and in the command output. This appears to be stock ZFS behavior.
dbrady Offline


 
Posts: 67
Joined: Wed Sep 12, 2012 12:43 am

Re: zfs rename … cannot create '…': missing dataset name

Post by grahamperrin » Fri Nov 02, 2012 2:48 am

Thanks. It was top level, and I did work around with Finder.

(The information here will help as I continue to test with CoreStorage.)
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom


Return to General Discussion

Who is online

Users browsing this forum: ilovezfs and 2 guests

cron