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.
This commit is contained in:
Baitinq 2022-08-24 20:23:50 +02:00
parent 7328d8b41e
commit 84214f3e3c
No known key found for this signature in database
GPG Key ID: FD14C4672CA7D2C5

View File

@ -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}
'';