]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Add support for volume extension to Nexenta Systems volume driver
authorMikhail Khodos <hodosmb@gmail.com>
Mon, 5 Aug 2013 19:27:51 +0000 (12:27 -0700)
committerMikhail Khodos <hodosmb@gmail.com>
Mon, 5 Aug 2013 19:28:04 +0000 (12:28 -0700)
Change-Id: Ie082076292825aaac69b0c5f8aa7351ce6ab9cb9

cinder/volume/drivers/nexenta/volume.py

index fb1e94db0d448c9300fad245f0d5f737b181bed1..ad22a1c599a6383dafe19e46443f6a92be3c9515 100644 (file)
@@ -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.