!oNSIfazDqEcwhcOjSL:matrix.org

disko

357 Members
disko - declarative disk partitioning - https://github.com/nix-community/disko89 Servers

Load older messages


SenderMessageTime
31 Dec 2024
@brian:bmcgee.ie@brian:bmcgee.ie I'm seeing nixos systemd[1]: home.mount: Directory /home to mount over is not empty, mounting anyway 17:12:39
@brian:bmcgee.ie@brian:bmcgee.ieTrying out some suggestions from here https://github.com/nix-community/disko/issues/19217:49:44
@phaer:matrix.orgphaer changed their display name from phaer (8650 at 38c3) to phaer.19:23:46
@tanja:catgirl.cloudTanja (she/her) - ☎️ 4201 changed their display name from Tanja (she/her) [DECT 6929] to Tanja (she/her).20:59:17
@joerg:thalheim.ioMic92Also would go for the neededForBoot21:48:19
@joerg:thalheim.ioMic92 Afaik we are doing zpool destroy, but if that doesn't not help, blkdiscard /dev/nvmen0p1 might 21:50:05
1 Jan 2025
@mjolnir:nixos.orgNixOS Moderation Botchanged room power levels.14:26:06
@brian:bmcgee.ie@brian:bmcgee.ie neededForBoot doesn't seem to help. Been reading through https://github.com/NixOS/nixpkgs/issues/6481 as well. 16:51:55
@brian:bmcgee.ie@brian:bmcgee.ie

Mic92: I adjusted by btrfs volume definitions to more closely match what Lily Foster had, mainly just adding a root mountpoint of /vol/root and removing mountpoint definitions in my subvolumes since their paths matched anyway.

Now neededForBoot seems to have the desired effect and /home is being mounted before the user activation script is trying to do anything.

    mdadm = {
      raid0 = {
        type = "mdadm";
        level = 0;
        content = {
          type = "luks";
          name = "crypted-root";
          settings = {
            allowDiscards = true;
          };
          content = {
            type = "btrfs";
            mountpoint = "/vol/root";
            subvolumes = {
              "/root" = {
                mountpoint = "/";
              };
              "/home" = {
                mountOptions = [
                  "compress=zstd"
                ];
              };
              "/nix" = {
                mountOptions = [
                  "compress=zstd"
                  "noatime"
                ];
              };
              "/var/log" = {
                mountOptions = [
                  "compress=zstd"
                  "nodatacow"
                ];
              };
            };
          };
        };
      };
      raid5 = {
        type = "mdadm";
        level = 5;
        content = {
          type = "luks";
          name = "crypted-archive";
          content = {
            type = "btrfs";
            mountpoint = "/vol/archive";
            subvolumes = {
              "/archive/media" = {
                mountOptions = [
                  "compress=zstd"
                ];
              };
              "/archive/backups" = {
                mountOptions = [
                  "compress=zstd"
                ];
              };
            };
          };
        };
      };
    };
  };

  # ensure /home is mounted before home directories are created
  fileSystems."/home".neededForBoot = true;
17:26:54
@brian:bmcgee.ie@brian:bmcgee.ieI do not confess to understanding the why, just that my VM is now working as expected17:27:25
@brian:bmcgee.ie@brian:bmcgee.ie

