mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 10:51:29 +00:00
Fix mounting partitions on NVMe devices
This commit is contained in:
parent
375c9abfa2
commit
408d67dcc5
@ -41,8 +41,9 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
diskPartitionSuffix = ""
|
||||
checkSleepDuration = time.Second
|
||||
diskPartitionSuffix = ""
|
||||
nvmeDiskPartitionSuffix = "p"
|
||||
checkSleepDuration = time.Second
|
||||
)
|
||||
|
||||
// AWSDiskUtil provides operations for EBS volume.
|
||||
@ -240,6 +241,9 @@ func getDiskByIDPaths(volumeID aws.KubernetesVolumeID, partition string, deviceP
|
||||
if err != nil {
|
||||
klog.Warningf("error looking for nvme volume %q: %v", volumeID, err)
|
||||
} else if nvmePath != "" {
|
||||
if partition != "" {
|
||||
nvmePath = nvmePath + nvmeDiskPartitionSuffix + partition
|
||||
}
|
||||
devicePaths = append(devicePaths, nvmePath)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user