Movatterモバイル変換


[0]ホーム

URL:


Skip to content
Search Gists
Sign in Sign up

Instantly share code, notes, and snippets.

@keithpl
Last activeApril 27, 2025 21:03
    • Star(1)You must be signed in to star a gist
    • Fork(0)You must be signed in to fork a gist
    Save keithpl/c4a3c89ace838777f8f23f6e2c6efdc9 to your computer and use it in GitHub Desktop.
    Arch Linux ZFS

    Setup archzfs pacman repository by editing/etc/pacman.conf:

    [archzfs]Server = https://archzfs.com/$repo/$arch
    sudo pacman-key -r DDF7DB817396A49B2A2723F7403BD972F75D9D76sudo pacman-key --lsign-key DDF7DB817396A49B2A2723F7403BD972F75D9D76sudo pacman -Syu
    sudo pacman -S linux-lts linux-lts-headerssudo pacman -S zfs-dkms zfs-utilssudo systemctlenable zfs-import-cache.service zfs-mount.servicesudo systemctlenable zfs-zed.service zfs.target zfs-import.target

    Create zfs-load-key systemd service in/etc/systemd/system/zfs-load-key.service:

    [Unit]Description=Load encryption keysDefaultDependencies=noAfter=zfs-import.targetBefore=zfs-mount.service[Service]Type=oneshotRemainAfterExit=yesExecStart=/usr/bin/zfs load-key -aStandardInput=tty-force[Install]WantedBy=zfs-mount.service

    Enable zfs-load-key service

    sudo systemctl daemon-reloadsudo systemctl enable zfs-load-key
    find /dev/disk/by-id/ata-* | cut -d '/' -f 5 | xargssudo zpool create -f -o ashift=12 -O acltype=posixacl -O compression=lz4 -O atime=on \  -O relatime=on -O xattr=sa -O recordsize=1M -m /mnt/deadpool deadpool raidz2 <DEVICE LIST>  sudo zpool add deadpool cache <L2ARC DEVICE>sudo systemctl enable --now zfs-scrub-weekly@deadpool.timersudo openssl rand -hex -out /root/deadpool.key 32sudo chmod 0600 /root/deadpool.keysudo zfs create -o encryption=aes-256-gcm -o keylocation=file:///root/deadpool.key \  -o keyformat=hex -o mountpoint=/mnt/deadpool/crypt deadpool/crypt

    Nice random zfs list commands.

    sudo zpool list -vPHsudo zfs list -o name,used,avail,refer,compressratio,compress,recordsize,encryption,mountpoint
    Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

    [8]ページ先頭

    ©2009-2025 Movatter.jp