getumbrel / umbrel-os

umbrelOS for Raspberry Pi 4 (only). Covert your Raspberry Pi into a home server in one click. For other hardware, checkout https://github.com/getumbrel/umbrel
https://umbrel.com
BSD 3-Clause "New" or "Revised" License
586 stars 55 forks source link

WIP: Btrfs #185

Closed AaronDewes closed 3 years ago

AaronDewes commented 3 years ago

This is not finished yet, but it will make the base OS btrfs and more reliable by doing that once it's finished

3cola commented 3 years ago

with btrfs, there is some small maintenance to do on the filesystem regularly, so do not forget to implement a crontab (for the root user) something in the like: 0 0 /usr/bin/btrfs balance start -dusage=50 -dlimit=2 -musage=50 -mlimit=4 ${BTRFSMOUNTPOINT} This prevents BTRFS from running out of blocks even if it has unused space within blocks, and is run at midnight everyday. You may need to change the path to the btrfs binary, and the dusage and musage (as 50% is a lot) 0 0 * 0 /usr/bin/btrfs scrub start -B -c 2 -n 4 ${BTRFSMOUNTPOINT} This detects bit rot (i.e. bad sectors) and auto-heals the filesystem, and is run on Sundays at midnight.

AaronDewes commented 3 years ago

with btrfs, there is some small maintenance to do on the filesystem regularly, so do not forget to implement a crontab (for the root user) something in the like: 0 0 /usr/bin/btrfs balance start -dusage=50 -dlimit=2 -musage=50 -mlimit=4 ${BTRFSMOUNTPOINT} This prevents BTRFS from running out of blocks even if it has unused space within blocks, and is run at midnight everyday. You may need to change the path to the btrfs binary, and the dusage and musage (as 50% is a lot) 0 0 * 0 /usr/bin/btrfs scrub start -B -c 2 -n 4 ${BTRFSMOUNTPOINT} This detects bit rot (i.e. bad sectors) and auto-heals the filesystem, and is run on Sundays at midnight.

Thanks! We'll add that for the SSD. Closing this PR now as the SD will stay ext4, because btrfs would require big changes to the boot system, I'll add btrfs-progs in a later PR.