-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from mpoullain/openzfs
Add OpenZFS Cheat sheet
- Loading branch information
Showing
8 changed files
with
211 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# zpool – configure ZFS storage pools | ||
|
||
___A ZFS storage pool is a logical collection of devices that provide space for datasets.___ | ||
|
||
List pool health status and space usage | ||
`zpool list` | ||
|
||
Display the detailed health status | ||
`zpool status` | ||
`zpool status -x` | ||
|
||
Create a new storage pool | ||
`zpool create <pool> <disk>` | ||
|
||
Create a new storage pool (RAID1) | ||
`zpool create <pool> mirror <first_disk> <second_disk>` | ||
|
||
Grow-up a storage pool | ||
`zpool add <pool> <disk>` | ||
|
||
Remove a storage pool | ||
`zpool destroy <pool>` | ||
|
||
Import a storage pool | ||
`zpool import <pool>|<pool_id>` | ||
|
||
Export a storage pool | ||
`zpool export <pool>|<pool_id>` | ||
|
||
Display I/O statistics | ||
`zpool iostat <interval>` | ||
|
||
Display the command history | ||
`zpool history <pool>` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# zfs – configure ZFS file systems | ||
|
||
___A ZFS dataset of type filesystem can be mounted.___ | ||
|
||
List the property information for the fs-type datasets | ||
`zfs list` | ||
|
||
Create a new ZFS file system | ||
`zfs create <pool>/<dataset>` | ||
|
||
Remove a ZFS file system | ||
`zfs destroy <pool>/<dataset>` | ||
|
||
Set mount point for a dataset | ||
`zfs set mountpoint=<path> <pool>/<dataset>` | ||
|
||
Mount and umount a ZFS file system | ||
`zfs mount [-o mountpoint=<dir>]<pool>/<dataset>` | ||
`zfs umount <pool>/<dataset>` | ||
|
||
Limit the amount of space a dataset can consume | ||
`zfs set refquota=<size> <pool>/<dataset>` | ||
|
||
Guaranty minimum amount of space to a dataset | ||
`zfs set refreservation=<size> <pool>/<dataset>` | ||
|
||
|
||
# zfs – configure ZFS volumes | ||
|
||
___A ZFS dataset of type volume is a logical volume exported as a raw or block device.___ | ||
|
||
Create a volume with reservation (thick) | ||
`zfs create -V <size> <volume>` | ||
|
||
Creates a sparse volume with no reservation | ||
`zfs create -s -V <size> <volume>` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<html> | ||
<head> | ||
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700|Droid+Sans:700" rel="stylesheet"> | ||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> | ||
<link rel="stylesheet" href="../common.css"> | ||
<link rel="stylesheet" href="../common/lib/atom-one-light.css"> | ||
<link rel="stylesheet" href="./@@folder.css"> | ||
</head> | ||
<body> | ||
<input type="checkbox" id="showPreview"/> | ||
<div class="first-side"> | ||
@@include('../../dist/common/first-side/header.html', {"title": "OpenZFS", "subtitle": "The smartest reliable filesystem", "imageName": "@@folder"}) | ||
|
||
<main> | ||
<div class="column1"> | ||
@@include('../../dist/@@folder/first-side/column1.html') | ||
</div> | ||
<div class="column2"> | ||
@@include('../../dist/@@folder/first-side/column2.html') | ||
</div> | ||
</main> | ||
|
||
@@include('../../dist/common/footer.html', {"class": "print-only"}) | ||
|
||
|
||
</div> | ||
|
||
<hr class="no-print"/> | ||
|
||
<div class="reverse"> | ||
@@include('../../dist/common/reverse/header.html', {"title": "OpenZFS", "imageName": "@@folder"}) | ||
|
||
<main> | ||
<div class="column1"> | ||
@@include('../../dist/@@folder/reverse/column1.html') | ||
</div> | ||
<div class="column2"> | ||
@@include('../../dist/@@folder/reverse/column2.html') | ||
</div> | ||
</main> | ||
|
||
@@include('../../dist/common/footer.html') | ||
</div> | ||
|
||
<script src="../common/lib/highlight.pack.js"></script> | ||
<script src="../common/script.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/* put your all custom css rules here */ | ||
/* you must not change other scss files */ | ||
|
||
body { | ||
// available colors are: blue, green, purple, orange and grey | ||
--currentColor: var(--orange); | ||
|
||
main div { | ||
img { | ||
height: 230px; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# zfs – configure ZFS snapshots | ||
|
||
___A snapshot is a read-only copy of a file system.___ | ||
|
||
_File system snapshots can be accessed under the .zfs/snapshot directory in the root of the file system._ | ||
|
||
List snapshots | ||
`zfs list -t snapshot` | ||
|
||
Create a snapshot | ||
`zfs snapshot <pool>/<dataset>@<snapshot>` | ||
|
||
Rollback a snapshot | ||
`zfs rollback <pool>/<dataset>@<snapshot>` | ||
|
||
Remove a snapshot | ||
`zfs destroy <pool>/<dataset>@<snapshot>` | ||
|
||
Remove a snapshot and his descendent snapshots | ||
`zfs destroy -r <pool>/<dataset>@<snapshot>` | ||
|
||
|
||
# zfs – configure ZFS CLONES | ||
|
||
___A clone is a writable volume or file system whose initial contents are the same as the original dataset.___ | ||
|
||
Create a clone | ||
`zfs clone <snapshot> <filesystem>|<volume>` | ||
|
||
|
||
# zfs – configure backup and restore | ||
|
||
___ZFS implements data protection feature___ | ||
|
||
Backup a snapshot in a file | ||
`zfs send <pool>/<dataset>@<snapshot> > <file>` | ||
|
||
Restore a file system from a file | ||
`zfs recv <pool>/<dataset> < <file>` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
Perform increment backup in a file | ||
`zfs send -i <snapshot_n> <snapshot_n+1> > <file>` | ||
|
||
Perform differential backup in a file | ||
`zfs send -I <snapshot_n> <snapshot_n+p> > <file>` | ||
|
||
Duplicate a snapshot as a new file system | ||
`zfs send <pool>/<dataset>@<snapshot> | zfs recv <pool>/<other_dataset>` | ||
|
||
Duplicate a snapshot on a different host | ||
`zfs send <pool>/<dataset>@<snapshot> | ssh <host> zfs recv <pool>/<dataset>` | ||
|
||
|
||
# zfs – set ZFS file systems properties ##### | ||
|
||
___Properties control ZFS behaviour.___ | ||
|
||
List properties of a dataset | ||
`zfs get all <pool>/<dataset>` | ||
|
||
Create a NFS share | ||
`zfs set sharenfs=on <pool>/<dataset>` | ||
|
||
Activate compression | ||
`zfs set compression=gzip <pool>/<dataset>` | ||
|
||
Activate encryption (only at the creation of the dataset), with Oracle ZFS | ||
`zfs create -o encryption=on <pool>/<dataset>` | ||
|
||
Activate read-only mode | ||
`zfs set readonly=on <pool>/<dataset>` | ||
|
||
Prevent executing from within this file system | ||
`zfs set exec=off <pool_name>/<dataset_name>` |