This is what it looked like before

    mdadm = {
      raid0 = {
        type = "mdadm";
        level = 0;
        content = {
          type = "luks";
          name = "crypted-root";
          settings = {
            allowDiscards = true;
          };
          content = {
            type = "btrfs";
            extraArgs = [ "-f" ];
            subvolumes = {
              "/root" = {
                mountpoint = "/";
              };
              "/home" = {
                mountpoint = "/home";
                mountOptions = [
                  "compress=zstd"
                ];
              };
              "/nix" = {
                mountpoint = "/nix";
                mountOptions = [
                  "compress=zstd"
                  "noatime"
                ];
              };
              "/var/log" = {
                mountpoint = "/var/log";
                mountOptions = [
                  "compress=zstd"
                  "nodatacow"
                ];
              };
            };
          };
        };
      };
      raid5 = {
        type = "mdadm";
        level = 5;
        content = {
          type = "luks";
          name = "crypted-archive";
          content = {
            type = "btrfs";
            extraArgs = [ "-f" ];
            subvolumes = {
              "/archive" = {
                mountpoint = "/archive";
                mountOptions = [
                  "compress=zstd"
                  "noatime"
                ];
              };
              "/archive/media" = {
                mountpoint = "/archive/media";
                mountOptions = [
                  "compress=zstd"
                  "noatime"
                ];
              };
              "/archive/backups" = {
                mountpoint = "/archive/backups";
                mountOptions = [
                  "compress=zstd"
                  "noatime"
                ];
              };
            };
          };
        };
      };
    };
  };

17:28:27
@brian:bmcgee.ie@brian:bmcgee.ie *

Mic92: I adjusted my btrfs volume definitions to more closely match what Lily Foster had, mainly just adding a root mountpoint of /vol/root and removing mountpoint definitions in my subvolumes since their paths matched anyway.

Now neededForBoot seems to have the desired effect and /home is being mounted before the user activation script is trying to do anything.

    mdadm = {
      raid0 = {
        type = "mdadm";
        level = 0;
        content = {
          type = "luks";
          name = "crypted-root";
          settings = {
            allowDiscards = true;
          };
          content = {
            type = "btrfs";
            mountpoint = "/vol/root";
            subvolumes = {
              "/root" = {
                mountpoint = "/";
              };
              "/home" = {
                mountOptions = [
                  "compress=zstd"
                ];
              };
              "/nix" = {
                mountOptions = [
                  "compress=zstd"
                  "noatime"
                ];
              };
              "/var/log" = {
                mountOptions = [
                  "compress=zstd"
                  "nodatacow"
                ];
              };
            };
          };
        };
      };
      raid5 = {
        type = "mdadm";
        level = 5;
        content = {
          type = "luks";
          name = "crypted-archive";
          content = {
            type = "btrfs";
            mountpoint = "/vol/archive";
            subvolumes = {
              "/archive/media" = {
                mountOptions = [
                  "compress=zstd"
                ];
              };
              "/archive/backups" = {
                mountOptions = [
                  "compress=zstd"
                ];
              };
            };
          };
        };
      };
    };
  };

  # ensure /home is mounted before home directories are created
  fileSystems."/home".neededForBoot = true;
17:28:48
@pinpox:matrix.orgpinpox changed their display name from pinpox [DECT: 7170] to pinpox.18:20:02
@jopejoe1:matrix.orgjopejoe1 (4094@39c3) changed their display name from jopejoe1 [4094] to jopejoe1.23:29:38
2 Jan 2025
@brian:bmcgee.ie@brian:bmcgee.ieyeah, so I missed the eval warnings. Turns out it just wasn't mounting things which is why it appeared to 'work'. Back to the drawing board. 14:00:50
@brian:bmcgee.ie@brian:bmcgee.ieThis was a bit of a pain in the arse to figure out https://github.com/nix-community/disko/issues/192#issuecomment-256794460416:17:30
@x10an14:matrix.orgx10an14 joined the room.19:54:26
@x10an14:matrix.orgx10an14

Anyone see why this (https://paste.sr.ht/~x10an14/a6874a50af1a999da9e0a06920fb19f6cafc8629) config didn't produce a zpool named tank w/2x vdevs striped?

-> $ zpool list
NAME          SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP    HEALTH  ALTROOT
nvme0n1pool   928G  2.24G   926G        -         -     0%     0%  1.00x    ONLINE  /mnt/disko-install-root
19:56:54
3 Jan 2025
@guiniol:matrix.orgguiniol joined the room.22:02:58
@guiniol:matrix.orgguiniolHi all! I am trying to use disko to setup a ZFS pool, and it seems that the code creating the partitions is not giving them the partlabels that the code that's creating the pool expects:22:06:11
@guiniol:matrix.orgguiniol
not all disks accounted for, skipping creating zpool znas
++ echo '/dev/disk/by-partlabel/disk-samsung_pm863a_s2tynx0k401843-zfs
/dev/disk/by-partlabel/disk-samsung_pm863a_s2tynx0k602434-zfs
/dev/disk/by-partlabel/disk-samsung_pm863a_s2tynx0m101514-zfs
/dev/disk/by-partlabel/disk-samsung_pm863a_s2tynx0m104200-zfs
/dev/disk/by-partlabel/disk-samsung_pm863a_s2tynx0m105690-zfs
/dev/disk/by-partlabel/disk-samsung_pm863a_s2tynx0m105696-zfs'
+ diff /dev/fd/63 /dev/fd/62
++ echo '/dev/disk/by-partlabel/087ae77a63bca70cf4e6cc400ae75807f9f2
/dev/disk/by-partlabel/8aaf2c7c984564bdb7e0011e422c6a18c2a2
/dev/disk/by-partlabel/8c50307ad89c89315f46d48e8cffd1d8fe57
/dev/disk/by-partlabel/9302577e1d192ebb8ee6d1ed80cd11999356
/dev/disk/by-partlabel/c97a99017e1be9178a666ae8fe0f078f7f9e
/dev/disk/by-partlabel/e0b29d880c5fe44a941fc7c68948ec1c4c12'
1,6c1,6
< /dev/disk/by-partlabel/disk-samsung_pm863a_s2tynx0k401843-zfs
< /dev/disk/by-partlabel/disk-samsung_pm863a_s2tynx0k602434-zfs
< /dev/disk/by-partlabel/disk-samsung_pm863a_s2tynx0m101514-zfs
< /dev/disk/by-partlabel/disk-samsung_pm863a_s2tynx0m104200-zfs
< /dev/disk/by-partlabel/disk-samsung_pm863a_s2tynx0m105690-zfs
< /dev/disk/by-partlabel/disk-samsung_pm863a_s2tynx0m105696-zfs
---
> /dev/disk/by-partlabel/087ae77a63bca70cf4e6cc400ae75807f9f2
> /dev/disk/by-partlabel/8aaf2c7c984564bdb7e0011e422c6a18c2a2
> /dev/disk/by-partlabel/8c50307ad89c89315f46d48e8cffd1d8fe57
> /dev/disk/by-partlabel/9302577e1d192ebb8ee6d1ed80cd11999356
> /dev/disk/by-partlabel/c97a99017e1be9178a666ae8fe0f078f7f9e
> /dev/disk/by-partlabel/e0b29d880c5fe44a941fc7c68948ec1c4c12```
22:06:20
@guiniol:matrix.orgguiniol What am I doing wrong? I checked the members in my vdevs are indeed the right disks 22:06:56
@guiniol:matrix.orgguiniolI couldn't quite find the part that creates the partlabels (the part that expects them is here: https://github.com/nix-community/disko/blob/84a5b93637cc16cbfcc61b6e1684d626df61eb21/lib/types/zpool.nix#L238C1-L238C109)22:08:37
@guiniol:matrix.orgguiniolnevermind, I found it: https://github.com/nix-community/disko/blob/84a5b93637cc16cbfcc61b6e1684d626df61eb21/lib/types/gpt.nix#L8722:19:23
@guiniol:matrix.orgguiniolso, my names were too long and hashed instead of used as is, except no one told the code in zpool.nix22:19:47
@guiniol:matrix.orgguiniolI'll open an issue22:19:52
@guiniol:matrix.orgguiniolturns out there's one already: https://github.com/nix-community/disko/issues/91322:22:09
@sylk0s:matrix.orgSylkos joined the room.22:49:48
@guiniol:matrix.orgguiniol left the room.23:30:10
4 Jan 2025
@bl1nk:matrix.orgbl1nk joined the room.14:17:24

Show newer messages


Back to Room ListRoom Version: 10