mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 09:22:44 +00:00
Merge pull request #87499 from ejweber/fc-mount-options
FC mount options
This commit is contained in:
commit
c24fa741ae
@ -217,20 +217,22 @@ func volumeSpecToMounter(spec *volume.Spec, host volume.VolumeHost) (*fcDiskMoun
|
|||||||
}
|
}
|
||||||
klog.V(5).Infof("fc: volumeSpecToMounter volumeMode %s", volumeMode)
|
klog.V(5).Infof("fc: volumeSpecToMounter volumeMode %s", volumeMode)
|
||||||
return &fcDiskMounter{
|
return &fcDiskMounter{
|
||||||
fcDisk: fcDisk,
|
fcDisk: fcDisk,
|
||||||
fsType: fc.FSType,
|
fsType: fc.FSType,
|
||||||
volumeMode: volumeMode,
|
volumeMode: volumeMode,
|
||||||
readOnly: readOnly,
|
readOnly: readOnly,
|
||||||
mounter: volumeutil.NewSafeFormatAndMountFromHost(fcPluginName, host),
|
mounter: volumeutil.NewSafeFormatAndMountFromHost(fcPluginName, host),
|
||||||
deviceUtil: volumeutil.NewDeviceHandler(volumeutil.NewIOHandler()),
|
deviceUtil: volumeutil.NewDeviceHandler(volumeutil.NewIOHandler()),
|
||||||
|
mountOptions: volumeutil.MountOptionFromSpec(spec),
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
return &fcDiskMounter{
|
return &fcDiskMounter{
|
||||||
fcDisk: fcDisk,
|
fcDisk: fcDisk,
|
||||||
fsType: fc.FSType,
|
fsType: fc.FSType,
|
||||||
readOnly: readOnly,
|
readOnly: readOnly,
|
||||||
mounter: volumeutil.NewSafeFormatAndMountFromHost(fcPluginName, host),
|
mounter: volumeutil.NewSafeFormatAndMountFromHost(fcPluginName, host),
|
||||||
deviceUtil: volumeutil.NewDeviceHandler(volumeutil.NewIOHandler()),
|
deviceUtil: volumeutil.NewDeviceHandler(volumeutil.NewIOHandler()),
|
||||||
|
mountOptions: volumeutil.MountOptionFromSpec(spec),
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ func (plugin *fcPlugin) RequiresRemount() bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (plugin *fcPlugin) SupportsMountOption() bool {
|
func (plugin *fcPlugin) SupportsMountOption() bool {
|
||||||
return false
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
func (plugin *fcPlugin) SupportsBulkVolumeVerification() bool {
|
func (plugin *fcPlugin) SupportsBulkVolumeVerification() bool {
|
||||||
@ -148,7 +148,7 @@ func (plugin *fcPlugin) newMounterInternal(spec *volume.Spec, podUID types.UID,
|
|||||||
readOnly: readOnly,
|
readOnly: readOnly,
|
||||||
mounter: &mount.SafeFormatAndMount{Interface: mounter, Exec: exec},
|
mounter: &mount.SafeFormatAndMount{Interface: mounter, Exec: exec},
|
||||||
deviceUtil: util.NewDeviceHandler(util.NewIOHandler()),
|
deviceUtil: util.NewDeviceHandler(util.NewIOHandler()),
|
||||||
mountOptions: []string{},
|
mountOptions: util.MountOptionFromSpec(spec),
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
return &fcDiskMounter{
|
return &fcDiskMounter{
|
||||||
|
@ -268,7 +268,7 @@ func (util *fcUtil) AttachDisk(b fcDiskMounter) (string, error) {
|
|||||||
return devicePath, nil
|
return devicePath, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
err = b.mounter.FormatAndMount(devicePath, globalPDPath, b.fsType, nil)
|
err = b.mounter.FormatAndMount(devicePath, globalPDPath, b.fsType, b.mountOptions)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return devicePath, fmt.Errorf("fc: failed to mount fc volume %s [%s] to %s, error %v", devicePath, b.fsType, globalPDPath, err)
|
return devicePath, fmt.Errorf("fc: failed to mount fc volume %s [%s] to %s, error %v", devicePath, b.fsType, globalPDPath, err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user