diff --git a/internal/cephfs/mounter/kernel.go b/internal/cephfs/mounter/kernel.go index 09bc707f5b8..192e880c0a8 100644 --- a/internal/cephfs/mounter/kernel.go +++ b/internal/cephfs/mounter/kernel.go @@ -74,16 +74,13 @@ func (m *kernelMounter) mountKernel( args := []string{ "-t", "ceph", - fmt.Sprintf("%s:%s", volOptions.Monitors, volOptions.RootPath), + fmt.Sprintf("%s@%s.%s=%s", cr.ID, volOptions.ClusterID, volOptions.FsName, volOptions.RootPath), mountPoint, } - optionsStr := fmt.Sprintf("name=%s,secretfile=%s", cr.ID, cr.KeyFile) - mdsNamespace := "" - if volOptions.FsName != "" { - mdsNamespace = "mds_namespace=" + volOptions.FsName - } - optionsStr = util.MountOptionsAdd(optionsStr, mdsNamespace, volOptions.KernelMountOptions, netDev) + optionsStr := fmt.Sprintf("mon_addr=%s,secretfile=%s", strings.ReplaceAll(volOptions.Monitors, ",", "/"), cr.KeyFile) + + optionsStr = util.MountOptionsAdd(optionsStr, volOptions.KernelMountOptions, netDev) args = append(args, "-o", optionsStr)