Renaming ZFS datasets without unmount.

Arnaud Houdelette tzim at tzim.net
Wed Jun 8 13:18:37 UTC 2011


When I try to rename a mounted dataset with open files, I get the 
following error :

[carenath] /home/tzim# zfs rename unsafe/tmp unsafe/temp
cannot unmount '/tmp': Device busy

The mountpoint property is set locally :

[carenath] /home/tzim# zfs get mountpoint unsafe/tmp
NAME        PROPERTY    VALUE       SOURCE
unsafe/tmp  mountpoint  /tmp        local


zfs(1M) says :

   Renamed file  systems  can inherit new mount points, in which case 
they are unmounted and remounted at the new mount point.


But here, the mountpoint should not change. So the file system does not 
need to be remounted ...

Either I don't understand something, or there's an "error" in the man, 
or a bug in zfs rename.

It could be great if zfs allowed "live" renaming of mounted filesystem, 
as It can avoid headaches...

Thanks


Arnaud Houdelette


More information about the freebsd-stable mailing list