.
This commit is contained in:
20
TrueNas/ZFS/ZFS Commands.md
Normal file
20
TrueNas/ZFS/ZFS Commands.md
Normal 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.*
|
||||||
Reference in New Issue
Block a user