-
-
Notifications
You must be signed in to change notification settings - Fork 197
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
Add bcachefs type with support for encryption #242
base: master
Are you sure you want to change the base?
Conversation
If we add a type we should also think about multi device support. |
7565991
to
c67af99
Compare
What does this mean exactly? @Lassulus I was able to add keyFile support. The test now correctly encrypts the bcachefs rootfs and mounts it. Now the test hangs after reboot probably because the boot process expects a password? |
https://wiki.archlinux.org/title/Bcachefs#Multiple_drives bcachefs has support for multiple devices. so we need some abstraction like for lvm or mdadm to be feature complete |
@@ -22,7 +22,7 @@ You can keep your configuration and re-use it for other installations, or for a | |||
|
|||
- Disk layouts: GPT, MBR, and mixed. | |||
- Partition tools: LVM, mdadm, LUKS, and more. | |||
- Filesystems: ext4, btrfs, ZFS, bcachefs, tmpfs, and others. | |||
- Filesystems: ext4, bcachefs, btrfs, ZFS, bcachefs, tmpfs, and others. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now bcachefs is there twice
@Lassulus should this be done with a new top level element, e.g. a bcachefs_pool? Or just with an option to list other devices (with theirs labels?) that should be used when {
disko.devices = {
disk = {
x = {
type = "disk";
device = "/dev/nvme0";
content = {
type = "gpt";
content = {
type = "bcachefs";
label = "ssd.ssd1";
};
};
};
y = {
type = "disk";
device = "/dev/sda;
content = {
type = "bcachefs";
label = "hdd.hdd1";
};
};
};
bcachefs_pool = {
rpool = {
type = "bcachefs_pool";
mountpoint = "/";
passwordFile = "secret.key";
extraArgs = [
"--metadata_target=ssd"
"--foreground_target=ssd"
"--background_target=hdd"
"--promote_target=ssd"
];
};
};
};
} vs {
disko.devices = {
disk = {
x = {
device = "/dev/nvme0";
type = "disk";
content = {
type = "gpt";
partitions = {
root = {
size = "100%";
content = {
type = "bcachefs";
label = "ssd.sdd1";
otherDevices = {
"hdd.hdd1" = "/dev/sda";
"hdd.hdd2" = "/dev/sdb";
};
};
};
};
};
};
};
};
} |
@ThyMYthOS From my understanding of the capabilities of bcachefs, the former option would be the better. This allows for more flexibility and is consistent with our other multi-device abstractions. |
@onny are you even interested in getting this merged still? Or would someone else have to pick it up from here? |
will unlikely have time to continue this any time soon, sorry :( |
Fixes #240
Example usage
Feel free to test or pickup this work. Guess it shouldn't be too difficult to add support for this. Would be really happy to see it supported :)