Disk configuration for 'order'
home |
airgap |
charisma |
verve |
trail |
commitment |
discernment |
lore
For more info see 'order'.
sda (750GB)
WD-WX81A43N0219
sda1 (1MB)
grub
sda2 (2GB)
/boot
sda3 (100GB)
/
sda4 (128GB)
data:cache
sda5 (468GB)
fast
sdb (3TB)
WD-WMC4N0D5506W
data
sdc (3TB)
WD-WMC4N0D8E3C9
data
sdd (3TB)
WD-WMC4N1926862
data
fstab
Device |
Capacity |
File-system |
Mount |
sda2 |
2GB |
ext4 |
/boot |
sda2 |
100GB |
btrfs |
/ |
ZFS zpools
Pool |
RAID |
Capacity |
Compression |
Dedup |
fast |
RAID0 |
468GB |
lz4 |
on |
data |
RAID0 |
9TB |
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 |
data/restore |
/data/restore |
data/opt |
/opt |
data/srv |
/srv |
data/backups |
/var/backups |
data/git |
/var/git |
data/mailman |
/var/lib/mailman |
data/mysql |
/var/lib/mysql |
data/state |
/var/state |
data/svn |
/var/svn |
data/vmail |
/var/vmail |
data/www |
/var/www |
Commands
Initial setup on 2023-01-21
#!/bin/bash
set -euo pipefail;
shopt -s dotglob;
FAST_DISK=/dev/disk/by-id/scsi-SATA_WDC_WD7500BPKT-2_WD-WX81A43N0219-part5
DATA_DISK_1=/dev/disk/by-id/scsi-SATA_WDC_WD30EFRX-68E_WD-WMC4N0D5506W
DATA_DISK_2=/dev/disk/by-id/scsi-SATA_WDC_WD30EFRX-68E_WD-WMC4N0D8E3C9
DATA_DISK_3=/dev/disk/by-id/scsi-SATA_WDC_WD30EFRX-68E_WD-WMC4N1926862
DATA_CACHE=/dev/disk/by-id/scsi-SATA_WDC_WD7500BPKT-2_WD-WX81A43N0219-part4
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 ${FAST_DISK}
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 ${DATA_DISK_1} ${DATA_DISK_2} ${DATA_DISK_3}
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/restore
zfs create data/opt
zfs set mountpoint=/opt data/opt
zfs create data/srv
zfs set mountpoint=/srv data/srv
zfs create data/backups
#mv /var/backups/* /data/backups/
zfs set mountpoint=/var/backups data/backups
zfs create data/git
zfs set mountpoint=/var/git data/git
zfs create data/mailman
zfs set mountpoint=/var/lib/mailman data/mailman
zfs create data/mysql
zfs set mountpoint=/var/lib/mysql data/mysql
zfs create data/state
zfs set mountpoint=/var/state data/state
zfs create data/svn
zfs set mountpoint=/var/svn data/svn
zfs create data/vmail
zfs set mountpoint=/var/vmail data/vmail
zfs create data/www
zfs set mountpoint=/var/www data/www
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