Disk configuration for 'lore'
home |
airgap |
charisma |
verve |
trail |
commitment |
discernment |
lore
For more info see 'lore'.
WD Black SN770 (1TB)
233960801218
/boot/efi
md0 (2GB)
swap (10GB)
md1 (150GB)
best (800GB)
WD Black SN770 (1TB)
233960801258
/boot/efi
md0 (2GB)
swap (10GB)
md1 (150GB)
best (800GB)
Samsung 990 Pro (2TB)
S6Z2NJ0TA15369X
fast
Samsung 990 Pro (2TB)
S6Z2NJ0TA15361M
fast
sda (16TB)
2MKTESDB
data
sdb (16TB)
2BKRRZET
data
sdc (16TB)
2BKRHVRT
data
Kioxia (256GB)
53JC7EF6EH7U
data:cache
fstab
Device |
RAID |
Capacity |
File-system |
Mount |
md0 |
RAID1 |
2GB |
ext4 |
/boot |
md1 |
RAID1 |
150GB |
ext4 |
/ |
ZFS zpools
Pool |
RAID |
Capacity |
Compression |
Dedup |
best |
RAID1 |
800GB |
off |
off |
fast |
RAID1 |
2TB |
lz4 |
on |
data |
RAID1 |
14.5TB |
zstd |
on |
ZFS datasets
These are the datasets we create on our zpools.
Dataset |
Mount |
Note |
best |
/best |
|
best/download |
/best/download |
|
best/upload |
/best/upload |
|
best/xfer |
/best/xfer |
|
best |
/best |
For 'xfer' and 'upload' NFS/SMB shares |
fast |
/fast |
|
fast/home |
/home |
|
fast/home/jj5 |
/home/jj5 |
|
fast/qemu |
/fast/qemu |
|
data |
/data |
|
data/archive |
/data/archive |
|
data/blob |
/data/blob |
|
data/host |
/data/host |
|
data/image |
/data/image |
no compression, dedup |
data/local |
/data/local |
|
data/local/database |
/data/local/database |
|
data/share |
/data/share |
|
data/temp |
/data/temp |
|
Commands
Setup on 2023-12-27
root@lore:~# cat setup-zfs.sh
#!/bin/bash
set -euo pipefail;
BEST_1=/dev/disk/by-id/nvme-WD_BLACK_SN770_1TB_23396D801258-part5
BEST_2=/dev/disk/by-id/nvme-WD_BLACK_SN770_1TB_23396D801218-part5
FAST_1=/dev/disk/by-id/nvme-Samsung_SSD_990_PRO_2TB_S6Z2NJ0TA15369X
FAST_2=/dev/disk/by-id/nvme-Samsung_SSD_990_PRO_2TB_S6Z2NJ0TA15361M
DATA_CACHE=/dev/disk/by-id/nvme-KBG50ZNV256G_KIOXIA_53JC7EF6EH7U
zpool add -f data cache $DATA_CACHE
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 mirror ${BEST_1} ${BEST_2}
zfs create best/download
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 ${FAST_1} ${FAST_2}
zfs create fast/qemu
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
Setup on 2022-12-10
#!/bin/bash
set -euo pipefail;
BEST_1=PNY 1TB partition 5
BEST_2=PNY 1TB partition 5
FAST_DISK_1=/dev/disk/by-id/nvme-Samsung_SSD_990_PRO_2TB_S6Z2NJ0TA15369X
FAST_DISK_2=/dev/disk/by-id/nvme-Samsung_SSD_990_PRO_2TB_S6Z2NJ0TA15361M
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=...256GB...
DATA_CACHE_2=...256GB...
apt install zfsutils-linux
zpool create \
-o ashift=14 -o autotrim=on \
-O acltype=posixacl -O compression=lz4 \
-O dnodesize=auto -O normalization=formD -O atime=off -O dedup=off \
-O xattr=sa \
best mirror ${BEST_1} ${BEST_2}
zpool create \
-o ashift=14 -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 \
-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 fast/scratch
zfs set dedup=off fast/scratch
zfs set compression=off fast/scratch
zfs create fast/home
zfs create fast/home/jj5
zfs create fast/mysql
zfs set dedup=off fast/mysql
zfs set compression=off fast/mysql
zfs set mountpoint=/var/lib/mysql fast/mysql
zfs create fast/virt
zfs create data/host
zfs create data/image
zfs set compression=off data/image
zfs create data/temp
zfs create data/archive
zfs create data/backup
zfs create data/blob
zfs create data/share
mv /home /home.bak
zfs set mountpoint=/home fast/home
chown jj5:jj5 /home/jj5
mv /home.bak/jj5/.[!.]* /home/jj5/
#mv /home.bak/jj5/* /home/jj5/