lib/partition_setup.pm

PARTITION_SETUP

SYNOPSIS

This module contains functions for the partitioning part of the installation

is_storage_ng_newui

 is_storage_ng_newui();

Returns true if running on a scenario that expects storage-ng. We got changes to the storage-ng UI in SLE 15 SP1, Leap 15.1 and TW

wipe_existing_pastitions_storage_ng

 wipe_existing_pastitions_storage_ng();

Deletes all existing partitions in the expert partitioner. Despite the name it does not check if it is run on a storage ng system, so be careful here

create_new_partition_table

 create_new_partition_table($table_type);

$table_type can be 'GPT' or 'MSDOS' and is optional. This function creates a new partitioning setup from scratch.

mount_device

 mount_device($mount);

Set mount point and volume label. $mount is mount point.

set_partition_size

 set_partition_size([size => $size]);

The function can be executed when the SUT is on the yast partitioner panel `Add partition on /dev/xxx -> New Partition Size` to set the $args{size} in megabytes.

Example:

 set_patition_size(size => '100')

resize_partition

 resize_partition();

Method assumes that correct disk is already selected. Select Maximum size by default

addpart

 addpart(size => $size, role => $role [, format => $format] [, enable_snapshots => $enable_snapshots] [, fsid => $fsid] [, mount => $mount] [, encrypt => $encrypt]);

Adds a partition with the given parameters to the partitioning table.

addvg

 addvg(name => $name [, add_all_pvs => $add_all_pvs]);

Add a LVM volume group. Example:

 addvg(name => 'vg-system', add_all_pvs => 1);

addlv

 addlv(vg => $vg, name => $name, role => $role [, size => $size] [, mount => $mount] [, [thinpool => $thinpool] | [thinvolume => $thinvolume]]);

Add a LVM logical volume.

addboot

 addboot($part_size);

Add a boot partition based on architecture.

$part_size is the size of partition.

skip_select_first_hard_disk

 skip_select_first_hard_disk();

Skip selecting first hard disk and return 0. Return 1 if no selection of hard disk is required or the first hard disk is already pre-selected.

select_first_hard_disk

 select_first_hard_disk();

Select the first hard disk.

enable_encryption_guided_setup

 enable_encryption_guided_setup();

Enable encryption in guided setup during installation.

take_first_disk_storage_ng

 take_first_disk_storage_ng();

Only works on storage-ng and is being called by take_first_disk.

take_first_disk

 take_first_disk([%args]);

Take the first disk to be partitioned. Take first partition as storage ng if it is is_storage_ng. [%args] is device type.

Example:

 take_first_disk(iscsi => 1);