qvm-block extends volumes to NEW_SIZE
This commit is contained in:
parent
be48d48e56
commit
dcfc47fefe
@ -88,9 +88,9 @@ aliases: d, dt
|
||||
|
||||
extend
|
||||
^^^^^^
|
||||
| :command:`qvm-block extend` [-h] [--verbose] [--quiet] *POOL_NAME:VOLUME_ID* *SIZE*
|
||||
| :command:`qvm-block extend` [-h] [--verbose] [--quiet] *POOL_NAME:VOLUME_ID* *NEW_SIZE*
|
||||
|
||||
Extends the volume with *POOL_NAME:VOLUME_ID* BY *SIZE* bytes
|
||||
Extend the volume with *POOL_NAME:VOLUME_ID* TO *NEW_SIZE*
|
||||
|
||||
revert
|
||||
^^^^^^
|
||||
|
@ -129,12 +129,12 @@ def rename_volume(old_name, new_name):
|
||||
|
||||
def extend_volume(args):
|
||||
''' Extends an existing lvm volume. Note this works on any lvm volume not
|
||||
only thin volumes.
|
||||
only on thin volumes.
|
||||
'''
|
||||
vid = args.name
|
||||
size = int(args.size) / (1000 * 1000)
|
||||
log.debug("Extending LVM %s to %s", vid, size)
|
||||
cmd = ["lvextend", "-L+%s" % size, vid]
|
||||
cmd = ["lvextend", "-L%s" % size, vid]
|
||||
log.debug(cmd)
|
||||
retcode = subprocess.call(cmd)
|
||||
if retcode != 0:
|
||||
|
Loading…
Reference in New Issue
Block a user