mirror of
https://github.com/TECHNOFAB11/disko.git
synced 2025-12-11 23:50:05 +01:00
feat: noop partitions
Some deployments just need a raw block device because the app works better when handling those. Examples: Ceph, Longhorn, OpenEBS. The new `noop` type supports that. It just does nothing with the partitions created, whenever applied. @moduon MT-904
This commit is contained in:
parent
1af856886e
commit
9b53ee7b11
2 changed files with 15 additions and 1 deletions
|
|
@ -31,6 +31,8 @@ let {
|
|||
config.lvm = q: x:
|
||||
foldl' recursiveUpdate {} (mapAttrsToList (name: config-f { inherit name; vgname = x.name; }) x.lvs);
|
||||
|
||||
config.noop = q: x: {};
|
||||
|
||||
config.partition = q: x:
|
||||
config-f { device = q.device + toString q.index; } x.content;
|
||||
|
||||
|
|
@ -65,6 +67,8 @@ let {
|
|||
${concatStrings (mapAttrsToList (name: create-f { inherit name; vgname = x.name; }) x.lvs)}
|
||||
'';
|
||||
|
||||
create.noop = q: x: "";
|
||||
|
||||
create.partition = q: x: ''
|
||||
parted -s ${q.device} mkpart ${x.part-type} ${x.fs-type or ""} ${x.start} ${x.end}
|
||||
${optionalString (x.bootable or false) ''
|
||||
|
|
@ -119,6 +123,8 @@ let {
|
|||
'';}
|
||||
);
|
||||
|
||||
mount.noop = q: x: {};
|
||||
|
||||
mount.partition = q: x:
|
||||
mount-f { device = q.device + toString q.index; } x.content;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue