From 84214f3e3ca40d1b5db4022a313e741abc4ad7f1 Mon Sep 17 00:00:00 2001 From: Baitinq Date: Wed, 24 Aug 2022 20:23:50 +0200 Subject: Support logical volume sizing in logical extents units This allows us to create a lv with size 100%FREE for all the availeable size of the VG, etc. --- lib/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/default.nix b/lib/default.nix index 3d86f28..64fc93d 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -82,7 +82,7 @@ let { ''; create.lv = q: x: '' - lvcreate -L ${x.size} -n ${q.name} ${q.vgname} + lvcreate ${if hasInfix "%" x.size then "-l" else "-L"} ${x.size} -n ${q.name} ${q.vgname} ${create-f { device = "/dev/mapper/${q.vgname}-${q.name}"; } x.content} ''; -- cgit v1.2.3