btrfs: Improve fstab mount options during a btrfs install#172
btrfs: Improve fstab mount options during a btrfs install#172anaximeno wants to merge 2 commits into
Conversation
No need to explicitly set discard=async in fstab, as it is the default for kernel versions ≥ 6.2 and is automatically enabled on SSD/NVMe devices. ref: https://btrfs.readthedocs.io/en/latest/ch-mount-options.html Thanks https://github.com/emanuc for the suggestion.
|
Thanks for this, it would be helpful to add more predefined subvolumes and make it possible to choose whether to have compression and which one. |
This PR is relatively narrow and focuses more on extending the existing support for manually set (home and root) btrfs partitions with these flags. I know a more extensive pull request with more extensive (and first class) btrfs install support was made by another user in this repo some time ago, but wasn't accepted however.
I tested it from the LMDE 7 ISO, it uses this installer. You can just apply these changes there, or clone this branch I sent for this PR and run it with |
I've improved the btrfs install to use compression by default (which reduces writes and uses less storage) and some other options that should be better for modern SSDs.
Used as a reference the fstab mounts in distros such as Fedora and CachyOS which use similar mount options for btrfs, and this reference on BTRFS mount options I found: https://wiki.tnonline.net/w/Btrfs/Mount_Options
Tested the installation with both a single root partition on btrfs and split root and home partion when both on btrfs and it worked well in both cases.