UP | HOME

ZFS

Table of Contents

1. Useful commands

List snapshots

zfs list -t snapshot

2. Replacing the drives

2.1. Collect various bits of info we will need later

zpool status -v

Next get the zdb info.

zdb

Make sure expansion is on

zpool set autoexpand=on rpool

Save all the above info in a file somewhere

2.2. Power down

  1. Pull one of the drives
    1. note the SN
  2. Put new disk in its place
  3. Power on.

2.3. Find the new drive's ID

ls -lart /dev/disk/by-id

2.3.1. Add GPT table

parted /dev/disk/by-id/.....whatever
(parted) mklabel GPT
(parted) q

2.4. Replace drive in zpool

Get the UNAVAIL_DISK_ID via

zpool status

Actually replace the drive:

zpool replace rpool $UNAVAIL_DISK_ID /dev/disk/by-id/.....whatever

Date: 2024-09-18 Wed 14:58

Author: Aaron Bieber

Created: 2025-08-07 Thu 11:37

Validate