mirror of
https://github.com/OpenNebula/one.git
synced 2024-12-22 13:33:52 +03:00
Validate ext4 resize (#2789)
This commit is contained in:
parent
b42186605a
commit
0d043e4c1c
@ -163,8 +163,14 @@ class Mapper
|
||||
|
||||
Command.execute("#{COMMANDS[:xfs_growfs]} -d #{directory}", false)
|
||||
when /ext/
|
||||
Command.execute("#{COMMANDS[:e2fsck]} -f -y #{device}", false)
|
||||
Command.execute("#{COMMANDS[:resize2fs]} #{device}", false)
|
||||
rc, _o, e = Command.execute("#{COMMANDS[:e2fsck]} -f -y #{device}", false)
|
||||
|
||||
if rc.zero?
|
||||
Command.execute("#{COMMANDS[:resize2fs]} #{device}", false)
|
||||
else
|
||||
OpenNebula.log_error "#{__method__}: failed to resize #{device}\n#{e}"
|
||||
end
|
||||
|
||||
rc = mount_dev(device, directory)
|
||||
else
|
||||
OpenNebula.log_info "Skipped filesystem #{fs_type} resize"
|
||||
|
Loading…
Reference in New Issue
Block a user