-
-
Notifications
You must be signed in to change notification settings - Fork 220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Addition of granular bcachefs formatting and multi-disk support #961
base: master
Are you sure you want to change the base?
Conversation
b2b7b6d
to
9dabcb4
Compare
I am planning on re-working this to follow the mdadm and zfs arch with mult-drive support, it is proving to be a good challenge. |
Looking forward to it. |
e2a5d83
to
32ac0ae
Compare
@Lassulus You mentioned wanting to take a look at the current state. This is very rough, but this is what I currently have. I added in some markers in the individual nixosConfigurations.testmachine.config.disko.devices._create
"set -efux\n\ndisko_devices_dir=$(mktemp -d)\ntrap 'rm -rf \"$disko_devices_dir\"' EXIT\nmkdir -p \"$disko_devices_dir\"\n\n( # bcachefs pool1 /mnt/pool #\n declare -a formatOptions=('--compression=zstd')\n declare -a mountOptions=(verbose degraded)\n mountpoint=/mnt/pool\n name=pool1\n type=bcachefs\n echo \"Creating bcachefs device: $device\" >&2\n \n echo BCACHEFS POSITION\n
...
...
... Curious your thoughts. Thanks |
26c7841
to
4d78db4
Compare
Linking the following for visibility: |
Some additional pitfalls discovered while testing with real hardware:
Successful deployments are possible, but require additional "helpers" external to this project. I am not sure this is a feasible implementation at this time. Might be good as an experimental feature with a write up on what is needed to supplement within a user's nixos config. |
4d78db4
to
5a9144a
Compare
5a9144a
to
1a351bf
Compare
This addition attempts to integrate with the current arch of supporting partitioning. examples/bcachefs-multi-disk.nix has been added to showcase this advanced usage and some of the available options. Current limitations and disko changes to allow for compatibility: * lib/types/gpt.nix was updated to generate a deterministic UUID based on the partition name if one is not provided. Throughout testing, partition labels were not creating correctly. * This should not have an effect on other, other than changing the default behavior to favor UUID over partition labels * Testing mostly succeeds. Multi-disk root setups are not working due to some bcachefs and systemd issues that are currently open. These issues are linked under _config of lib/types/bcachefs.nix * Because of this, the fileSystems nix config is not working on reboots due to the FS UUID presenting as available even if not all disks are initialized yet. A systemd-mount alternative has been provided. * The final reboot test might need to be omitted. * Bcachefs works the best with the latest (or kernel 6.13 or new) boot.kernelPackages = config.pkgs.linuxPackages_latest; should be added to the _config section for systems, but pkgs is not provided in this module.
1a351bf
to
418dbf9
Compare
I will note that I have not gone through the official testing process called out in the contributing guidelines quite yet. I will looking into this soon, just wanted to get this PR out there for visibility :)
I have tested provisioning a VM with a 3 disk pool with this branch using nixos-anywhere, and also running the disko tool manually on another, already provisioned VM.