From: Daniel Henrique Barboza <danielhb(a)linux.vnet.ibm.com>
Changes in v2:
- added API.json parameter verification
- added disk verification
- added mockmodel improvements
- other improvements based on feedback
This patch series implements the backend changes to allow disks/partitions to
be added to an existing LVM (logical) pool.
The process, as discussed previously in kimchi mailing list, is to use
'vgextend' and 'virsh pool-refresh' commands to add the disks and then
refresh the pool.
It is also worth noticing that the existing data from the disks/partitions
being added to the pool will be erased/lost.
To test the patch:
$ curl -u root -H 'Content-type: application/json' -H 'Accept:
application/json' -X PUT localhost:8000/storagepools/<pool_name> -d
'{"disks": ["/path/to/disk1", "/path/to/disk2"] }'
Tip: to test the patch over and over with the same pool and disks
without the need to destroy/create the pool:
$ vgreduce <pool_name> disk1 disk2
$ virsh pool-refresh <pool_name>
The above commands will restore the logical pool to its previous state,
before adding disks 'disk1' and 'disk2'
Daniel Henrique Barboza (4):
Add disks to LVM pool: control and model changes
Add disks to LVM pool: API.md changes
Add disks to LVM pool: mockmodel changes
Add disks to LVM pool: API.json changes
docs/API.md | 5 ++++-
src/kimchi/API.json | 16 +++++++++++++
src/kimchi/control/storagepools.py | 2 +-
src/kimchi/mockmodel.py | 36 +++++++++++++++++++++++------
src/kimchi/model/storagepools.py | 46 +++++++++++++++++++++++++++++++-------
5 files changed, 88 insertions(+), 17 deletions(-)
--
1.8.3.1