Trying to get mirror setup working
This commit is contained in:
@@ -1,20 +1,14 @@
|
||||
# Data mirror disks
|
||||
"content-1" = {
|
||||
type = "disk";
|
||||
device = "/dev/disk/by-id/ata-FUJITSU_MHW2120BH_NZ2TT772DCN5";
|
||||
device = "$CONTENT_DISK_ID";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
"data-1" = {
|
||||
mdadm = {
|
||||
size = "$PARTITION_SIZE";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "crypted-content-1";
|
||||
settings.keyFile = "/etc/secrets/disks/content-1";
|
||||
content = {
|
||||
type = "mdraid";
|
||||
name = "data-storage";
|
||||
};
|
||||
type = "mdraid";
|
||||
name = "raid1";
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -22,35 +16,33 @@
|
||||
};
|
||||
"parity-1" = {
|
||||
type = "disk";
|
||||
device = "/dev/disk/by-id/ata-TOSHIBA_MQ04ABF100_X7CXT0D8T";
|
||||
device = "$PARITY_DISK_ID";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
"parity-1" = {
|
||||
mdadm = {
|
||||
size = "$PARTITION_SIZE";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "crypted-parity-1";
|
||||
settings.keyFile = "/etc/secrets/disks/parity-1";
|
||||
content = {
|
||||
type = "mdraid";
|
||||
name = "data-storage";
|
||||
};
|
||||
type = "mdraid";
|
||||
name = "raid1";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# RAID 1 Configuration
|
||||
mdadm = {
|
||||
"data-storage" = {
|
||||
type = "mdadm";
|
||||
level = 1;
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "xfs";
|
||||
mountpoint = "/mnt/data-storage";
|
||||
disko.devices.mdadm = {
|
||||
raid1 = {
|
||||
type = "mdadm";
|
||||
level = 1;
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "crypted-mirror";
|
||||
settings.keyFile = "/etc/secrets/disks/mirror";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "xfs";
|
||||
mountpoint = "/mnt/data";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user