Linux command
zfs 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
List all datasets
zfs list
Create a new filesystem
sudo zfs create [pool/dataset]
Create a snapshot
sudo zfs snapshot [pool/dataset@snapshot_name]
List snapshots
zfs list -t snapshot
Rollback to snapshot
sudo zfs rollback [pool/dataset@snapshot_name]
Set a property
sudo zfs set [compression=lz4] [pool/dataset]
Get property value
zfs get [compression] [pool/dataset]
Destroy a dataset
sudo zfs destroy [pool/dataset]
说明
zfs manages ZFS filesystems, snapshots, clones, and volumes. ZFS is a combined filesystem and volume manager with advanced features like copy-on-write, snapshots, checksums, and built-in compression. Key concepts: - Datasets are filesystems or volumes within a pool - Snapshots are read-only point-in-time copies - Clones are writable copies created from snapshots - Properties control behavior (compression, quota, mountpoint) ZFS uses hierarchical datasets: pool/parent/child inherits properties from parent. Properties can be set locally to override inheritance. Common properties include compression, quota, reservation, recordsize, atime, and mountpoint.
FAQ
What is the zfs command used for?
zfs manages ZFS filesystems, snapshots, clones, and volumes. ZFS is a combined filesystem and volume manager with advanced features like copy-on-write, snapshots, checksums, and built-in compression. Key concepts: - Datasets are filesystems or volumes within a pool - Snapshots are read-only point-in-time copies - Clones are writable copies created from snapshots - Properties control behavior (compression, quota, mountpoint) ZFS uses hierarchical datasets: pool/parent/child inherits properties from parent. Properties can be set locally to override inheritance. Common properties include compression, quota, reservation, recordsize, atime, and mountpoint.
How do I run a basic zfs example?
Run `zfs list` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
Where can I find more zfs examples?
This page includes 8 examples for zfs, plus related commands for nearby Linux tasks.