Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
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.
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"
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: