Commit 2c42c5df authored by Guido Trotter's avatar Guido Trotter
Browse files

Allow file storage to be grown


Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 91e2d9ec
......@@ -7706,7 +7706,10 @@ class LUGrowDisk(LogicalUnit):
self.disk = instance.FindDisk(self.op.disk)
_CheckNodesFreeDisk(self, nodenames, self.op.amount)
if instance.disk_template != constants.DT_FILE:
# TODO: check the free disk space for file, when that feature will be
# supported
_CheckNodesFreeDisk(self, nodenames, self.op.amount)
def Exec(self, feedback_fn):
"""Execute disk grow.
......
......@@ -266,7 +266,7 @@ DTS_NET_MIRROR = frozenset([DT_DRBD8])
DTS_NOT_LVM = frozenset([DT_DISKLESS, DT_FILE])
# the set of disk templates which can be grown
DTS_GROWABLE = frozenset([DT_PLAIN, DT_DRBD8])
DTS_GROWABLE = frozenset([DT_PLAIN, DT_DRBD8, DT_FILE])
# logical disk types
LD_LV = "lvm"
......
......@@ -497,7 +497,7 @@ class Disk(ConfigObject):
actual algorithms from bdev.
"""
if self.dev_type == constants.LD_LV:
if self.dev_type == constants.LD_LV or self.dev_type == constants.LD_FILE:
self.size += amount
elif self.dev_type == constants.LD_DRBD8:
if self.children:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment