-
Notifications
You must be signed in to change notification settings - Fork 10
mantl lvm
-
lvm: mantl-lvm
-
This lvm role optionally creates an LVM Volume group Install required software and tools. Enable lvmetad daemon. Create volume group and add provided extra block device to it as physical volume. Register fact with name of created volume group.
-
create volume group, and save the in
etc/mantl
-
enable lvmetad service
-
Dependencies
- mantl-common
- device-mapper-libs
- lvm2
roles/lvm/defaults/main.yml // defines variables lvm_volume_group_name and lvm_physical_device solutions: part of spec file
roles/lvm/tasks/main.yml // include volume.yml when lvm_physical_device is not null // set volume_group_name to null when lvm_physical_device is null solutions: //if lvm_physical_device != "" define variables lvm_volume_group_name and lvm_physical_device //else volume_group_name = ""
roles/lvm/tasks/volume.yml line 2 // sudo yum install latest device-mapper-libs // tags are docker,bootstrap,lvm2 solutions: // part of depends section
line 13 // update lvg ansible modules // run on local host // run one time on the one host // put ansible file (from url) in {{ playbook_dir }}/library/lvg.py // url: https://raw.githubusercontent.com/ansible/ansible-modules-extras/02b68be09dca9760a761d4147f76cfc940c41cba/system/lvg.py // tag is docker solutions: delete, any replacement needed?
line 22 // sudo yum install latest lvm2 tools // tags are docker, bootstrap, lvm solutions: part of depends section
line 32 // sudo list volume groups with command vgscan and put output in variable volume_groups // tags are docker and lvm solutions: volume_groups=$(vgscan)
line 40 // create volume group // volume group name(from tasks/main.yml) and comma separated devices to use as physical devices // these are created when there is nothing in them line 50 // enable lvmetad service // start lvm2-lvmetad on boot // tags are docker and lvm packaging solutions: systemctl enable lvm2-lvmetad 2>/dev/null systemctl restart lvm2-lvmetad line 60 // save lvm_volume_group_name as variable called volume_group_name // tag is lvm solutions: volume_group_name=$(lvm_volume_group_name)
-