!oNSIfazDqEcwhcOjSL:matrix.org

disko

384 Members
disko - declarative disk partitioning - https://github.com/nix-community/disko98 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
4 Nov 2025
@blimbus:matrix.orgblimbus
In reply to @zimward:zimward.moe
bcachefs didn't like to format my drive (its an relatively old nvme), that was about 6months ago. can you verify that the partition/drives have been formatted?
Yeah if I boot into the installer I can mount the drives and see files on them, bcachefs show-super or whatever the info command is also looks correct, I can post some outputs later when I am home from work but not sure how helpful they will be. I'll try to simplify my config and try again.
17:39:03
@whispers:catgirl.cloud@whispers:catgirl.cloud joined the room.20:07:56
@dawnofmidnight:catgirl.cloud@dawnofmidnight:catgirl.cloud left the room.20:08:01
6 Nov 2025
@nhnn:nhnn.devnhnn changed their profile picture.15:18:46
7 Nov 2025
@disco_stick:matrix.orgcrabby-rathbun changed their display name from LARPing tech Simps like Hacker News users to seaweed salad.00:07:28
10 Nov 2025
@no-mood:matrix.orgno-moodOkay I'm going crazy, I just reinstalled my system with nixos-anywhere since it didn't boot anymore 18:01:38
@no-mood:matrix.orgno-moodI get: Stage 2 init script (/mnt-root/nix/store/... not found)18:02:03
@no-mood:matrix.orgno-mood

This is my config:

{ inputs, ... }:
let
  ssdDevice = "/dev/disk/by-id/nvme-SAMSUNG_MZVLB256HAHQ-000H1_S425NX2M363531";
  hddDevice = "/dev/disk/by-id/ata-ST2000DM008-2UB102_ZK20P7NY";
  wdDevice = "/dev/disk/by-id/ata-WDC_WD10EARS-00Y5B1_WD-WCAV5S128768";
in
{
  imports = [
    inputs.disko.nixosModules.disko
  ];

  boot.supportedFilesystems = [ "bcachefs" ];

  disko.devices = {
    disk = {
      # NVMe SSD - Fast tier for metadata and caching
      nvme = {
        type = "disk";
        device = ssdDevice;
        content = {
          type = "gpt";
          partitions = {
            ESP = {
              priority = 1;
              name = "ESP";
              size = "512M";
              type = "EF00";
              content = {
                type = "filesystem";
                format = "vfat";
                mountpoint = "/boot";
                mountOptions = [ "umask=0077" ];
              };
            };
            # NVMe partition for bcachefs (fast tier)
            main = {
              size = "100%";
              content = {
                type = "bcachefs";
                filesystem = "main_bcachefs";
                label = "ssd.nvme";
                extraFormatArgs = [ "--discard" ];
              };
            };
          };
        };
      };

      # HDD - Bulk storage tier
      hdd = {
        type = "disk";
        device = hddDevice;
        content = {
          type = "gpt";
          partitions = {
            # HDD partition for bcachefs (storage tier)
            main = {
              size = "100%";
              content = {
                type = "bcachefs";
                filesystem = "main_bcachefs";
                label = "hdd.storage";
              };
            };
          };
        };
      };

      # Western Digital HDD - Separate btrfs filesystem
      WD10EARS = {
        type = "disk";
        device = wdDevice;
        content = {
          type = "gpt";
          partitions = {
            main = {
              size = "100%";
              content = {
                type = "btrfs";
                extraArgs = [ "-f" ];
                subvolumes = {
                  "@" = {
                    mountpoint = "/mnt/wd10ears";
                    mountOptions = [
                      "compress=zstd"
                      "noatime"
                    ];
                  };
                };
              };
            };
          };
        };
      };
    };

    bcachefs_filesystems = {
      main_bcachefs = {
        type = "bcachefs_filesystem";
        extraFormatArgs = [
          "--compression=lz4"
          "--background_compression=zstd:6"
          # Tiering configuration
          "--background_target=hdd"
          "--foreground_target=ssd"
          "--promote_target=ssd"
          "--metadata_target=ssd"
        ];
        subvolumes = {
          # Root filesystem - equivalent to @root
          "@root" = {
            mountpoint = "/";
            mountOptions = [
              "noatime"
            ];
          };

          # Nix store - equivalent to @nix
          "@nix" = {
            mountpoint = "/nix";
            mountOptions = [
              "noatime"
            ];
          };

          # Backups directory
          "@backups" = {
            mountpoint = "/var/backups";
            mountOptions = [
              "noatime"
            ];
          };
        };
      };
    };
  };

}
18:02:47
@no-mood:matrix.orgno-moodI've discussed this in #users:nixos.org and it seems that subvolumes are created but are not used; all my files store in the root, and the subvolumes are empty18:04:14
@no-mood:matrix.orgno-mood* Okay I'm going crazy, I just reinstalled my system with nixos-anywhere (using bcachefs) since it didn't boot anymore 18:04:32
@no-mood:matrix.orgno-moodLink to that discussion: https://matrix.to/#/!6oudZq5zJjAyrxL2uY:0upti.me/$nd9QnFGo3-5Q9JB3tgef3V0_PyyaGoEqR_rdyyPITCY?via=laas.fr&via=matrix.org&via=node.marinchik.ink18:06:42
@no-mood:matrix.orgno-moodNow I just don't know how to fix, I even tried to move files from the root to the subvolumes; it still fails18:07:12

Show newer messages


Back to Room ListRoom Version: 10