Last active
May 16, 2018 08:19
-
-
Save sq3/21fb892dc6bd28316bac5bc21f0abbc2 to your computer and use it in GitHub Desktop.
setup zfs on arch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# this script isntalls zfs via dkms and needs sudo package installed an | |
# configured for the user who runs this script. | |
# | |
# The zpools are named tank. | |
# Give the disk you want to use for the zpool as $1 | |
# | |
# https://wiki.archlinux.org/index.php/ZFS | |
$1=pool_disk | |
sudo pacman -Suy | |
sudo pacman -S linux-lts linux-lts-headers | |
sudo pacman -R linux | |
sudo pacman -S dkms | |
grub-mkconfig -o /boot/grub/grub.cfg | |
curl -O https://aur.archlinux.org/cgit/aur.git/snapshot/spl-dkms.tar.gz | |
tar xvfz spl-dkms.tar.gz | |
cd spl-dkms | |
makepkg -sri . | |
cd .. | |
curl -O https://aur.archlinux.org/cgit/aur.git/snapshot/zfs-dkms.tar.gz | |
ls -la | |
tar xvfz zfs-dkms.tar.gz | |
cd zfs-dkms | |
ls -la | |
cd zfs-dkms | |
ls -la | |
makepkg -sri . | |
sudo modprobe zfs | |
sudo zpool create tank $pool_disk | |
zpool set cachefile=/etc/zfs/zpool.cache tank | |
systemctl enable zfs-mount | |
systemctl enable zfs-import-cache |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment