From: Eric Harney Date: Mon, 21 Jan 2013 22:57:04 +0000 (-0500) Subject: Fix NFS volume creation X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=846061e526b95804c377718b084f144a79f16690;p=openstack-build%2Fcinder-build.git Fix NFS volume creation NfsDriver uses an undefined method _sizestr. This patch removes it. Change-Id: I7cd4d04f404a00c22021f3971eb9f9593c657896 --- diff --git a/cinder/volume/drivers/nfs.py b/cinder/volume/drivers/nfs.py index e47c5714f..e1da7963b 100644 --- a/cinder/volume/drivers/nfs.py +++ b/cinder/volume/drivers/nfs.py @@ -148,7 +148,7 @@ class NfsDriver(driver.VolumeDriver): def _create_sparsed_file(self, path, size): """Creates file with 0 disk usage""" - self._execute('truncate', '-s', self._sizestr(size), + self._execute('truncate', '-s', '%sG' % size, path, run_as_root=True) def _create_regular_file(self, path, size):