nix-community / nix-community/disko
btrfs example and enabling compression failing
Nobody has claimed this yet.
- Dominant language
- Nix
- Stars
- 3.3k
- Forks
- 332
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 1
Description
The /rootfs subvolume is the first mounted in this example, and it does not have compression enabled so the device will not have compression enabled by btrfs. The following subvolumes will fail to enable compression with the mount script disko creates/uses.
See: https://github.com/numtide/nixos-anywhere/issues/188
When installing with nixos-anywhere the install will not be compressed. Once the system is installed and rebooted, compression is correclty enabled on the whole device.
So there are a couple things:
-
The example should be updated
-
Since
mountsilently fails to enable compression when mounting a fs with the option if the device is already mounted with it disabled (mount exits with 0 in this case).
Should the disko mount script verify the mount options that were requested are in fact set?
In this example it can -o remount the subvolume mount and it will cause the device to be remounted with compression enabled.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with example/btrfs-subvolumes.nix at line 31 and reproduce the installation behavior described with nixos-anywhere. Then trace the disko mount script that handles the subvolume options, checking the linked nixos-anywhere issue for context. Done means the example enables compression during installation and the mount behavior verifies or successfully applies the requested options.
Written by the indexing model from the issue text.
Assessment
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100