zpool setup

2024

Setup

  • Debian - install zfs

codename=$(lsb_release -cs);echo "deb http://deb.debian.org/debian $codename-backports main contrib non-free"|sudo tee -a /etc/apt/sources.list
sudo apt update -y
sudo apt install -y linux-headers-amd64
sudo apt install -y -t stable-backports zfsutils-linux

Replacing a faulty disk

  • List of devices

sudo fdisk -l
lsblk
  • Find device ids

ls -rtl /dev/disk/by-id
  • Do the replacement

sudo zpool replace zfspool 12349527577240784111 scsi-360022480139c3432add22462c9895933

Managing Data Corruption

  • Integrity check

zpool scrub tank
  • Get status of the pool

zpool status -v tank