From: Xiubo Li Date: Mon, 24 Feb 2020 05:45:14 +0000 (-0500) Subject: client: add client_fs mount option support X-Git-Tag: v15.1.1~162^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1a58e6429939c22f598b055a184aa516fa213523;p=ceph.git client: add client_fs mount option support "client_fs" is one alias for "client_mds_namespace=" and it will be cleaner and be more user-friendly to use. "client_mds_namespace=" will be kept and backwards compatibility used. Update the documents at the same time. Fixes: https://tracker.ceph.com/issues/44212 Signed-off-by: Xiubo Li --- diff --git a/doc/cephfs/mount-using-fuse.rst b/doc/cephfs/mount-using-fuse.rst index 1b71193c7551..98b19211dcba 100644 --- a/doc/cephfs/mount-using-fuse.rst +++ b/doc/cephfs/mount-using-fuse.rst @@ -55,11 +55,11 @@ root of CephFS on your local FS:: ceph-fuse --id foo -r /path/to/dir /mnt/mycephfs If you have more than one FS on your Ceph cluster, use the option -``--client_mds_namespace`` to mount the non-default FS:: +``--client_fs`` to mount the non-default FS:: - ceph-fuse --id foo --client_mds_namespace mycephfs2 /mnt/mycephfs2 + ceph-fuse --id foo --client_fs mycephfs2 /mnt/mycephfs2 -You may also add a ``client_mds_namespace`` setting to your ``ceph.conf`` +You may also add a ``client_fs`` setting to your ``ceph.conf`` Unmounting CephFS ================= diff --git a/doc/start/quick-cephfs.rst b/doc/start/quick-cephfs.rst index b243edd6dbc9..d63df9b81d6a 100644 --- a/doc/start/quick-cephfs.rst +++ b/doc/start/quick-cephfs.rst @@ -184,9 +184,9 @@ To mount a particular directory within CephFS you can use ``-r``:: sudo ceph-fuse -r {path-to-be-mounted} /mnt/mycephfs If you have multiple file systems on your cluster you would need to pass -``--client_mds_namespace {fs-name}`` to the ``ceph-fuse`` command:: +``--client_fs {fs-name}`` to the ``ceph-fuse`` command:: - sudo ceph-fuse /mnt/mycephfs2 --client_mds_namespace mycephfs2 + sudo ceph-fuse /mnt/mycephfs2 --client_fs mycephfs2 Refer `ceph-fuse man page`_ and `Mount CephFS using FUSE`_ to read more about this. diff --git a/qa/tasks/cephfs/fuse_mount.py b/qa/tasks/cephfs/fuse_mount.py index 626a0682f4ad..29fa4319d65e 100644 --- a/qa/tasks/cephfs/fuse_mount.py +++ b/qa/tasks/cephfs/fuse_mount.py @@ -68,7 +68,7 @@ class FuseMount(CephFSMount): fuse_cmd += ["--client_mountpoint={0}".format(mount_path)] if mount_fs_name is not None: - fuse_cmd += ["--client_mds_namespace={0}".format(mount_fs_name)] + fuse_cmd += ["--client_fs={0}".format(mount_fs_name)] fuse_cmd += [ '--name', 'client.{id}'.format(id=self.client_id), diff --git a/qa/tasks/vstart_runner.py b/qa/tasks/vstart_runner.py index aba91cb76a45..660882a06e95 100644 --- a/qa/tasks/vstart_runner.py +++ b/qa/tasks/vstart_runner.py @@ -844,7 +844,7 @@ class LocalFuseMount(FuseMount): prefix += ["--client_mountpoint={0}".format(mount_path)] if mount_fs_name is not None: - prefix += ["--client_mds_namespace={0}".format(mount_fs_name)] + prefix += ["--client_fs={0}".format(mount_fs_name)] self.fuse_daemon = self.client_remote.run(args= prefix + [ diff --git a/src/client/Client.cc b/src/client/Client.cc index 737bfabe67f7..8099266435f5 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -5825,7 +5825,10 @@ int Client::subscribe_mdsmap(const std::string &fs_name) std::string resolved_fs_name; if (fs_name.empty()) { - resolved_fs_name = cct->_conf.get_val("client_mds_namespace"); + resolved_fs_name = cct->_conf.get_val("client_fs"); + if (resolved_fs_name.empty()) + // Try the backwards compatibility fs name option + resolved_fs_name = cct->_conf.get_val("client_mds_namespace"); } else { resolved_fs_name = fs_name; } diff --git a/src/common/options.cc b/src/common/options.cc index ce0853df50a4..74c308e5af53 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -8352,9 +8352,9 @@ std::vector