Initial Commit w/ Host Playbooks
This commit is contained in:
25
host_init/zfs.md
Normal file
25
host_init/zfs.md
Normal file
@@ -0,0 +1,25 @@
|
||||
// Write me a cheatsheet for ZFS
|
||||
|
||||
# ZFS Cheatsheet
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| `zpool status` | Show status of zpools |
|
||||
| `zpool import ssd` | Import an existing zpool named ssd |
|
||||
| `zpool create ssd /dev/sda` | Create a zpool named ssd with a single disk /dev/sda |
|
||||
| `zfs list` | Show some metadata of zpools |
|
||||
| `zfs create ssd/mydataset` | Create a dataset named mydataset in the zpool ssd |
|
||||
| `zfs set compression=lz4 ssd/mydataset` | Set compression to lz4 for the dataset mydataset in the zpool ssd |
|
||||
| `zfs destroy ssd/mydataset` | Delete a dataset named mydataset in the zpool ssd |
|
||||
|
||||
> IMPORTANT: If you want to use a ZFS Dataset as a host volume for a nomad job, you will need to set permissions for docker to have read and write access by running `chown 70 /zpool/dataset/path` on the host.
|
||||
|
||||
## Notes
|
||||
|
||||
- ZFS is a file system and logical volume manager that is scalable, includes data integrity, and has a lot of features for managing storage.
|
||||
|
||||
- `zpool` is the command for managing storage pools and `zfs` is the command for managing datasets. Datasets exist within storage pools.
|
||||
|
||||
- ZFS has a lot of features such as compression, deduplication, snapshots, and clones.
|
||||
|
||||
- ZFS is a good choice for managing storage on a single host but it is not a distributed file system. If you need a distributed file system, you should look into Ceph or Seaweedfs.
|
||||
Reference in New Issue
Block a user