serverZFS Proxmox Config

  1. Create ZFS pool in Proxmox UI : pve > disks > ZFS > Create ZFS

Create ZFS Datasets

Datasets in ZFS allow for organizing and structuring data within ZFS. You can create datasets on a Zpool to organize how and where specific data is stored. A dataset has no fixed size, it can expands to the pool size (or to the quota if set). For example you could have one datasets for your immich and another for your NFS share.

to create 'immich' dataset in 'tank' ZFS pool:

List ZFS pools/datasets

Renaming datasets/snapshots

Migrating ZFS

Creating snapshot

Sending snapshot

circle-info

You can also migrate whole ZFS pool by just not specifying any /dataset. E.g: zfs snapshot -r pool@migration ...

Access ZFS dataset in LXCs

Proxmox setup (done once)

Bind Mount Dataset to LXC

In LXC, adding nas_shares group

Add disk to an existing pool

circle-check

Increase Redundancy: From 1 Disk to a Mirror (RAID 1)

Adds <new_disk> to duplicate the data from <existing_disk>.

Example:

Increase Capacity: Adding a New VDEV

Stripe (RAID 0)

Add a single disk to increase capacity without redundancy.

zpool add <pool_name> <disk_1>

Danger: Creates a RAID 0 stripe with the rest of the pool. Complete data loss upon any single drive failure.

New Mirror (RAID 10)

Add two mirrored disks to increase capacity with redundancy.

zpool add <pool_name> mirror <disk_1> <disk_2>

Increases the pool capacity by adding a new mirrored VDEV.

New RAIDZ-1

Add three disks with 1 parity disk to increase capacity.

zpool add <pool_name> raidz1 <d1> <d2> <d3>

Increases pool capacity with a new RAIDZ-1 VDEV.

New RAIDZ-2

Add four disks with 2 parity disks to increase capacity.

zpool add <pool_name> raidz2 <d1> <d2> <d3> <d4>

Increases pool capacity with a new RAIDZ-2 VDEV.

Expanding an Existing RAIDZ VDEV

zpool online -e <pool_name> <new_disk> (after physical addition) OR zpool expand <pool_name>

Verification after Adding

Last updated