Skip to content

Commit

Permalink
Merge pull request #151 from aka7/lv_type_support
Browse files Browse the repository at this point in the history
support for muti options settings for logical volumes
  • Loading branch information
jrha committed Jul 24, 2023
2 parents 970084e + 37d2c25 commit cd27a21
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions filesystem/config.pan
Expand Up @@ -1004,11 +1004,16 @@ variable DISK_LV_BY_VG = {
if ( !exists(SELF[vg_name]) ) {
SELF[vg_name] = dict();
};
options = dict();
if ( exists(params['size']) ) {
SELF[vg_name][params['device']] = params['size'];
options['size'] = params['size'];
} else {
error('Size has not been specified for logical volume '+params['device']);
};
if ( exists(params['raid_type'] ) ) {
options['raid_type'] = params['raid_type'];
};
SELF[vg_name][params['device']] = options;
};
};

Expand All @@ -1019,7 +1024,7 @@ variable DISK_LV_BY_VG = {
"/system/blockdevices/logical_volumes" = {
if ( is_defined(DISK_LV_BY_VG) ) {
foreach (vg_name;lv_list;DISK_LV_BY_VG) {
lvs_add (vg_name, lv_list);
lvo_add (vg_name, lv_list);
};
SELF;
} else {
Expand Down

0 comments on commit cd27a21

Please sign in to comment.