Page 10 of 23
create_lv
Create a logical volume
Arguments
$1 | Logical volume name |
$2 | Volume group name |
$3 | Size (Default: megabytes, optional suffixes: [kmgt]. Special value: 'all'
takes the whole free size in the VG. |
Returns
0: OK, !=0: Error
Displays
Info msg
create_vg
Create a volume group
Arguments
$1 | volume group name |
$2 | PE size (including optional unit, default=Mb) |
$3 | Device path, without the /dev prefix |
Returns
0: OK, !=0: Error
Displays
Info msg
lv_exists
Checks if a given logical volume exists
Arguments
Returns
0 if it exists, 1 if not
Displays
Nothing
lv_to_vg
Returns the VG containing a given LV
Arguments
Returns
Always 0
Displays
The containing VG name, or nothing if device is not a valid LV.
lvm_vg_free
Returns the available size in a VG (in Mb)
Arguments
Returns
Always 0
Displays
The available size in Mbytes. Nothing if VG does not exist.
vg_exists
Checks if a given volume group exists
Arguments
Returns
0 if it exists, 1 if not
Displays
Nothing