| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| computing:btrfsreminders [2026/04/04 19:47] – oemb1905 | computing:btrfsreminders [2026/09/23 23:33] (current) – oemb1905 |
|---|
| mkfs.btrfs -f -d raid10 -m raid1 --checksum=xxhash --nodesize=32k /dev/mapper/ssd1 /dev/mapper/ssd2 /dev/mapper/ssd3 /dev/mapper/ssd4 /dev/mapper/ssd5 /dev/mapper/ssd6 /dev/mapper/ssd7 /dev/mapper/ssd8 | mkfs.btrfs -f -d raid10 -m raid1 --checksum=xxhash --nodesize=32k /dev/mapper/ssd1 /dev/mapper/ssd2 /dev/mapper/ssd3 /dev/mapper/ssd4 /dev/mapper/ssd5 /dev/mapper/ssd6 /dev/mapper/ssd7 /dev/mapper/ssd8 |
| mkfs.btrfs -f -d raid10 -m raid1 --checksum=xxhash --nodesize=32k /dev/mapper/hdd1 /dev/mapper/hdd2 /dev/mapper/hdd3 /dev/mapper/hdd4 | mkfs.btrfs -f -d raid10 -m raid1 --checksum=xxhash --nodesize=32k /dev/mapper/hdd1 /dev/mapper/hdd2 /dev/mapper/hdd3 /dev/mapper/hdd4 |
| mount -o compress-force=zstd:3,noatime,autodefrag,space_cache=v2,discard=async,commit=120 /dev/mapper/ssd1 /mnt/vm | mount -o compress-force=zstd:3,noatime,noautodefrag,space_cache=v2,discard=async,commit=120 /dev/mapper/ssd1 /mnt/vm |
| mount -o compress=zstd:3,noatime,autodefrag,space_cache=v2,discard=async,commit=120 /dev/mapper/hdd1 /mnt/wh | mount -o compress=zstd:3,noatime,noautodefrag,space_cache=v2,discard=async,commit=120 /dev/mapper/hdd1 /mnt/wh |
| btrfs filesystem show /mnt/vm | btrfs filesystem show /mnt/vm |
| btrfs filesystem show /mnt/wh | btrfs filesystem show /mnt/wh |
| cryptsetup luksOpen /dev/disk/by-id/scsi-35000c500cb1689e3 hdd4 --key-file /home/user/.unlock/wh.key | cryptsetup luksOpen /dev/disk/by-id/scsi-35000c500cb1689e3 hdd4 --key-file /home/user/.unlock/wh.key |
| #mount the btrfs r10 pool for vm | #mount the btrfs r10 pool for vm |
| mount -o compress-force=zstd:3,noatime,autodefrag,space_cache=v2,discard=async,commit=120 /dev/mapper/ssd1 /mnt/vm | mount -o compress-force=zstd:3,noatime,noautodefrag,space_cache=v2,discard=async,commit=120 /dev/mapper/ssd1 /mnt/vm |
| #mount the btrfs r10 pool for wh | #mount the btrfs r10 pool for wh |
| mount -o compress=zstd:3,noatime,autodefrag,space_cache=v2,discard=async,commit=120 /dev/mapper/hdd1 /mnt/wh | mount -o compress=zstd:3,noatime,noautodefrag,space_cache=v2,discard=async,commit=120 /dev/mapper/hdd1 /mnt/wh |
| | |
| This script is designed to be run manually post reboot. In order, you reboot, log in to the admin user via ssh, unlock the crypt key directory with ''screen'' and then ''su - sexa'' (detach with ctrl-a-d). After detaching, simply run the mount the script ''/bin/bash /usr/local/bin/btrfs-mount-datasets.sh''. In the weeks ahead, it is essential to regularly scrub the pool. For that, put the following commands on a cronjob: | This script is designed to be run manually post reboot. In order, you reboot, log in to the admin user via ssh, unlock the crypt key directory with ''screen'' and then ''su - sexa'' (detach with ctrl-a-d). After detaching, simply run the mount the script ''/bin/bash /usr/local/bin/btrfs-mount-datasets.sh''. In the weeks ahead, it is essential to regularly scrub the pool. For that, put the following commands on a cronjob: |
| In addition to scrubbing, I compiled a slew of commands to assess pool health more granularly. I put this script on a cronjob which runs and sends me a statistics report every hour: | In addition to scrubbing, I compiled a slew of commands to assess pool health more granularly. I put this script on a cronjob which runs and sends me a statistics report every hour: |
| |
| <code bash> | <code sh> |
| #!/bin/bash | #!/bin/bash |
| DATE=`date +"%Y%m%d-%H:%M:%S"` | DATE=`date +"%Y%m%d-%H:%M:%S"` |
| mount -o compress=zstd:1,noatime,space_cache=v2,discard=async,commit=120,nodatacow /dev/mapper/storage /mnt/storage | mount -o compress=zstd:1,noatime,space_cache=v2,discard=async,commit=120,nodatacow /dev/mapper/storage /mnt/storage |
| EOF | EOF |
| | chmod 750 /usr/local/bin/btrfs-mount-volumes.sh |
| </code> | </code> |
| |
| --- //[[alerts@haacksnetworking.org|oemb1905]] 2026/04/04 19:39// | I changed default to ''noautodefrag'' to stop metadata from overfilling. |
| | |
| | --- //[[alerts@haacksnetworking.org|oemb1905]] 2026/09/23 23:32// |