diff --git a/lib/cmdlib.py b/lib/cmdlib.py index 175c1fc7702a347957c15d8bbcdcef7e33696c80..64d11762940bbb43e101e0a0b70b4f9d21e7d023 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -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. diff --git a/lib/constants.py b/lib/constants.py index 0691a2011d29a98389c95af4b47ccb360e30310a..4addd97aed00c75a9d6685d9ea9c711a71bb7952 100644 --- a/lib/constants.py +++ b/lib/constants.py @@ -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" diff --git a/lib/objects.py b/lib/objects.py index 91174a06d5a29f270c77ff1c8e25f64aa6f9a1d5..b2d86727ffb4fb3e3e46febb25cb3e6c0ddc3b88 100644 --- a/lib/objects.py +++ b/lib/objects.py @@ -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: