Disk configuration for 'trick'

home | airgap | charisma | verve | trail | commitment | discernment | lore


For more info see 'trick'.

nvme0n1 (1TB)
S3ETNX0HC08620Y
best
sda (250GB)
182481804949
data:cache
sdb (512G)
S2BENWAJ207761X
sdb1 (1G)
/boot/efi
sdb2 (2G)
md0
sdb3 (100G)
md1
sdb4 (400G)
fast
sdc (512G)
S2BENWAJ207751D
sdc1 (1G)
/boot/efi
sdc2 (2G)
md0
sdc3 (100G)
md1
sdc4 (400G)
fast
sdd (6TB)
ZA16N4ZH
data
sde (6TB)
WSB076SN
data
Device Drive Model Commissioned Sequential Random WRL Temp °C Data Sheet
nvme0n1 Samsung 960 EVO NVMe M.2 SSD 1TB Samsung SSD 960 EVO 1TB 2017-04-18 1,276 MB/s 80 MB/s 400 TBW 0°C to 70°C online
sda WD Blue 250GB SATA SSD M.2 WDC WDS250G2B0B-00YS70 2019-03-21 304 MB/s 47 MB/s 100 TBW 0°C to 70°C download
sd[bc] Samsung 850 PRO SATA III 2.5inch SSD Samsung SSD 850 PRO 512GB 2017-04-18 407 MB/s 57 MB/s 150 TBW 0°C to 70°C online
sdd Seagate IronWolf 6TB ST6000VN0041-2EL11C 2017-04-18 186 MB/s 2 MB/s 180 TB/yr 5°C to 70°C download
sde Seagate BarraCuda Compute 6TB ST6000DM003-2CY186 2022-09-16 102 MB/s 2.29 MB/s 55 TB/yr 0°C to 60°C download

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 100GB 100GB

Mounts

Partition Capacity File-system Mount point Mount options
/dev/sda1 1GB vfat /boot/efi defaults
/dev/md0p1 2GB ext4 /boot noatime
/dev/md1p1 100GB btrfs / noatime

ZFS zpools

Pool RAID Components Capacity
fast RAID1 2x 377GB 377GB
data RAID0 2x 6TB 12TB
best RAID0 1x 1TB 1TB

ZFS datasets

These are the datasets we create on our zpools.

Dataset Mount Compression Dedup
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/backup /data/backup zstd on
data/host /data/host zstd on
best /best off off
best/hold /best/hold zstd on
best/mysql /var/lib/mysql off off

Commands

#!/bin/bash

set -euo pipefail;

DISK1=/dev/disk/by-id/nvme-Samsung_SSD_960_EVO_1TB_S3ETNX0HC08620Y

DISK2A=/dev/disk/by-id/ata-Samsung_SSD_850_PRO_512GB_S2BENWAJ207751D
DISK2B=/dev/disk/by-id/ata-Samsung_SSD_850_PRO_512GB_S2BENWAJ207761X

DISK3A=/dev/disk/by-id/scsi-SATA_ST6000DM003-2CY1_WSB076SN
DISK3B=/dev/disk/by-id/scsi-SATA_ST6000VN0041-2EL_ZA16N4ZH

DATA_CACHE=/dev/disk/by-id/ata-WDC_WDS250G2B0B-00YS70_182481804949

apt install zfsutils-linux

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 ${DISK2A}-part4 ${DISK2B}-part4

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 ${DISK3A} ${DISK3B}

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 ${DISK1}

zpool add data cache ${DATA_CACHE}

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/backup
zfs create data/copy
zfs create data/host

zfs create best/mysql
zfs set mountpoint=/var/lib/mysql best/mysql
zfs create best/hold
zfs set dedup=on best/hold
zfs set compression=zstd best/hold
zfs create best/scratch
zfs set dedup=off best/scratch
zfs set compression=off best/scratch

mv /home /home.bak

zfs set mountpoint=/home fast/home

shopt -s dotglob;
chown jj5:jj5 /home/jj5
mv /home.bak/jj5/* /home/jj5/
rmdir /home.bak/jj5
rmdir /home.bak