mirror of
https://github.com/TECHNOFAB11/disko.git
synced 2025-12-12 08:00:05 +01:00
add mdadm support
This commit is contained in:
parent
9bca66ca7d
commit
88cb7a4719
3 changed files with 99 additions and 91 deletions
60
example/raid.nix
Normal file
60
example/raid.nix
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
# usage: nix-instantiate --eval --json --strict example/config.nix | jq .
|
||||
{
|
||||
type = "devices";
|
||||
content = {
|
||||
vdb = {
|
||||
type = "table";
|
||||
format = "gpt";
|
||||
partitions = [
|
||||
{
|
||||
type = "partition";
|
||||
part-type = "primary";
|
||||
start = "1MiB";
|
||||
end = "100%";
|
||||
content = {
|
||||
type = "mdraid";
|
||||
name = "raid1";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
vdc = {
|
||||
type = "table";
|
||||
format = "gpt";
|
||||
partitions = [
|
||||
{
|
||||
type = "partition";
|
||||
part-type = "primary";
|
||||
start = "1MiB";
|
||||
end = "100%";
|
||||
content = {
|
||||
type = "mdraid";
|
||||
name = "raid1";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
raid1 = {
|
||||
type = "mdadm";
|
||||
level = 1;
|
||||
content = {
|
||||
type = "table";
|
||||
format = "gpt";
|
||||
partitions = [
|
||||
{
|
||||
type = "partition";
|
||||
part-type = "primary";
|
||||
start = "1MiB";
|
||||
end = "100%";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/raid";
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue