disko
disko copied to clipboard
disk/by-partlabel does not contain entries created with size 100%
Note: this has only be tested on oracle VM
Following configuration:
disk = {
sda = {
type = "disk";
device = builtins.elemAt disks 0;
content = {
type = "gpt";
partitions = {
boot = {
size = "1M";
type = "EF02";
priority = 1;
};
root = {
size = "100%";
content = {
type = "btrfs";
extraArgs = [
"-f"
"-L NixOS" # Filesystem label
];
subvolumes =
let
commonOptions = [
"compress=zstd"
"noatime"
"nodiscard" # Prefer periodic TRIM
];
in
{
# Root subvolume
"/@" = {
mountpoint = "/";
mountOptions = commonOptions;
};
# Persistent data
"/@persist" = {
mountpoint = "/persist";
mountOptions = commonOptions ++ [
"nodev"
"nosuid"
"noexec"
];
};
};
};
priority = 3;
};
};
};
};
};
fails when trying to lookup /dev/disk/by-partlabel/disk-sda-root
no amount of calling:
partprobe /dev/sdapartx -u /dev/sdaudevadm trigger
is able to fix it. The first partition disk-sda-boot appears there normally.
After changing size from 100% to some concrete value like 140G everything works fine.
I cannot reproduce this. My config contains a total of seven partitions, five of which are created with size = "100%";, and they all show up:
ls -1 /dev/disk/by-partlabel
disk-boot-drive-boot
disk-boot-drive-nixos
disk-nix-store-nix-store
disk-nix-store-swap
disk-scratch-drive-scratch
disk-tank-1-tank-1
disk-tank-2-tank-2
Maybe this is specific to btrfs?
Can be, I haven't seen it with other filesystems. I will try my zfs config with size = 100% and report the results