From 846061e526b95804c377718b084f144a79f16690 Mon Sep 17 00:00:00 2001 From: Eric Harney Date: Mon, 21 Jan 2013 17:57:04 -0500 Subject: [PATCH] Fix NFS volume creation NfsDriver uses an undefined method _sizestr. This patch removes it. Change-Id: I7cd4d04f404a00c22021f3971eb9f9593c657896 --- cinder/volume/drivers/nfs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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): -- 2.45.2