Disk configuration for 'longing'
home |
airgap |
charisma |
verve |
trail |
commitment |
discernment |
lore
For more info see 'longing'.
nvme0n1 (1.8TB)
S6Z2NJ0TA15369X
nvme0n1p1 (1MB)
grub
nvme0n1p2 (2GB)
md0
nvme0n1p3 (100GB)
md1
nvme0n1p4 (100GB)
data:cache
nvme0n1p5 (200GB)
best
nvme0n1p6 (1.4TB)
fast
nvme1n1 (1.8TB)
S6Z2NJ0TA15361M
nvme1n1p1 (1MB)
grub
nvme1n1p2 (2GB)
md0
nvme1n1p3 (100GB)
md1
nvme1n1p4 (100GB)
data:cache
nvme1n1p5 (200GB)
best
nvme1n1p6 (1.4TB)
fast
sda (14.6TB)
2MKTESDB
data
sdb (14.6TB)
2BKRRZET
data
sdc (14.6TB)
2BKRHVRT
data
fstab
Device |
RAID |
Capacity |
File-system |
Mount |
md0 |
RAID1 |
2GB |
ext4 |
/boot |
md1 |
RAID1 |
100GB |
btrfs |
/ |
ZFS zpools
Pool |
RAID |
Capacity |
Compression |
Dedup |
best |
RAID0 |
400GB |
off |
off |
fast |
RAID1 |
1.4TB |
lz4 |
on |
data |
RAID1 |
14TB |
zstd |
on |
ZFS datasets
These are the datasets we create on our zpools.
Dataset |
Mount |
Compression |
Dedup |
best |
/best |
off |
off |
best/temp |
/temp |
off |
off |
best/download |
/best/download |
off |
off |
best/scratch |
/best/scratch |
off |
off |
best/upload |
/best/upload |
off |
off |
best/xfer |
/best/xfer |
off |
off |
fast |
/fast |
lz4 |
on |
fast/home |
/home |
lz4 |
on |
fast/home/jj5 |
/home/jj5 |
lz4 |
on |
fast/mysql |
/var/lib/mysql |
zstd |
off |
fast/session |
/var/log/session |
zstd |
off |
fast/vbox |
/fast/vbox |
lz4 |
on |
data |
/data |
zstd |
on |
data/archive |
/data/archive |
zstd |
on |
data/backup |
/data/backup |
zstd |
on |
data/blob |
/data/blob |
zstd |
on |
data/host |
/data/host |
zstd |
on |
data/image |
/data/image |
zstd |
on |
data/share |
/data/share |
zstd |
on |
data/extract |
/temp/extract |
zstd |
on |
data/rubbish |
/temp/rubbish |
zstd |
on |
Commands
Initial setup on 2023-02-02
#!/bin/bash
set -euo pipefail;
shopt -s dotglob;
BEST_DISK_1=/dev/disk/by-id/nvme-Samsung_SSD_990_PRO_2TB_S6Z2NJ0TA15369X-part5
BEST_DISK_2=/dev/disk/by-id/nvme-Samsung_SSD_990_PRO_2TB_S6Z2NJ0TA15361M-part5
FAST_DISK_1=/dev/disk/by-id/nvme-Samsung_SSD_990_PRO_2TB_S6Z2NJ0TA15369X-part6
FAST_DISK_2=/dev/disk/by-id/nvme-Samsung_SSD_990_PRO_2TB_S6Z2NJ0TA15361M-part6
DATA_DISK_1=/dev/disk/by-id/scsi-SATA_WDC_WUH721816AL_2MKTESDB
DATA_DISK_2=/dev/disk/by-id/scsi-SATA_WDC_WUH721816AL_2BKRRZET
DATA_DISK_3=/dev/disk/by-id/scsi-SATA_WDC_WUH721816AL_2BKRHVRT
DATA_CACHE_1=/dev/disk/by-id/nvme-Samsung_SSD_990_PRO_2TB_S6Z2NJ0TA15361M-part4
DATA_CACHE_2=/dev/disk/by-id/nvme-Samsung_SSD_990_PRO_2TB_S6Z2NJ0TA15369X-part4
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_DISK_1} ${BEST_DISK_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 mirror ${DATA_DISK_1} ${DATA_DISK_2} ${DATA_DISK_3}
zpool add data cache ${DATA_CACHE_1}
zpool add data cache ${DATA_CACHE_2}
zfs create best/temp
zfs set mountpoint=/temp best/temp
zfs create best/download
zfs create best/scratch
zfs create best/upload
zfs create best/xfer
zfs create fast/home
zfs create fast/home/jj5
zfs create fast/mysql
zfs set compression=zstd fast/mysql
zfs set dedup=off fast/mysql
zfs set mountpoint=/var/lib/mysql fast/mysql
zfs create fast/session
zfs set compression=zstd fast/session
zfs set dedup=off fast/session
zfs set mountpoint=/var/log/session fast/session
zfs create fast/vbox
zfs create data/archive
zfs create data/backup
zfs create data/blob
zfs create data/host
zfs create data/image
zfs create data/share
zfs create data/extract
zfs set mountpoint=/temp/extract data/extract
zfs create data/rubbish
zfs set mountpoint=/temp/rubbish data/rubbish
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