Skip to content

Commit

Permalink
B #3103 Fix ext4 handling code
Browse files Browse the repository at this point in the history
  • Loading branch information
dann1 committed Mar 25, 2019
1 parent da1ab9d commit 21b7632
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/vmm_mad/remotes/lib/lxd/mapper/mapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,6 @@ def mount_resize_fs(device, directory, fs_type, disk)

if o.empty?
OpenNebula.log_error("#{err}#{e}")
return false
else
cmd = "#{COMMANDS[:resize2fs]} #{device}"
rc, _o, e = Command.execute(cmd, false)
Expand Down Expand Up @@ -511,7 +510,11 @@ def reset_fs_uuid(fs_type, device)
when /xfs/
cmd = "#{COMMANDS[:xfs_admin]} -U generate #{device}"
when /ext/
Command.execute("#{COMMANDS[:e2fsck]} -f -y #{device}", false)
cmd = "#{COMMANDS[:e2fsck]} -f -y #{device}"
_rc, o, e = Command.execute(cmd, false)

OpenNebula.log e if o.empty?

cmd = "#{COMMANDS[:tune2fs]} -U random #{device}"
else
return true
Expand Down

0 comments on commit 21b7632

Please sign in to comment.