mirror of
https://github.com/OpenNebula/one.git
synced 2025-01-18 06:03:39 +03:00
parent
fe8bf9a0a0
commit
66163f81f4
@ -323,20 +323,15 @@ class Disk
|
|||||||
sys_parts = Storage.lsblk('')
|
sys_parts = Storage.lsblk('')
|
||||||
device = ''
|
device = ''
|
||||||
|
|
||||||
real_path = @mountpoint
|
|
||||||
is_shared_ds = File.symlink?(@sysds_path)
|
|
||||||
|
|
||||||
real_path = File.realpath(real_path) if !@is_rootfs && is_shared_ds
|
|
||||||
|
|
||||||
sys_parts.each do |d|
|
sys_parts.each do |d|
|
||||||
if d['mountpoint'] == real_path
|
if d['mountpoint'] == @mountpoint
|
||||||
device = d['path']
|
device = d['path']
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
|
||||||
if d['children']
|
if d['children']
|
||||||
d['children'].each do |c|
|
d['children'].each do |c|
|
||||||
next unless c['mountpoint'] == real_path
|
next unless c['mountpoint'] == @mountpoint
|
||||||
|
|
||||||
device = d['path']
|
device = d['path']
|
||||||
break
|
break
|
||||||
@ -347,7 +342,7 @@ class Disk
|
|||||||
end
|
end
|
||||||
|
|
||||||
if device.empty?
|
if device.empty?
|
||||||
OpenNebula.log_error("Cannot detect block device from #{real_path}")
|
OpenNebula.log_error("Cannot detect block device from #{@mountpoint}")
|
||||||
end
|
end
|
||||||
|
|
||||||
device
|
device
|
||||||
|
Loading…
x
Reference in New Issue
Block a user