Disk configuration for 'trick'

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


For more info see 'trick'.

nvme0n1 (1TB)
S3ETNX0HC08620Y
best
sda (512G)
S2BENWAJ207761X
sda1 (1G)
/boot/efi
sda2 (2G)
md0
sda3 (100G)
md1
sda4 (400G)
fast
sdb (512G)
S2BENWAJ207751D
sdb1 (1G)
/boot/efi
sdb2 (2G)
md0
sdb3 (100G)
md1
sdb4 (400G)
fast
sdc (6TB)
ZA16N4ZH
data
sdd (6TB)
ZR14L0LE
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
sd[ab] 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
sdc Seagate IronWolf 6TB ST6000VN0041-2EL11C 2017-04-18 186 MB/s 2 MB/s 180 TB/yr 5°C to 70°C download
sdd Seagate IronWolf 6TB ST6000VN001 2023-02-21 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
best RAID0 1x 1TB 1TB
fast RAID1 2x 377GB 377GB
data RAID0 2x 6TB 12TB

ZFS datasets

These are the datasets we create on our zpools.

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

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
DISK3A=/dev/disk/by-id/ata-ST6000VN0041-2EL11C_ZA16N4ZH
DISK3B=/dev/disk/by-id/ata-ST6000VN001-2BB186_ZR14L0LE
DISK3C=/dev/disk/by-id/ata-ST6000DM003-2CY186_WSB076SN

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

apt install zfsutils-linux

zpool create -f \
    -o ashift=12 -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 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 ${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 raidz ${DISK3A} ${DISK3B} ${DISK3C}

zpool add data cache ${DATA_CACHE}

zfs create best/mysql
zfs set compression=lz4 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

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 data/restore

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