From 955f0ebbd1f95e0b35b0ad982178ac8a847ab8d2 Mon Sep 17 00:00:00 2001 From: Mikhail Khodos Date: Mon, 5 Aug 2013 12:27:51 -0700 Subject: [PATCH] Add support for volume extension to Nexenta Systems volume driver Change-Id: Ie082076292825aaac69b0c5f8aa7351ce6ab9cb9 --- cinder/volume/drivers/nexenta/volume.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cinder/volume/drivers/nexenta/volume.py b/cinder/volume/drivers/nexenta/volume.py index fb1e94db0..ad22a1c59 100644 --- a/cinder/volume/drivers/nexenta/volume.py +++ b/cinder/volume/drivers/nexenta/volume.py @@ -128,6 +128,17 @@ class NexentaDriver(driver.ISCSIDriver): # pylint: disable=R0921 '%sG' % (volume['size'],), CONF.nexenta_blocksize, CONF.nexenta_sparse) + def extend_volume(self, volume, new_size): + """Extend an existing volume. + + :param volume: volume reference + :param new_size: volume new size in GB + """ + LOG.info(_('Extending volume: %(id)s New size: %(size)s GB'), + {'id': volume['id'], 'size': new_size}) + self.nms.zvol.set_child_prop(self._get_zvol_name(volume['name']), + 'volsize', '%sG' % new_size) + def delete_volume(self, volume): """Destroy a zvol on appliance. -- 2.45.2