LiquidObject

FreeNAS and renaming ZFS datasets

While not a feature of FreeNAS at least as of version 8.3 you can actually rename your ZFS datasets. The rename command is feature of ZFS and can be accomplished through the shell.

First, use: zfs list

[root@NAS-1] /mnt/RaidZ# zfs list
NAME                  USED  AVAIL  REFER  MOUNTPOINT
RaidZ                 306G  2.36T  53.3K  /mnt/RaidZ
RaidZ/Backups        8.19G  91.8G  8.19G  /mnt/RaidZ/Backups
RaidZ/Test_gzip6  17.4G  32.6G  17.4G  /mnt/RaidZ/Test_gzip6
RaidZ/Photos            5G  20.0G  40.0K  /mnt/RaidZ/Photos
RaidZ/Transfer       3.70G  46.3G  3.70G  /mnt/RaidZ/Transfer

 

The first column generated will give you the actual name of your dataset. In my case I wanted to rename “Test_gzip6” to “Test1”

zfs rename RaidZ/Test_gzip6 RaidZ/Test1

Which results in:

[root@NAS-1] /mnt/RaidZ# zfs list
NAME                  USED  AVAIL  REFER  MOUNTPOINT
RaidZ                 306G  2.36T  53.3K  /mnt/RaidZ
RaidZ/Backups        8.19G  91.8G  8.19G  /mnt/RaidZ/Backups
RaidZ/Test1  17.4G  32.6G  17.4G  /mnt/RaidZ/Test1
RaidZ/Photos            5G  20.0G  40.0K  /mnt/RaidZ/Photos
RaidZ/Transfer       3.70G  46.3G  3.70G  /mnt/RaidZ/Transfer

Pretty straight forward, the syntaxing is the only hangup because it’s not looking for the true path in this case which was /mnt/RaidZ/Test_gzip6 but just the full dataset name.

, , ,
March 17, 2013 at 8:03 pm Comments (0)