Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BTRFS in LUKS? #54

Closed
RaitoBezarius opened this issue Nov 15, 2022 · 5 comments · Fixed by #305
Closed

BTRFS in LUKS? #54

RaitoBezarius opened this issue Nov 15, 2022 · 5 comments · Fixed by #305

Comments

@RaitoBezarius
Copy link
Member

Hi there,

Going through the code and the examples, I'm not sure BTRFS in LUKS layout is supported with that, is this intentional? Can I send a PR?

Thanks a lot for the amazing tool!

@Lassulus
Copy link
Collaborator

Lassulus commented Nov 15, 2022

that should just work. I guess you could add an example so it's more clear.

the type luks has a content option. which is of type deviceType. deviceType also includes btrfs

@RaitoBezarius
Copy link
Member Author

luks.content = {deviceType = "btrfs"; } and how can I specify further stuff like subvolumes, etc. ?

@Lassulus
Copy link
Collaborator

ah, the btrfs support is not as advanced as people wanted it to be, right now I just support a list of subdirs. A full example would be like this:

{ disks ? [ "/dev/vdb" ], ... }: {
  disk = {
    vdb = {
      type = "disk";
      device = builtins.elemAt disks 0;
      content = {
        type = "table";
        format = "gpt";
        partitions = [
          {
            type = "partition";
            name = "ESP";
            start = "1MiB";
            end = "128MiB";
            fs-type = "fat32";
            bootable = true;
            content = {
              type = "filesystem";
              format = "vfat";
              mountpoint = "/boot";
            };
          }
          {
            name = "root";
            type = "partition";
            start = "128MiB";
            end = "100%";
            content = {
              type = "luks";
              name = "crypted";
              content = {
                type = "btrfs";
                mountpoint = "/";
                subvolumes = [
                  "/home"
                  "/test"
                ];
              };
            };
          }
        ];
      };
    };
  };
}

@Lassulus
Copy link
Collaborator

so? does it work?

@zarelit
Copy link
Contributor

zarelit commented Dec 14, 2022

FWIW btrfs as content of a luks container in a mdraid is working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants