Skip to content

Instantly share code, notes, and snippets.

@rlaager
Created October 15, 2016 09:15
Show Gist options
  • Save rlaager/cb5e3863c8413e1c7c0e17af396a303f to your computer and use it in GitHub Desktop.
Save rlaager/cb5e3863c8413e1c7c0e17af396a303f to your computer and use it in GitHub Desktop.
Ubuntu 16.04 ZFS udev Rules
# This creates symlinks directly in /dev with the same names as those in
# /dev/disk/by-id, but only for ZFS partitions. This is necessary for GRUB to
# https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1527727
# https://bugs.launchpad.net/ubuntu/+source/zfs-initramfs/+bug/1530953
# locate the partitions using the output of `zpool status`.
KERNEL=="sd*[0-9]", IMPORT{parent}=="ID_*", ENV{ID_PART_ENTRY_SCHEME}=="gpt", ENV{ID_PART_ENTRY_TYPE}=="6a898cc3-1dd2-11b2-99a6-080020736631", SYMLINK+="$env{ID_BUS}-$env{ID_SERIAL}-part%n"
KERNEL=="sd*[0-9]", IMPORT{parent}=="ID_*", ENV{ID_FS_TYPE}=="zfs_member", ENV{ID_FS_USAGE}=="raid", SYMLINK+="$env{ID_BUS}-$env{ID_SERIAL}-part%n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment