This episode compares the main filesystems for NAS: ZFS with RAIDZ, mirrors, copy-on-write, snapshots, checksums, and scrubbing, plus the alternatives ext4 with mdadm and btrfs. You learn the concepts of datasets and zvols, then when to choose each filesystem based on your storage needs.

With the NAS installed, the most important technical decision left is the filesystem. Episode 5 compares the three main candidates: ZFS, the standard on TrueNAS SCALE; ext4 with mdadm, commonly used on OpenMediaVault; and btrfs, which is growing in popularity as an alternative.
ZFS wins on data integrity and snapshot features, but has a larger RAM appetite. ext4 is the most stable and simple filesystem, while btrfs offers built-in copy-on-write and snapshots at a lower resource cost than ZFS.
By the end of this episode you'll be able to explain the fundamental differences among the three and pick the right filesystem for each workload.
ZFS combines volume management and filesystem in a single layer. The basic topologies you can create:
zpool create mirror mirror-a sda sdb
zpool create raidz2 raidz-a sdc sdd sde sdfThe zpool create mirror mirror-a sda sdb command creates a mirror pool, while zpool create raidz2 creates a pool with double parity.
ZFS writes data using a copy-on-write mechanism: old data isn't overwritten immediately; instead, new blocks are written first and then referenced atomically. This is the foundation of snapshots — point-in-time views of the data that are instant and cost almost nothing in storage.
zfs snapshot tank/data@sebelum-update
zfs list -t snapshotThe zfs snapshot tank/data@sebelum-update command creates an instant snapshot. The snapshot list can be viewed with zfs list -t snapshot.
Every data block in ZFS has a checksum that is verified when read. If there's a mismatch, ZFS tries to repair the data from parity or the mirror. Scrubbing periodically checks the entire pool to detect hidden damage.
zpool scrub tank
zpool status tankThe zpool scrub tank command starts a full scan. Use zpool status to view progress and verification results.
On top of the pool, ZFS works with two entities: datasets for file storage (like directories with their own properties) and zvols for raw block storage (like virtual disks). Datasets can have separate quotas, compression, and snapshots; zvols are used for VMs, iSCSI, or swap. Both will be broken down further in episodes 6 and 11.
ext4 is the most mature and stable filesystem in the Linux ecosystem. On OpenMediaVault, the common combination is ext4 on top of mdadm RAID. Its strengths: simple, resource-efficient, and supported everywhere. Its weaknesses: no data checksums, no built-in snapshots, and corruption repair relies on fsck.
mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdb /dev/sdc
mkfs.ext4 /dev/md0The mdadm --create command builds a RAID1 array from two disks, then mkfs.ext4 formats it with ext4.
ext4 remains a legitimate choice for a simple NAS: limited hardware, minimal snapshot needs, or a team already comfortable with classic Linux tooling. Since it has no built-in snapshots, you'll need to rely on LVM backups, rsync, or other layer solutions for point-in-time protection.
btrfs is Linux's copy-on-write filesystem that provides built-in snapshots, checksums, and RAID1/RAID5. It's lighter than ZFS but less mature for RAID5/6, which had problems on older kernels. It suits simple NAS setups or single-disk systems with snapshot needs.
mkfs.btrfs -d raid1 -m raid1 /dev/sdb /dev/sdc
mount /dev/sdb /mnt/dataThe mkfs.btrfs -d raid1 -m raid1 command creates btrfs with mirrored metadata and data.
btrfs snapshots are created through subvolumes, a concept slightly different from ZFS datasets. Here's an example of creating a subvolume snapshot:
btrfs subvolume snapshot /mnt/data/@ /mnt/data/@snap-1
btrfs subvolume list /mnt/dataThe btrfs subvolume snapshot command copies a subvolume copy-on-write. This pattern is enough for simple rollback needs without ZFS's full complexity.
A practical guide for choosing a filesystem:
Warning
btrfs RAID5 and RAIDZ1 are both not the best choice for very large disks, because long rebuild times raise the risk of a second failure during rebuild. Consider RAIDZ2 or btrfs RAID1 instead.
In this episode 5 you compared ZFS with ext4/mdadm and btrfs, understood ZFS's standout features like copy-on-write, snapshots, checksums, and scrubbing, and have a guide for choosing a filesystem based on your needs.
Key takeaways:
In the next episode, episode 6, we'll build pools, datasets, and shares — from vdev concepts, dataset properties like compression and quotas, to zvols for block storage and creating SMB/NFS shares. It's time to fill the pool you've created.