This episode builds storage on top of a ZFS pool: the vdev and pool topology concepts, datasets with compression, quota, and recordsize properties, up to zvols for block storage. You also create shared folders for SMB and NFS with proper permissions and folder structure.

In episode 5 you understood ZFS as a filesystem. Now it's time to use it to build a real storage structure. Episode 6 covers three main layers: the pool as a collection of disks, datasets as the logical storage units inside the pool, and shares as the data outlet to clients.
One common beginner mistake is storing all data directly at the pool root without creating datasets. As a result, quotas, snapshots, and permission control become rigid. Making a habit of separating data into datasets from the start will save you years later.
By the end of this episode you'll be able to create a pool with the right vdev topology, create datasets with tailored properties, create zvols, and serve it all as both SMB and NFS shares.
A pool is a logical storage unit that brings together one or more disks. Inside the pool, disks are grouped into vdevs (virtual devices), and each vdev carries its own redundancy characteristics. The pool topology is set when zpool create is run and can't be changed casually.
zpool create tank mirror sda sdb mirror sdc sddThe zpool create tank mirror sda sdb mirror sdc sdd command creates a tank pool from two mirror pairs. This combination of vdevs determines the pool's overall capacity and resilience.
Some patterns commonly used in the field:
These varied patterns matter because a single vdev failure can cripple the entire pool. For important data, at minimum use one mirror or RAIDZ2 vdev.
A dataset is a filesystem unit inside the pool with independent properties like compression, quota, and recordsize. Each dataset can be snapshotted and shared on its own. Creating a separate dataset for each type of data is a best practice.
zfs create tank/data
zfs create tank/data/foto
zfs set compression=zstd tank/data
zfs listThe zfs create tank/data command creates a dataset, while zfs set compression=zstd enables compression. Each dataset appears in the zfs list output.
The three properties you'll set most often:
zstd is modern and efficient; suitable for almost all data.1t.zfs set quota=2t tank/data
zfs set recordsize=1m tank/data/fotoThe zfs set quota=2t command caps the tank/data dataset at 2 terabytes. The recordsize rule should be decided when the dataset is created, because changing it after data has been written only affects new files.
A zvol is a special dataset that provides a raw block device at /dev/zvol. Unlike a dataset that stores files, a zvol is used as a virtual disk for VMs, iSCSI targets, or swap.
zfs create -V 100g tank/zvol-vm1
lsblk /dev/zvol/tank/zvol-vm1The zfs create -V 100g tank/zvol-vm1 command creates a 100-gigabyte block device. This zvol will be reused in episode 11 for iSCSI and episode 19 for VMs.
Use a dataset for file data accessed as a share; use a zvol for block-level needs like VMs, databases with direct access, or iSCSI targets. This decision determines how clients see the storage: as a directory or as a disk.
Once datasets are ready, data is served to clients through shares. In TrueNAS SCALE, open the Shares menu and add an SMB share or NFS share pointing to the dataset. In OpenMediaVault, create a shared folder and attach it to the SMB/CIFS or NFS service.
smbutil view //192.168.1.100
showmount -e 192.168.1.100The showmount -e command lists NFS exports. Combining smbutil view and showmount is a quick way to check active shares.
Build a dataset structure that reflects your needs, for example:
tank/media for movies and music.tank/dokumen for office archives.tank/backup for backups of all devices.tank/apps for self-hosted application data.A consistent structure makes applying quotas, snapshots, and per-dataset permissions in episodes 7 and 12 much easier.
When creating a share, assign the users or groups allowed to access it. On SMB, permissions can be set to read-only or read-write per user. The principle: start with the most restrictive settings, then open up access as needed.
chown -R userdata:users /tank/data/dokumen
chmod 750 /tank/data/dokumenThe chown and chmod commands above set the owner and basic access mode. Finer ACL details will be covered in episodes 7 and 13.
Tip
Never write data directly to the pool root. Always create a dataset first. Keep the pool root empty for system needs and initial snapshots.
In this episode 6 you built the storage foundation: understanding pools and vdevs, creating datasets with compression, quota, and recordsize, creating zvols for block storage, and serving data as SMB and NFS shares with a tidy folder structure.
Key takeaways:
In the next episode, episode 7, we'll cover users, groups, and permissions — from local users to LDAP and Active Directory integration, POSIX permissions, NFSv4 and SMB ACLs, and per-user quota settings. Your data is organized; now it's time to control who can touch it.