mirror of
https://github.com/nix-community/disko.git
synced 2026-12-02 22:13:28 +01:00
lvm_vg: fix size=100% leading to crash
lvcreate -l does not accept a '100%' parameter which currently leads to a crash. THis change automatically changes `100%` to `100%FREE` leading to the intended behavior.
This commit is contained in:
1 parent
09a776702b
commit
58cd832497
2 files changed
+2
-2
No files matched your search
@@ -45,7 +45,7 @@
|
|||||||
type = "lvm_vg";
|
type = "lvm_vg";
|
||||||
lvs = {
|
lvs = {
|
||||||
root = {
|
root = {
|
||||||
size = "100M";
|
size = "100%";
|
||||||
content = {
|
content = {
|
||||||
type = "filesystem";
|
type = "filesystem";
|
||||||
format = "ext4";
|
format = "ext4";
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ in
|
|||||||
--yes \
|
--yes \
|
||||||
${if (lv.lvm_type == "thinlv") then "-V"
|
${if (lv.lvm_type == "thinlv") then "-V"
|
||||||
else if lib.hasInfix "%" lv.size then "-l" else "-L"} \
|
else if lib.hasInfix "%" lv.size then "-l" else "-L"} \
|
||||||
${lv.size} \
|
${if lib.hasSuffix "%" lv.size then "${lv.size}FREE" else lv.size} \
|
||||||
-n "${lv.name}" \
|
-n "${lv.name}" \
|
||||||
${lib.optionalString (lv.lvm_type == "thinlv") "--thinpool=${lv.pool}"} \
|
${lib.optionalString (lv.lvm_type == "thinlv") "--thinpool=${lv.pool}"} \
|
||||||
${lib.optionalString (lv.lvm_type != null && lv.lvm_type != "thinlv") "--type=${lv.lvm_type}"} \
|
${lib.optionalString (lv.lvm_type != null && lv.lvm_type != "thinlv") "--type=${lv.lvm_type}"} \
|
||||||
|
|||||||
Reference in new issue
Block a user