| 22 May 2024 |
zrsk | I'm interested into trying bcachefs with encryption using disko and I saw that there is a PR which is blocked because it should an abstraction for supporting multiple devices should be implemented before. I also saw there is another PR for supporting subvolumes. Would a PR where I try to integrate both the attempts together be appreciated? In terms of interface would you like something similar to the first proposal in this comment?
disko.devices = {
disk = {
x = {
type = "disk";
device = "/dev/nvme0";
content = {
type = "gpt";
content = {
type = "bcachefs";
label = "ssd.ssd1";
pool = "rpool";
};
};
};
y = {
type = "disk";
device = "/dev/sda";
content = {
type = "bcachefs";
label = "hdd.hdd1";
pool = "rpool";
};
};
};
bcachefs_pool = {
rpool = {
type = "bcachefs_pool";
mountpoint = "/";
passwordFile = "secret.key";
subvolumes = {
"/home" = { };
"/nix" = { };
"/testpath" = { };
"/testpath/subdir" = { };
};
};
};
};
| 10:06:36 |
lassulus | I answered in nixos-anywhere, but I can also answer here | 10:16:49 |
lassulus | I was a bit busy, I wil try to fix the multi disk stuff in general at some point. But not sure when I will have the time for that. I guess we could merge the encryption part without the multidisk part. I have no idea about subvolumes, but a new PR could be a good idea, just remind me every now and then to look at it :) | 10:17:18 |
zrsk | In reply to @lassulus:lassul.us I answered in nixos-anywhere, but I can also answer here Oh I saw it too late, let's keep the discussion here then :) Frankly I'm not particularly interested into subvolumes, which to my understanding are useful only for snapshots. I can try to rebase the first PR and see if everything works if you want. | 10:28:31 |
zrsk | Nevermind, I don't think it can be easily rebased. It looks like in master you are using the filesystem type while the PR added a new custom type. | 10:31:16 |
zrsk | Probably one could get encryption by simply setting extraArgs = [ "--encrypted" ] | 10:32:15 |
zrsk | At least if you are interested into using a passphrase, I tried yesterday to imperatively format a disk with --encrypted and it interactively asked a passphrase | 10:34:15 |
zrsk | If this works do you want that I change the example to make it use encryption/adding another example? | 10:35:27 |
zrsk | * If this works do you want that I change the example to make it use encryption/add another example? | 10:35:33 |
lassulus | hmm, then the test would need some way to input the passphrase | 10:35:46 |
lassulus | maybe we can add a passwordFile option? | 10:36:08 |
zrsk | To filesystem type? | 10:36:36 |
lassulus | to the bcachefs type I thought | 10:36:50 |
zrsk | In master there is no bcachefs type. It simply uses the filesystem type setting type = "bcachefs" | 10:37:53 |
lassulus | ah, yeah for encryption we probably need a custom type | 10:38:07 |
zrsk | So adding an extra type like in the first PR is ok for you? | 10:38:40 |
zrsk | Even if it doesn't implement the multi devices scenario? | 10:39:16 |
zrsk | * To the filesystem type? | 10:39:41 |
lassulus | yes, that is ok for now | 10:39:45 |
lassulus | I think we need a general solution for the multidisk stuff at some point | 10:39:59 |
lassulus | so I will try to think about that next | 10:40:08 |
zrsk | Do you want to keep both the examples? The one currently in master using type = "filesystem" and the one in the first PR with type = "bcachefs"? | 10:41:12 |
lassulus | I guess if we have the bcachefs type we could remove the usage with the filesystem type | 10:41:47 |
zrsk | In reply to @lassulus:lassul.us so I will try to think about that next Yeah if you want to unify/refactor this part probably makes sense waiting before implementing multi devices support for bcachefs | 10:41:59 |
lassulus | yeah, I will probably rework mdadm, zfs and lvm with that in one go | 10:42:22 |
zrsk | It would be fantastic | 10:42:58 |
matthewcroughan | lassulus: woops https://github.com/nix-community/disko/pull/646 | 11:27:29 |
matthewcroughan | CI didn't catch that 🤔 | 11:28:00 |
matthewcroughan | Is there a quick and easy way to make it evaluate the whole module? | 11:28:10 |
matthewcroughan | I guess having a disko mdbook would cause it to all be evaluated in CI | 11:28:28 |