Skip to content

Instantly share code, notes, and snippets.

@ToxicFrog
Created January 28, 2019 20:13
Show Gist options
  • Save ToxicFrog/0c11bc16b93745742ea8bb29a5ae95c9 to your computer and use it in GitHub Desktop.
Save ToxicFrog/0c11bc16b93745742ea8bb29a5ae95c9 to your computer and use it in GitHub Desktop.
postBootCommands = ''
echo "=== STARTING ZPOOL IMPORT ==="
# Clean up borg-repo because the activation script creates it
${pkgs.findutils}/bin/find /backup/borg-repo -maxdepth 1 -type d -empty -delete
${pkgs.zfs}/bin/zpool import -a -N -d /dev/disk/by-path
${pkgs.zfs}/bin/zpool status
${pkgs.zfs}/bin/zfs mount -a
echo "=== ZPOOL IMPORT COMPLETE ==="
'';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment