Disk configuration for 'discernment'
home |
airgap |
charisma |
verve |
trail |
commitment |
discernment |
lore
For more info see 'discernment'.
nvme0n1 (1TB)
PNY21242106180100094
nvme0n1p1 (10GB)
data:cache
nvme0n1p2 (150GB)
md0
nvme0n1p3 (820GB)
fast
nvme1n1 (1TB)
PNY21242106180100093
nvme1n1p1 (10GB)
data:cache
nvme1n1p2 (150GB)
md0
nvme1n1p3 (820GB)
fast
sda (750GB)
WD-WX81A43N0219
sda1 (750GB)
/boot
sdb (4TB)
K7GNY0ML
data
sdc (4TB)
VBG5BA1R
data
sdd (4TB)
K4K6MJ9B
data
fstab
Device |
Capacity |
File-system |
Mount |
sda1 |
750GB |
ext4 |
/boot |
md0p1 |
150GB |
ext4 |
/ |
ZFS zpools
Pool |
RAID |
Capacity |
Compression |
Dedup |
fast |
RAID1 |
780GB |
lz4 |
on |
data |
RAIDZ |
10TB |
zstd |
on |
ZFS datasets
These are the datasets we create on our zpools.
Dataset |
Mount |
fast |
/fast |
fast/home |
/home |
fast/home/jj5 |
/home/jj5 |
fast/session |
/var/log/session |
data |
/data |
Commands
Initial setup on 2023-12-31
#!/bin/bash
set -euo pipefail;
shopt -s dotglob;
FAST_1=/dev/disk/by-id/nvme-PNY_CS3140_1TB_SSD_PNY21242106180100094_1-part3
FAST_2=/dev/disk/by-id/nvme-PNY_CS3140_1TB_SSD_PNY21242106180100093_1-part3
DATA_1=/dev/disk/by-id/ata-WDC_WD4003FFBX-68MU3N0_VBG5BA1R
DATA_2=/dev/disk/by-id/ata-WDC_WD4002FFWX-68TZ4N0_K7GNY0ML
DATA_3=/dev/disk/by-id/ata-WDC_WD4002FFWX-68TZ4N0_K4K6MJ9B
CACHE_1=/dev/disk/by-id/nvme-PNY_CS3140_1TB_SSD_PNY21242106180100094_1-part1
CACHE_2=/dev/disk/by-id/nvme-PNY_CS3140_1TB_SSD_PNY21242106180100093_1-part1
zpool create -f \
-o ashift=12 -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_1} ${FAST_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_1} ${DATA_2} ${DATA_3}
zpool add -f data cache ${CACHE_1}
zpool add -f data cache ${CACHE_2}
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
mv /home /home.bak
zfs set mountpoint=/home fast/home
chown jj5:jj5 /home/jj5
mv /home.bak/jj5/* /home/jj5/
rmdir /home.bak/jj5
rmdir /home.bak