module documentation
Utility functions for LVM.
Function |
|
Checks if the volume group list is valid. |
Function |
|
Check consistency of PV sizes in a node for exclusive storage. |
Function |
|
Test if the given PV sizes are permitted with exclusive storage. |
Checks if the volume group list is valid.
The function will check if a given volume group is in the list of volume groups and has a minimum size.
Parameters | |
vglist:dict | dictionary of volume group names and their size |
vgname:str | the volume group we should check |
minsize:int | the minimum size we accept |
Returns | |
None or str | None for success, otherwise the error message |
Check consistency of PV sizes in a node for exclusive storage.
Parameters | |
pvs | list of LvmPvInfo objects |
Returns | |
tuple | A pair composed of: 1. a list of error strings describing the violations found, or an empty list if everything is ok; 2. a pair containing the sizes of the smallest and biggest PVs, in MiB. |