disko/example/lvm-raid.nix

75 lines
1.4 KiB
Nix
Raw Normal View History

2022-08-25 16:36:56 +00:00
{
disk = {
2022-08-25 16:36:56 +00:00
vdb = {
type = "disk";
device = "/dev/vdb";
content = {
type = "table";
format = "gpt";
partitions = [
{
type = "partition";
name = "primary";
start = "0%";
end = "100%";
content = {
type = "lvm_pv";
vg = "pool";
};
}
];
};
2022-08-25 16:36:56 +00:00
};
vdc = {
type = "disk";
device = "/dev/vdc";
content = {
type = "table";
format = "gpt";
partitions = [
{
type = "partition";
name = "primary";
start = "0%";
end = "100%";
content = {
type = "lvm_pv";
vg = "pool";
};
}
];
};
2022-08-25 16:36:56 +00:00
};
};
lvm_vg = {
2022-08-25 16:36:56 +00:00
pool = {
type = "lvm_vg";
lvs = {
root = {
type = "lvm_lv";
size = "100M";
lvm_type = "mirror";
content = {
type = "filesystem";
format = "ext4";
2022-08-25 16:36:56 +00:00
mountpoint = "/";
options = [
"defaults"
];
2022-08-25 16:36:56 +00:00
};
};
home = {
type = "lvm_lv";
size = "10M";
lvm_type = "raid0";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/home";
2022-08-25 16:36:56 +00:00
};
};
};
2022-08-25 16:36:56 +00:00
};
};
}