parent
7516e0a906
commit
a5235a4654
|
@ -123,25 +123,9 @@ in
|
||||||
} // lib.optionalAttrs disk.withLuks {
|
} // lib.optionalAttrs disk.withLuks {
|
||||||
lvm_vg.${vgName} = {
|
lvm_vg.${vgName} = {
|
||||||
type = "lvm_vg";
|
type = "lvm_vg";
|
||||||
lvs = lib.optionalAttrs disk.withCeph
|
lvs = lib.optionalAttrs disk.withCeph {
|
||||||
{
|
ceph.size = "100%FREE";
|
||||||
# TODO: delete old code if this works
|
} // lib.optionalAttrs disk.withZfs { inherit zfs; };
|
||||||
ceph.size = "100%FREE";
|
|
||||||
# the header is 3650 byte long and substract an additional 446 byte for aligment
|
|
||||||
# error messages:
|
|
||||||
# Volume group "lvm-chaos" has insufficient free space (51195 extents): 51200 required.
|
|
||||||
# Size is not a multiple of 512. Try using 40057405440 or 40057405952.
|
|
||||||
# ceph.size =
|
|
||||||
# let
|
|
||||||
# # convert GiB to bytes
|
|
||||||
# rootSizeMiB = rootSize * 1024 * 1024 * 1024;
|
|
||||||
# # convert back to MiB and allign to 4 MiB in the process
|
|
||||||
# roundToMiB = "/1024/1024/4*4";
|
|
||||||
# # substract 512 MiB for /boot and 20 MiB for luks+header+other
|
|
||||||
# bootOther = "-512-20";
|
|
||||||
# in
|
|
||||||
# "$((($(lsblk ${disk.device} --noheadings --nodeps --output SIZE --bytes)-${toString rootSizeMiB})${roundToMiB}${bootOther}))MiB";
|
|
||||||
} // lib.optionalAttrs disk.withZfs { inherit zfs; };
|
|
||||||
};
|
};
|
||||||
} // {
|
} // {
|
||||||
zpool.${zfsName} = {
|
zpool.${zfsName} = {
|
||||||
|
|
Loading…
Reference in New Issue