Skip to content

Commit

Permalink
fix cache non lvm disks (#7460)
Browse files Browse the repository at this point in the history
  • Loading branch information
wanyaoqi committed Aug 1, 2020
1 parent 88497da commit 381a279
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/hostman/diskutils/diskutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ func (d *SKVMGuestDisk) Connect() bool {
if pathType == LVM_PATH {
d.setupLVMS()
} else if pathType == PATH_TYPE_UNKNOWN {
if hasLVM, err := d.setupLVMS(); !hasLVM && err == nil {
hasLVM, err := d.setupLVMS()
// no lvm partition found and has partitions
if !hasLVM && err == nil && len(d.partitions) > 0 {
d.cacheNonLVMImagePath()
}
}
Expand Down

0 comments on commit 381a279

Please sign in to comment.