---
title: ZFS Common Commands
description: ZFS Commands
published: true
date: 2026-02-20T04:26:23.798Z
tags: zfs commands
editor: markdown
dateCreated: 2026-01-31T15:23:07.585Z
---

# ZFS Essential Commands Cheat Sheet

---

## Pool Health & Status

zpool status

zpool status -v

zpool list

## Dataset Space & Usage

zfs list

zfs list -r vault

zfs list -o name,used,avail,refer,logicalused,compressratio

zfs list -r -o name,used,avail,refer,quota,reservation vault

## Dataset Properties & Settings

zfs get all vault/dataset

zfs get -r compression,dedup,recordsize,atime,quota,reservation vault

zfs get -r compression,dedup,recordsize,encryption,keylocation,keyformat,snapdir vault

zfs get -s local -r all vault

zfs get quota,refquota,reservation,refreservation -r vault

## Mount Encrypted Dataset

zfs load-key vault/Green/Pocket

zfs mount vault/Green/Pocket

## Pool I/O & Performance Monitoring

zpool iostat -v 1

arcstat 1

cat /proc/spl/kstat/zfs/arcstats

## Scrubs & Data Integrity

zpool scrub vault

zpool scrub -s vault

zpool status

## Snapshots

zfs snapshot vault/dataset@snapname

zfs list -t snapshot

zfs rollback vault/dataset@snapname

zfs clone vault/dataset@snapname vault/dataset-clone

## Replication (Send / Receive)

zfs send vault/dataset@snap1 | zfs receive backup/dataset

zfs send -i snap1 vault/dataset@snap2 | zfs receive backup/dataset

zfs send -nv vault/dataset@snap1

## Dataset Tuning (Live-Safe Changes)

zfs set compression=lz4 vault/dataset

zfs set recordsize=1M vault/dataset

zfs set atime=off vault/dataset

zfs set dedup=on vault/dataset

## Encryption Management

zfs get encryption,keylocation,keystatus vault/dataset

zfs unload-key vault/dataset

zfs load-key vault/dataset

## Disk Preparation & Cleanup

wipefs /dev/sdX

wipefs -a /dev/sdX

zpool labelclear -f /dev/sdX

sgdisk --zap-all /dev/sdX

lsblk -f /dev/sdX

## Pool Expansion (Add VDEV)

zpool add vault raidz2 \
  /dev/disk/by-id/disk1 \
  /dev/disk/by-id/disk2 \
  /dev/disk/by-id/disk3 \
  /dev/disk/by-id/disk4 \
  /dev/disk/by-id/disk5

## Pool Import / Recovery

zpool import

zpool import vault

zpool import -f vault

zpool import -o readonly=on vault

## Locks, Holds & History

zfs holds -r vault

zpool history

zfs diff vault/dataset@snap1 vault/dataset@snap2

## Deduplication & Compression Stats

zpool list -v

zdb -DD vault

## Inventory / Documentation Dumps

zpool status > zpool-status.txt

zfs list -r > zfs-layout.txt

zfs get -r all vault > zfs-settings.txt

## Top 10 Must-Know Commands

zpool status
zpool list
zpool iostat -v 1
zpool scrub vault
zfs list
zfs get all vault/dataset
zfs snapshot vault/dataset@snap
zfs rollback vault/dataset@snap
zfs send | zfs receive
arcstat 1

