Disk configuration for 'commitment'
home |
airgap |
charisma |
verve |
trail |
commitment |
discernment |
lore
For more info see 'commitment'.
sda (4TB)
V6GGTPKS
data
sdb (4TB)
V6H42DES
data
sdc (4TB)
V1JBN0GH
data
sdd (4TB)
V6GGRKVS
data
sde (500G)
184220A00B57
fast (500GB)
sdh (500G)
184301A00645
fast (500GB)
sdf (250GB)
184301A00645
/boot/efi
md0 (2GB)
swap (10GB)
md1 (150GB)
best (80GB)
sdg (250GB)
182481801165
/boot/efi
md0 (2GB)
swap (10GB)
md1 (150GB)
best (80GB)
nvme0n1 (500GB)
184634801586
data:cache
MD RAID
Note: all MD RAID devices are used with a single partition.
Device |
RAID |
Components |
Capacity |
/dev/md0 |
RAID1 |
2x 2GB |
2GB |
/dev/md1 |
RAID1 |
2x 150GB |
150GB |
Mounts
Partition |
Capacity |
File-system |
Mount point |
Mount options |
/dev/sdf1 |
1GB |
EFI System |
/boot/efi |
defaults |
/dev/md0p1 |
2GB |
ext4 |
/boot |
noatime |
/dev/md1p1 |
150GB |
ext4 |
/ |
noatime |
ZFS zpools
Pool |
RAID |
Capacity |
Compression |
Dedup |
best |
RAID0 |
160GB |
off |
off |
fast |
RAID1 |
464GB |
lz4 |
on |
data |
RAIDZ |
14.5TB |
zstd |
on |
ZFS datasets
These are the datasets we create on our zpools.
Dataset |
Mount |
Compression |
Dedup |
best |
/best |
off |
off |
fast |
/fast |
lz4 |
on |
fast/home |
/home |
lz4 |
on |
fast/home/jj5 |
/home/jj5 |
lz4 |
on |
fast/session |
/var/log/session |
zstd |
off |
data |
/data |
zstd |
on |
data/archive |
/data/archive |
zstd |
on |
data/backup |
/data/backup |
zstd |
on |
data/blob |
/data/blob |
zstd |
on |
data/copy |
/data/copy |
zstd |
on |
data/database |
/data/database |
off |
off |
data/host |
/data/host |
zstd |
on |
data/image |
/data/image |
off |
off |
data/share |
/data/share |
zstd |
on |
Commands
Initial setup
#!/bin/bash
set -euo pipefail;
NVME_DISK=/dev/disk/by-id/nvme-WDS500G2X0C-00L350_184634801586
FAST_DISK_1=/dev/disk/by-id/ata-WDC_WDS500G2B0B_184220A00B57
FAST_DISK_2=/dev/disk/by-id/ata-WDC_WDS500G2B0B_184301A00645
DATA_DISK_1=/dev/disk/by-id/scsi-SATA_HGST_HUS726T4TAL_V6GGTPKS
DATA_DISK_2=/dev/disk/by-id/scsi-SATA_HGST_HUS726T4TAL_V1JBN0GH
DATA_DISK_3=/dev/disk/by-id/scsi-SATA_HGST_HUS726T4TAL_V6H42DES
DATA_DISK_4=/dev/disk/by-id/scsi-SATA_HGST_HUS726T4TAL_V6GGRKVS
BEST_1=/dev/disk/by-id/ata-WDC_WDS250G2B0B-00YS70_182481801165-part5
BEST_2=/dev/disk/by-id/ata-WDC_WDS250G2B0B-00YS70_182481804949-part5
apt install zfsutils-linux
zpool create -f \
-o autotrim=on \
-O acltype=posixacl -O compression=off \
-O dnodesize=auto -O normalization=formD -O atime=off -O dedup=off \
-O xattr=sa \
best "${BEST_1}" "${BEST_2}"
zpool create -f \
-o autotrim=on \
-O acltype=posixacl -O compression=lz4 \
-O dnodesize=auto -O normalization=formD -O atime=off -O dedup=on \
-O xattr=sa \
fast mirror "${FAST_DISK_1}" "${FAST_DISK_2}"
zpool create -f \
-O acltype=posixacl -O compression=zstd \
-O dnodesize=auto -O normalization=formD -O atime=off -O dedup=on \
-O xattr=sa \
data raidz ${DATA_DISK_1} ${DATA_DISK_2} ${DATA_DISK_3} ${DATA_DISK_4}
zpool add data cache ${NVME_DISK}
zfs create fast/home
zfs create fast/home/jj5
zfs create fast/session
zfs set dedup=off fast/session
zfs set compression=zstd fast/session
zfs set mountpoint=/var/log/session fast/session
chmod 1777 /var/log/session
zfs create data/archive
zfs create data/backup
zfs create data/blob
zfs create data/copy
zfs create data/host
zfs create data/image
zfs create data/share
mv /home /home.bak
zfs set mountpoint=/home fast/home
chown jj5:jj5 /home/jj5
shopt -s dotglob;
mv /home.bak/jj5/* /home/jj5/
rmdir /home.bak/jj5
rmdir /home.bak