This commit is contained in:
2026-01-11 17:13:16 +01:00
parent 96cbde72f0
commit 4ae86c6994

View File

@@ -0,0 +1,20 @@
# ZFS Commands
Use sudo for all commands unless specifically stated.
## Rename dataset
`zfs [-f][-p][-u] rename oldname newname`
(Note: remember to use the full path i.e. tank/oldname etc.)
- `-f`
*to force unmount the dataset if needed (has no effect if used together with `-u`)*
- `-p`
*Creates all the nonexistent parent datasets. Datasets created in this manner are automatically mounted according to the mountpoint property inherited from their parent.*
- `-u`
*Do not remount file systems during rename. If a file system's mountpoint property is set to legacy or none, the file system is not unmounted even if this option is not given*
`zfs -r rename snapshot snapshot`
- `-r`
*Recursively rename the snapshots of all descendent datasets. Snapshots are the only dataset that can be renamed recursively*
## Get compression ratios
`zfs get compressratio [dataset]`
*If no dataset given, the command with list out all datasets and their compressionratios. If dataset given, then only that dataset is returned.*