Skip to content

Instantly share code, notes, and snippets.

@pnorman
Created December 11, 2015 16:57
Show Gist options
  • Save pnorman/16668d1c22c47de092bb to your computer and use it in GitHub Desktop.
Save pnorman/16668d1c22c47de092bb to your computer and use it in GitHub Desktop.
ZFS setup stuff
# Create by-id links in /dev as well for zfs vdev. Needed by grub
# Force ata_id for USB disks
KERNEL=="sd*[!0-9]", SUBSYSTEMS=="usb", IMPORT{program}="ata_id --export $devnode"
# Force ata_id when ID_VENDOR=ATA
KERNEL=="sd*[!0-9]", ENV{ID_VENDOR}=="ATA", IMPORT{program}="ata_id --export $devnode"
# Create links for all disk and partitions. Needed for L2ARC (not covered in this howto)
KERNEL=="sd*[!0-9]", IMPORT{parent}=="ID_*", SYMLINK+="$env{ID_BUS}-$env{ID_SERIAL}"
# Add links for zfs_member only
KERNEL=="sd*[0-9]", IMPORT{parent}=="ID_*", ENV{ID_FS_TYPE}=="zfs_member", SYMLINK+="$env{ID_BUS}-$env{ID_SERIAL}-part%n"
KERNEL=="sd*[0-9]", IMPORT{parent}=="ID_*", ENV{ID_FS_TYPE}=="zfs_member", SYMLINK+="$env{ID_BUS}-$env{ID_SERIAL}"
Used https://github.com/zfsonlinux/pkg-zfs/wiki/HOWTO-install-Ubuntu-to-a-Native-ZFS-Root-Filesystem but packages from https://github.com/zfsonlinux/pkg-zfs/wiki/HOWTO-install-Ubuntu-14.04-or-Later-to-a-Native-ZFS-Root-Filesystem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment