| 1 Jan 2025 |
@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 | I do not confess to understanding the why, just that my VM is now working as expected | 17:27:25 |
@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 | * 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 changed their display name from pinpox [DECT: 7170] to pinpox. | 18:20:02 |
| jopejoe1 changed their display name from jopejoe1 [4094] to jopejoe1. | 23:29:38 |
| 2 Jan 2025 |
@brian:bmcgee.ie | yeah, 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 | This was a bit of a pain in the arse to figure out https://github.com/nix-community/disko/issues/192#issuecomment-2567944604 | 16:17:30 |
| x10an14 joined the room. | 19:54:26 |
x10an14 | 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 joined the room. | 22:02:58 |
guiniol | Hi 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 | 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 | What am I doing wrong? I checked the members in my vdevs are indeed the right disks | 22:06:56 |
guiniol | I 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 | nevermind, I found it: https://github.com/nix-community/disko/blob/84a5b93637cc16cbfcc61b6e1684d626df61eb21/lib/types/gpt.nix#L87 | 22:19:23 |
guiniol | so, my names were too long and hashed instead of used as is, except no one told the code in zpool.nix | 22:19:47 |
guiniol | I'll open an issue | 22:19:52 |
guiniol | turns out there's one already: https://github.com/nix-community/disko/issues/913 | 22:22:09 |
| Sylkos joined the room. | 22:49:48 |
| guiniol left the room. | 23:30:10 |
| 4 Jan 2025 |
| bl1nk joined the room. | 14:17:24 |
bl1nk | I replaced the OS on a VPS with NixOS using NixOS anywhere, that used disko as well. I now want to replace the generic first time install with something custom using colmena. Do I copy the disk-config.nix over to that configuration.nix as well and add the disko module? | 14:39:53 |
bl1nk | * I replaced the OS on a VPS with NixOS using nixos-anywhere, that used disko as well. I now want to replace the generic first time install with something custom using colmena. Do I copy the disk-config.nix over to that configuration.nix as well and add the disko module? | 14:40:06 |
bl1nk | Previously I used nixos-infect which also generated fileSystems.*, I guess I'll have to write that myself now? | 15:20:37 |
bl1nk | Ah, reading the docs helps :) https://github.com/nix-community/disko/blob/master/docs/quickstart.md#step-7-complete-the-nixos-installation | 15:24:38 |
| @kranzes:matrix.org left the room. | 15:29:36 |
phaer | If you do, you are able to use the fileSystems disko creates for your from your disko config. That's about the only difference, disko won't run again or so by including it into your config | 22:57:31 |
| 5 Jan 2025 |
bl1nk | In reply to@phaer:matrix.org If you do, you are able to use the fileSystems disko creates for your from your disko config. That's about the only difference, disko won't run again or so by including it into your config I went and ran nixos-generate-config on the host to get back a hardware-configuration.nix with fileSystems.* defined if that's what you mean? | 12:53:34 |
lassulus | yeah, those usually conflict with disko, you can run nixos-generate-config with --no-filesystems | 13:12:28 |