mikey@Sun

Cleaning up unused ZFS container datasets

Thursday May 17, 2007

Everyone is excited about ZFS these days, so am I! The thing is, I am one of these guys who hate too many directories in the / filesystem, like ZFS do.

In the following example every ZFS dataset is mounted out of the zpool container (/mercury), so this remains empty. I wanted to get rid of this empty zpool container dataset somehow...to meet *my*, errr...ahem well..."mikey Fashion Standard©"

NAME                   USED  AVAIL  REFER  MOUNTPOINT
mercury 5.68G 262G 25.5K /mercury
mercury/mail 36.4M 3.96G 36.4M /var/mail
mercury/samba 996M 99.0G 996M /data/samba
mercury/software 24.5K 262G 24.5K /export/software

The solution was in fact pretty easy...

zfs set mountpoint=none mercury

so I end up with:

NAME                   USED  AVAIL  REFER  MOUNTPOINT
mercury 5.68G 262G 25.5K none
mercury/mail 36.4M 3.96G 36.4M /var/mail
mercury/samba 996M 99.0G 996M /data/samba
mercury/software 24.5K 262G 24.5K /export/software

Well, I can set a mountpoint for this zpool to something else, say... /tmp/mercury, but what's the point? It's empty, anyway.

Gotta love this feature.

[2] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg