Hiding ZFS volumes from Nautilus, Caja and udisks2

On Ubuntu and derivatives, there are multiple ways how ZFS volumes can be hidden from the volume listing in Nautilus (GNOME) or Caja (MATE). It is possible to hide individual volumes by editing /etc/fstab or blacklisting all volumes in the udev rules configuration.

Hiding individual partitions

Individual volumes can by hidden using the “Disks” utility (which will add or modify entries in /etc/fstab).

  1. Open the “Disks” utilty
  2. Select (click on) the partition you want to hide
  3. Click on the “Additional partition options” icon
  4. Select “Edit mount options” from the menu.
  5. Unset “User session defaults”
  6. De-select “Show in user interface”

NOTE: You may want to de-select “Mount at system startup” as well.

If you want to edit /etc/fstab directly, you have to create an entry for the desired partition and omit the “x-gvfs-show” mount option. Entries not present in /etc/fstab are treated the default way (usually they are visible).

Hiding all ZFS volumes

All ZFS volumes can be hidden by blacklisting them in the udisks2 udev configuration. Simply create a /etc/udev/rules.d/80-udisks2-zvol.rules file with the following contents:

# ZFS volumes
KERNEL=="zd*", ENV{UDISKS_IGNORE}="1"

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>