mirror of
https://github.com/TECHNOFAB11/disko.git
synced 2025-12-12 08:00:05 +01:00
types mdadm: add metadata option
This commit is contained in:
parent
527a945c64
commit
fba7b03a21
1 changed files with 6 additions and 0 deletions
|
|
@ -892,6 +892,10 @@ rec {
|
||||||
type = types.int;
|
type = types.int;
|
||||||
default = 1;
|
default = 1;
|
||||||
};
|
};
|
||||||
|
metadata = mkOption {
|
||||||
|
type = types.enum [ "1" "1.0" "1.1" "1.2" "default" "ddf" "imsm" ];
|
||||||
|
default = "default";
|
||||||
|
};
|
||||||
content = diskoLib.deviceType;
|
content = diskoLib.deviceType;
|
||||||
_meta = mkOption {
|
_meta = mkOption {
|
||||||
internal = true;
|
internal = true;
|
||||||
|
|
@ -908,6 +912,8 @@ rec {
|
||||||
echo 'y' | mdadm --create /dev/md/${config.name} \
|
echo 'y' | mdadm --create /dev/md/${config.name} \
|
||||||
--level=${toString config.level} \
|
--level=${toString config.level} \
|
||||||
--raid-devices=''${RAIDDEVICES_N_${config.name}} \
|
--raid-devices=''${RAIDDEVICES_N_${config.name}} \
|
||||||
|
--metadata=${config.metadata} \
|
||||||
|
--homehost=any \
|
||||||
''${RAIDDEVICES_${config.name}}
|
''${RAIDDEVICES_${config.name}}
|
||||||
udevadm trigger --subsystem-match=block; udevadm settle
|
udevadm trigger --subsystem-match=block; udevadm settle
|
||||||
${optionalString (!isNull config.content) (config.content._create "/dev/md/${config.name}")}
|
${optionalString (!isNull config.content) (config.content._create "/dev/md/${config.name}")}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue