07 April 2023

Hiding mount icons for ZFS disk

 

As I was tired of seeing mount icons for my zfs drives on my desktop, it was time to add some more udev rules. This time i chose to set the rule by ID_SERIAL instead of KERNEL to be more confident about which drive will be ignored in case of moving them around on SATA headers.

Determine the ID_SERIAL for each of the drives:

  • udevadm info /dev/sdb | grep ID_SERIAL=
  • udevadm info /dev/sdc | grep ID_SERIAL=

Add to /etc/udev/99-hide-disks.rules (a single line for each rule):

  • ENV{ID_SERIAL}=="WDC_WD60EFZX-68B3FN0_WD-XXXXXXYK", ENV{UDISKS_IGNORE}="1"
  • ENV{ID_SERIAL}=="WDC_WD60EFZX-68B3FN0_WD-XXXXXX7K", ENV{UDISKS_IGNORE}="1"

Then have udev read from the files:
  • sudo udevadm control --reload


Sources: