User Tools

Site Tools


computing:btrfsreminders

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
computing:btrfsreminders [2026/04/04 19:48] – lo oemb1905computing:btrfsreminders [2026/09/23 23:33] (current) – oemb1905
Line 61: Line 61:
   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
Line 91: Line 91:
   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:
Line 107: Line 107:
 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"`
Line 294: Line 294:
 </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//
computing/btrfsreminders.1775332084.txt.gz · Last modified: by oemb1905