Aug. 8, 2023
Usage
Basics
The following example aims at illustrating the core concept of zfs
send/recv:
- Let’s create a dataset via
zfs create storage/test-source;
- Next, we’ll take a snapshot, since only snapshots of a live filesystem
can be sent, not the dataset itself:
zfs snap storage/test-source@one;
- Now, let’s send this snapshot to a destination dataset:
zfs send -v storage/test-source@one | zfs recv -v storage/test-destination; we now
have a working independant copy of the dataset on the destination, ain’t
this cool?
- Say we did some changes, and we wanna back it up! Let’s take a second
snapshot:
zfs snap storage/test-source@two;
- Now, let’s send the increment to the same target:
zfs send -v -i storage/test-source@two | zfs recv -v storage/test-destination
- And… voilà ! One can list snapshots via
zfs list -t snap to check what’s
up.
Note: To track the progress of zfs send | zfs recv, one can use a
well-known tool, pv, as suggested in
the Solaris
documentation.
May. 2, 2023
Definitions
Most of us came from traditional storage systems, and had to wrap our minds
around new concepts introduced by zfs. Let’s break it down:
zpool (RAID array + volume manager)
A zpool combines multiple physical disks into a single storage pool,
handling redundancy, caching, and data integrity at the block level. It’s
comparable to a:
- RAID array, but more flexible and self-healing;
- volume manager, dynamically allocating storage without requiring fixed
partitions;
- storage backend, on top of which ZFS datasets (filesystems) are created;
Instead of manually partitioning disks or setting up traditional RAID, zfs
automatically distributes data across the zpool.
Apr. 17, 2023
Goals
Using ZFS for NAS appliances storing large media files is a very common
scenario. In this specific context, we may want to get:
- great storage capacity;
- good resilience;
- decent performance;
…in that order!
We’ll try & figure out proper storage designs for 8 large hard disks in this
specific context.
Concepts
You may well want to read choosing the right ZFS pool
layout
in addition to getting familiar with ZFS
concepts.