[Kimchi-devel] [PATCH 0/3] Add disks to LVM pool backend

Daniel Barboza danielhb at linux.vnet.ibm.com
Fri Feb 7 12:53:10 UTC 2014


From: Daniel Henrique Barboza <danielhb at linux.vnet.ibm.com>

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 (3):
  Add disks to LVM pool: control and model changes
  Add disks to LVM pool: API changes
  Add disks to LVM pool: mockmodel changes

 docs/API.md                        |  5 ++++-
 src/kimchi/control/storagepools.py |  2 +-
 src/kimchi/mockmodel.py            | 12 ++++++------
 src/kimchi/model/storagepools.py   | 35 +++++++++++++++++++++++++++--------
 4 files changed, 38 insertions(+), 16 deletions(-)

-- 
1.8.3.1




More information about the Kimchi-devel mailing list