Disk configuration for 'charm'

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


For more info see 'charm'.

nvme0n1 (1TB)
PNY21242106180100095
nvme0n1p1 (1.049G)
/boot/efi
nvme0n1p2 (1G)
md0
nvme0n1p3 (50G)
md1
nvme0n1p4 (100G)
best
nvme0n1p5 (700G)
fast
nvme1n1 (1TB)
PNY21242106180100093
nvme1n1p1 (1.049G)
/boot/efi
nvme1n1p2 (1G)
md0
nvme1n1p3 (50G)
md1
nvme1n1p4 (100G)
best
nvme1n1p5 (700G)
fast
nvme2n1 (1TB)
PNY21242106180100092
nvme2n1p1 (1.049G)
/boot/efi
nvme2n1p2 (1G)
md0
nvme2n1p3 (50G)
md1
nvme2n1p4 (100G)
best
nvme2n1p5 (700G)
fast
nvme3n1 (1TB)
PNY21242106180100094
nvme3n1p1 (1.049G)
/boot/efi
nvme3n1p2 (1G)
md0
nvme3n1p3 (50G)
md1
nvme3n1p4 (100G)
best
nvme3n1p5 (700G)
fast
Device Drive Model Commissioned Sequential Random WRL Temp °C Data Sheet
nvme[0123]n1 PNY CS3140 1TB NVMe Gen4 SSD M.2 M280CS3140-1TB-RB 2022-03-23 2,344 MB/s 123 MB/s 700TBW 0°C to 70°C download

MD RAID

Note: all MD RAID devices are used with a single partition.

Device RAID Components Capacity
/dev/md0 RAID10 4x 1GB 2GB
/dev/md1 RAID10 4x 50GB 100GB

Mounts

Partition Capacity File-system Mount point Mount options
/dev/md0p1 2GB ext4 /boot noatime
/dev/md1p1 100GB btrfs / noatime

ZFS zpools

Pool RAID Components Capacity
best RAID0 4x 100G 400GB
fast RAID10 4x 700G 1.4TB

ZFS datasets

These are the datasets we create on our zpools.

Dataset Mount Compression Dedup
best /best off off
best/mysql /var/lib/mysql off off
fast /fast lz4 on
fast/home /home lz4 on
fast/home/jj5 /home/jj5 lz4 on
fast/scratch /fast/scratch off off
fast/session /var/log/session zstd off
fast/vbox /fast/vbox lz4 on
fast/data /data zstd on
fast/data/backup /data/backup zstd on
fast/temp /temp off off

Commands

#!/bin/bash

set -euo pipefail;

DISK1=/dev/disk/by-id/nvme-eui.6479a74fb0c00509
DISK2=/dev/disk/by-id/nvme-eui.6479a74fb0c00507
DISK3=/dev/disk/by-id/nvme-eui.6479a74fb0c004b7
DISK4=/dev/disk/by-id/nvme-eui.6479a74fb0c00508

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 ${DISK1}-part4 ${DISK2}-part4 ${DISK3}-part4 ${DISK4}-part4

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 ${DISK1}-part5 ${DISK2}-part5 mirror ${DISK3}-part5 ${DISK4}-part5

zfs create best/temp
zfs set mountpoint=/temp best/temp
mkdir /temp/download
chown jj5:jj5 /temp/download

zfs create best/scratch

zfs create best/mysql
zfs set mountpoint=/var/lib/mysql best/mysql

zfs create fast/home
zfs create fast/home/jj5
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

# 2023-02-02 jj5 - we create fast/scratch in addition to best/scratch in case we need more space...
zfs create fast/scratch
zfs set compression=off fast/scratch
zfs set dedup=off fast/scratch

zfs create fast/session
zfs set compression=zstd fast/session
zfs set dedup=off fast/session
zfs set mountpoint=/var/log/session fast/session
chmod 1777 /var/log/session

zfs create fast/stash
zfs set dedup=on fast/stash
zfs set compression=zstd fast/stash

zfs create fast/vbox

zfs create fast/data
zfs set dedup=on fast/data
zfs set compression=zstd fast/data
zfs set mountpoint=/data fast/data

zfs create fast/data/backup
zfs create fast/data/backup/database
zfs set dedup=off fast/data/backup/database
zfs set compression=off fast/data/backup/database

fstab

# 2022-09-30 jj5 - for use by snaps:
/temp/download /media/jj5/download    none defaults,bind 0 2

# 2022-12-23 jj5 - NEW:
longing:/data/archive  /data/archive   nfs noatime 0 2
longing:/data/blob     /data/blob      nfs noatime 0 2
longing:/data/image    /data/image     nfs noatime 0 2
longing:/data/share    /data/share     nfs noatime 0 2
longing:/data/host     /data/host      nfs noatime 0 2
longing:/temp/rubbish  /temp/rubbish   nfs noatime 0 2
longing:/temp/extract  /temp/extract   nfs noatime 0 2
longing:/fast/upload   /fast/upload    nfs noatime 0 2
longing:/fast/xfer     /fast/xfer      nfs noatime 0 2

Photos

Here are some happy snaps from the install.