This commit is contained in:
JMARyA 2023-12-08 17:04:29 +01:00
parent 763edc44dc
commit cb54781f1f
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
5 changed files with 99 additions and 21 deletions

View file

@ -5,4 +5,4 @@ website: https://hashcat.net/hashcat
---
# hashcat
#wip #🐇
#wip #🐇 #notnow

File diff suppressed because one or more lines are too long

View file

@ -3,8 +3,8 @@ obj: application
android-id: com.github.android
website: https://github.com
---
# GitHub
#refactor
GitHub is a web-based platform for version control using [Git](../../dev/Git.md). It provides a collaborative environment for developers to work on projects, manage source code, and track changes. Additionally with GitHub Copilot it offers a AI based language model to help with coding. You have the option to automate with [GitHub Actions](GitHub%20Actions.md).
![Screenshot][Screenshot]

View file

@ -4,4 +4,4 @@ website: https://tailwindcss.com
---
# Tailwind CSS
#wip #🐇
#wip #🐇 #notnow

View file

@ -4,7 +4,7 @@ website: https://openzfs.org/wiki/Main_Page
repo: https://github.com/openzfs/zfs
obj: filesystem
---
#refactor
# ZFS
[ZFS](https://en.wikipedia.org/wiki/ZFS "wikipedia:ZFS") is an advanced filesystem.
@ -16,6 +16,7 @@ zpool create -f -m <mount> <pool> [raidz(2|3)|mirror] <ids>
**Pool Status**
```shell
zpool list
zpool status -v
```
@ -60,7 +61,7 @@ zpool set cachefile=/etc/zfs/zpool.cache <pool>
```
## Datasets
### Creation
### Dataset Managment
**Create Dataset**
```shell
zfs create <nameofzpool>/<nameofdataset>
@ -68,10 +69,16 @@ zfs create <nameofzpool>/<nameofdataset>
**Create encrypted dataset:**
```shell
dd if=/dev/random of=/path/to/key bs=1 count=32 # Generate key
openssl rand 32 > /path/to/key # Generate key
zfs create -o encryption=on -o keyformat=raw -o keylocation=file://$KEYLOCATION "$DATASET"
```
**Change encryption keys:**
```shell
zfs change-key -l [-o keylocation=value] [-o keyformat=value] [-o pbkdf2iters=value] filesystem
```
**Load all encryption keys**
```shell
zfs load-key -a
@ -96,12 +103,52 @@ StandardInput=tty-force
WantedBy=zfs-mount.service
```
**Destroy dataset:**
```shell
# Destroy dataset
zfs destroy <pool>/<dataset>
# Destroy Dataset recursively with all subdatasets
zfs destroy -r <pool>/<dataset>
```
**Mount dataset:**
```shell
zfs mount <pool>/<dataset>
zfs unmount <pool>/<dataset>
```
### Snapshots
**Create snapshot:**
```shell
zfs snapshot <pool>/<dataset>@<snapshot>
```
**Rollback snapshot:**
```shell
# Rollback to snapshot and destroy any newer snapshots
zfs rollback -r <pool>/<dataset>@<snapshot>
```
**Show differences between snapshots:**
```shell
zfs diff -F tank/test@before tank/test
```
The `-F` flag shows more information about the type of files that have changed:
| Symbol | Meaning |
| ------ | ---------------- |
| `B` | Block device |
| `C` | Character device |
| `/` | Directory |
| `>` | Door |
| `|` | Named pipe |
| `@` | Symbolic link |
| `P` | Event port |
| `=` | Socket |
| `F` | Regular file |
**Send and receive:**
```shell
zfs send -v -w <pool>/<dataset>@<snapshot> | zfs recv <pool>/<newdataset>
@ -119,18 +166,47 @@ zfs set <property>=<value> <pool>/<dataset>
```
### Available Properties
- `compressratio` : Shows information on compression
- `creation` : Get creation date
- `mounted` : Status on mount
- `used` : Information on usage
- `canmount` : Forbid or enable mounting
- `casesensitivity` : Choose sensitivity
- `compression` : Choose compression method
- `encryption` : Encryption Information
- `mountpoint` : Specify the mountpoint
- `quota` : Filesystem Quota
- `readonly` : Readonly or Readwrite
- `reservation` : Reserved Space
| PROPERTY | EDIT | INHERIT | VALUES |
| ---------------------- | ---- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `available` | NO | NO | `<size>` |
| `clones` | NO | NO | `<dataset>[,...]` |
| `compressratio` | NO | NO | `<1.00x or higher if compressed>` |
| `createtxg` | NO | NO | `<uint64>` |
| `creation` | NO | NO | `<date>` |
| `encryptionroot` | NO | NO | `<filesystem \| volume>` |
| `filesystem_count` | NO | NO | `<count>` |
| `guid` | NO | NO | `<uint64>` |
| `keystatus` | NO | NO | `none` / `unavailable` / `available` |
| `logicalreferenced` | NO | NO | `<size>` |
| `logicalused` | NO | NO | `<size>` |
| `mounted` | NO | NO | `yes` / `no` |
| `origin` | NO | NO | `<snapshot>` |
| `redact_snaps` | NO | NO | `<snapshot>[,...]` |
| `referenced` | NO | NO | `<size>` |
| `snapshot_count` | NO | NO | `<count>` |
| `type` | NO | NO | `filesystem` / `volume` / `snapshot` / `bookmark` |
| `used` | NO | NO | `<size>` |
| `usedbychildren` | NO | NO | `<size>` |
| `usedbydataset` | NO | NO | `<size>` |
| `usedbyrefreservation` | NO | NO | `<size>` |
| `usedbysnapshots` | NO | NO | `<size>` |
| `written` | NO | NO | `<size>` |
| `atime` | YES | YES | `on` / `off` |
| `casesensitivity` | NO | YES | `sensitive` / `insensitive` / `mixed` |
| `checksum` | YES | YES | `on` / `off` / `fletcher2` / `fletcher4` / `sha256` / `sha512` / `skein` / `edonr` / `blake3` |
| `compression` | YES | YES | `on` / `off` / `lzjb` / `gzip` / `gzip-[1-9]` / `zle` / `lz4` / `zstd` / `zstd-[1-19]` / `zstd-fast` / `zstd-fast-[1-10,20,30,40,50,60,70,80,90,100,500,1000]` |
| `copies` | YES | YES | `1` / `2` / `3` |
| `dedup` | YES | YES | `on` / `off` / `verify` / `sha256[,verify]` / `sha512[,verify]` / `skein[,verify]` / `edonr,verify` / `blake3[,verify]` |
| `encryption` | NO | YES | `on` / `off` / `aes-128-ccm` / `aes-192-ccm` / `aes-256-ccm` / `aes-128-gcm` / `aes-192-gcm` / `aes-256-gcm` |
| `keyformat` | NO | NO | `none` / `raw` / `hex` / `passphrase` |
| `keylocation` | YES | NO | `prompt` / `<file URI>` / `<https URL>` / `<http URL>` |
| `mountpoint` | YES | YES | `<path>` / `legacy` / `none` |
| `pbkdf2iters` | NO | NO | `<iters>` |
| `quota` | YES | NO | `<size>` / `none` |
| `readonly` | YES | YES | `on` / `off` |
| `relatime` | YES | YES | `on` / `off` |
| `reservation` | YES | NO | `<size>` / `none` |
| `snapdir` | YES | YES | `hidden` / `visible` |
### Scrub
Like [Btrfs](Btrfs.md) ZFS can heal itself with scrubbing