mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-01-31 00:59:30 +00:00
cephfs: upgrading mount syntax
The old syntax is almost deprecated,and there are reasons to upgrade it - old syntax is lack of fsid(critical for debugging and observability) - mds_namespace is deprecated, it might be inappropriate to continue using it - kernel will try new syntax first and then the old one, it's a waste Signed-off-by: mageekchiu <qiukang@mail.ustc.edu.cn>
This commit is contained in:
parent
0cfb2b012b
commit
21d1d640e2
@ -74,16 +74,13 @@ func (m *kernelMounter) mountKernel(
|
|||||||
|
|
||||||
args := []string{
|
args := []string{
|
||||||
"-t", "ceph",
|
"-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,
|
mountPoint,
|
||||||
}
|
}
|
||||||
|
|
||||||
optionsStr := fmt.Sprintf("name=%s,secretfile=%s", cr.ID, cr.KeyFile)
|
optionsStr := fmt.Sprintf("mon_addr=%s,secretfile=%s", strings.ReplaceAll(volOptions.Monitors, ",", "/"), cr.KeyFile)
|
||||||
mdsNamespace := ""
|
|
||||||
if volOptions.FsName != "" {
|
optionsStr = util.MountOptionsAdd(optionsStr, volOptions.KernelMountOptions, netDev)
|
||||||
mdsNamespace = "mds_namespace=" + volOptions.FsName
|
|
||||||
}
|
|
||||||
optionsStr = util.MountOptionsAdd(optionsStr, mdsNamespace, volOptions.KernelMountOptions, netDev)
|
|
||||||
|
|
||||||
args = append(args, "-o", optionsStr)
|
args = append(args, "-o", optionsStr)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user