File systems can be renamed by using the zfs rename command. With the rename subcommand, you can perform the following operations:
Change the name of a file system.
Relocate the file system within the ZFS hierarchy.
Change the name of a file system and relocate it within the ZFS hierarchy.
The following example uses the rename subcommand to rename of a file system from eric to eric_old:
# zfs rename tank/home/eric tank/home/eric_old
The following example shows how to use zfs rename to relocate a file system:
# zfs rename tank/home/mark tank/ws/mark
In this example, the mark file system is relocated from tank/home to tank/ws. When you relocate a file system through rename, the new location must be within the same pool and it must have enough disk space to hold this new file system. If the new location does not have enough disk space, possibly because it has reached its quota, the rename operation fails.
For more information about quotas, see Setting ZFS Quotas and Reservations.
The rename operation attempts an unmount/remount sequence for the file system and any descendent file systems. The rename command fails if the operation is unable to unmount an active file system. If this problem occurs, you must forcibly unmount the file system.
For information about renaming snapshots, see Renaming ZFS Snapshots.