Fix mounting partitions on NVMe devices
This commit is contained in:
@@ -41,8 +41,9 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
diskPartitionSuffix = ""
|
diskPartitionSuffix = ""
|
||||||
checkSleepDuration = time.Second
|
nvmeDiskPartitionSuffix = "p"
|
||||||
|
checkSleepDuration = time.Second
|
||||||
)
|
)
|
||||||
|
|
||||||
// AWSDiskUtil provides operations for EBS volume.
|
// AWSDiskUtil provides operations for EBS volume.
|
||||||
@@ -240,6 +241,9 @@ func getDiskByIDPaths(volumeID aws.KubernetesVolumeID, partition string, deviceP
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
klog.Warningf("error looking for nvme volume %q: %v", volumeID, err)
|
klog.Warningf("error looking for nvme volume %q: %v", volumeID, err)
|
||||||
} else if nvmePath != "" {
|
} else if nvmePath != "" {
|
||||||
|
if partition != "" {
|
||||||
|
nvmePath = nvmePath + nvmeDiskPartitionSuffix + partition
|
||||||
|
}
|
||||||
devicePaths = append(devicePaths, nvmePath)
|
devicePaths = append(devicePaths, nvmePath)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user