qvm-block extends volumes to NEW_SIZE

这个提交包含在:
Bahtiar `kalkin-` Gadimov 2016-09-02 19:55:54 +02:00
父节点 be48d48e56
当前提交 dcfc47fefe
找不到此签名对应的密钥
GPG 密钥 ID: 96ED3C3BA19C3DEE
共有 2 个文件被更改,包括 4 次插入4 次删除

查看文件

@ -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: