!oNSIfazDqEcwhcOjSL:matrix.org

disko

361 Members
disko - declarative disk partitioning - https://github.com/nix-community/disko92 Servers

Load older messages


SenderMessageTime
3 Mar 2025
@lassulus:lassul.uslassulusbut in theory it should only create the new dataset04:22:09
@lassulus:lassul.uslassulusbut that is relatively new and untested behavior :)04:22:25
@lassulus:lassul.uslassulusbe sure not to run the diskoScript, as this will wipe the drives beforehand04:22:43
@raj-magesh:matrix.orgRaj

I'd like to have this external HDD sometimes plugged in and other times removed, but automatically have LUKS unlocked at boot whenever it's connected. If I remove the disk, the boot process fails at stage 1. Is there a setting I can adjust to fix this apart from mountOptions = ["nofail"]? I'm not too familiar with the initrdUnlock argument: I presume it's what asks for my LUKS password after booting?

      backup_1 = {
        device = hdd_1;
        content = {
          type = "gpt";
          partitions = {
            backup_1 = {
              device = "${hdd_1}-part1";
              priority = 0;
              end = "-0";
              content = {
                type = "luks";
                name = "backup_1";
                initrdUnlock = true;
                extraFormatArgs = ["--pbkdf argon2id"];
                content = {
                  type = "btrfs";
                  extraArgs = ["-f"];
                  mountpoint = "/backup/drive_1";
                  mountOptions = ["compress=zstd" "noatime" "nofail"];
                };
              };
            };
          };
        };
      };
04:30:48
@geebody:matrix.orgmyxos @lassulus You mean don't run the script that was generated by --dry-run? 04:31:44
@lassulus:lassul.uslassulus myxos: that one probably has the disk-deactivate bit at the start, so you could skip that part, and the part of mounting at the end, or run with --mode format 04:33:49
@geebody:matrix.orgmyxosGotcha, I'll try that out, thanks!04:44:21
@lassulus:lassul.uslassulus Raj: hmm, the initrdUnlock adds this to the boot.initrd nixos config, so booting will fail if the device is not available. I don't see an easy way to disable that in nixos, alternative would be to not have the initrdUnlock and unlock it after booting 04:48:05
@raj-magesh:matrix.orgRajGot it, thank you!04:49:04
@geebody:matrix.orgmyxos @lassulus just to update, adding the dataset via Disko configuration caused my system to crash, and I had to roll back to a previous configuration. I needed to first manually create the dataset (zfs create ...), after which I could update the Nix config (for posterity) without error. 17:13:34
@lassulus:lassul.uslassulusah did you run the create script manually before switching?17:14:47
@geebody:matrix.orgmyxosYep17:16:55
@lassulus:lassul.uslassulusand it still crashed? I'm a bit confused why it worked manually afterwards17:17:35
@geebody:matrix.orgmyxosOh, I did not manually run the create script manually before switching at first. That's when it crashed.17:18:22
@geebody:matrix.orgmyxosI was initially hoping the changes to the disko config would be smart enough to just create the new dataset (a bit risky, I know, but no harm done)17:19:09
@lassulus:lassul.uslassulusah, yeah that was the missing step I guess, but looking at my history I just said looking at it :D17:19:13
@lassulus:lassul.uslassulusI meant looking at it and running it if it looks fine :)17:19:31
@lassulus:lassul.uslassulusthat step doesn't happen automatically with disko (yet?)17:19:54
@lassulus:lassul.uslassulusbecause it's not widely tested and I don't want people to lose data17:20:13
@geebody:matrix.orgmyxosI didn't end up running the whole generated disko script, just the zfs create command17:20:12
@lassulus:lassul.uslassulusah ok, so we will never know if it would have broken something :)17:20:30
@geebody:matrix.orgmyxosThat's certainly understandable17:20:34
@geebody:matrix.orgmyxosThanks for your help, and for your contributions to this tool, it's great!17:22:20
@geebody:matrix.orgmyxosMaybe on my next throwaway system I'll test running the script to see if it borks anything 🙂17:23:40
@cent:neuland.enterprises@cent:neuland.enterprises joined the room.18:20:36
@cent:neuland.enterprises@cent:neuland.enterprisesHi, is it possible to use disko on an already installed nixos system?18:21:56
@cent:neuland.enterprises@cent:neuland.enterprisesI would like to configure my btrfs subvolumes in disko 18:23:12
@cent:neuland.enterprises@cent:neuland.enterprises(While I originally installed the system I'm talking about with nixos-anywhere and disko I used a dummy flake and later rebuild the system with my usual flake)18:24:09
4 Mar 2025
@tiddy-:matrix.orgtiddy- joined the room.15:59:44
@tiddy-:matrix.orgtiddy-Hey! Looking to use disko with nix-anywhere for some cluster management (Arguably foaming at the mouth with how simple it looks). My file-system of choice is bcachefs, mainly because the low-cost snapshots and SSD caching. Looking through the disko examples (and any other sources I've found online) I cant seem to find where to pass CLI formatting options to bcachefs to support options like foreground/background read/writes, encryption, and the like. Is this a supported configuration by disko? If not (if anyone has time) could someone point me to the working file that actually formats the disk? Might try my hand at implementing something like it. I've found the disko script, but I'd have to brush up on my bash to confirm its the script calling the format command. Thanks in advance!16:08:09

Show newer messages


Back to Room ListRoom Version: 10