salt.states.lvm
Management of Linux logical volumes
A state module to manage LVMs
/dev/sda: lvm.pv_present my_vg: lvm.vg_present: - devices: /dev/sda lvroot: lvm.lv_present: - vgname: my_vg - size: 10G - stripes: 5 - stripesize: 8K
-
Remove a given existing Logical Volume from a named existing volume group
- name
-
The Logical Volume to remove
- vgname
-
The name of the Volume Group on which the Logical Volume resides
salt.states.lvm.lv_absent(name, vgname=None)
-
Ensure that a Logical Volume is present, creating it if absent.
- name
-
The name of the Logical Volume
- vgname
-
The name of the Volume Group on which the Logical Volume resides
- size
-
The size of the Logical Volume in megabytes, or use a suffix such as S, M, G, T, P for 512 byte sectors, megabytes, gigabytes or terabytes respectively. The suffix is case insensitive.
- extents
-
The number of logical extents allocated to the Logical Volume It can be a percentage allowed by lvcreate's syntax, in this case it will set the Logical Volume initial size and won't be resized.
- snapshot
-
The name of the snapshot
- pv
-
The Physical Volume to use
- kwargs
-
Any supported options to lvcreate. See
linux_lvm
for more details.
New in version 2016.11.0.
- thinvolume
-
Logical Volume is thinly provisioned
- thinpool
-
Logical Volume is a thin pool
New in version 2018.3.0.
- force
-
Assume yes to all prompts
New in version 3002.0.
- resizefs
-
Use fsadm to resize the logical volume filesystem if needed
salt.states.lvm.lv_present(name, vgname=None, size=None, extents=None, snapshot=None, pv='', thinvolume=False, thinpool=False, force=False, resizefs=False, **kwargs)
-
Ensure that a Physical Device is not being used by lvm
- name
-
The device name to initialize.
salt.states.lvm.pv_absent(name)
-
Set a Physical Device to be used as an LVM Physical Volume
- name
-
The device name to initialize.
- kwargs
-
Any supported options to pvcreate. See
linux_lvm
for more details.
salt.states.lvm.pv_present(name, **kwargs)
-
Remove an LVM volume group
- name
-
The volume group to remove
salt.states.lvm.vg_absent(name)
-
Create an LVM Volume Group
- name
-
The Volume Group name to create
- devices
-
A list of devices that will be added to the Volume Group
- kwargs
-
Any supported options to vgcreate. See
linux_lvm
for more details.
salt.states.lvm.vg_present(name, devices=None, **kwargs)
© 2021 SaltStack.
Licensed under the Apache License, Version 2.0.
https://docs.saltproject.io/en/latest/ref/states/all/salt.states.lvm.html