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: nix-community/nixos-anywhere#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 mount silently 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.
disko/example/btrfs-subvolumes.nix
Line 31 in 4eed245
The
/rootfssubvolume 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: nix-community/nixos-anywhere#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 remountthe subvolume mount and it will cause the device to be remounted with compression enabled.