]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mount.ceph: add "fs=<fs_name>" mount options support
authorXiubo Li <xiubli@redhat.com>
Sun, 23 Feb 2020 03:25:44 +0000 (22:25 -0500)
committerXiubo Li <xiubli@redhat.com>
Wed, 26 Feb 2020 02:37:56 +0000 (21:37 -0500)
"fs" is one alias for "mds_namespace=" and it will be cleaner and
be more user-friendly to use. The "fs" will be translated to
"mds_namespace" before sending it to kernel space.

And the "mds_namespace" will be deprecated to use any more.
Update the documents at the same time.

Fixes: https://tracker.ceph.com/issues/44214
Signed-off-by: Xiubo Li <xiubli@redhat.com>
doc/cephfs/mount-using-kernel-driver.rst
doc/man/8/mount.ceph.rst
doc/start/quick-cephfs.rst
src/mount/mount.ceph.c

index 458c7c611b2f4457aa9d074b25dee8015baada15..5bd98dd51a7cb84532c6c36377f6298e1f111f74 100644 (file)
@@ -92,9 +92,9 @@ To mount a subtree of the CephFS root, append the path to the device string::
     mount -t ceph :/subvolume/dir1/dir2 /mnt/mycephfs -o name=fs
 
 If you have more than one file system on your Ceph cluster, you can mount the
-non-default FS on your local FS as follows::
+non-default FS as follows::
 
-    mount -t ceph :/ /mnt/mycephfs2 -o name=fs,mds_namespace=mycephfs2
+    mount -t ceph :/ /mnt/mycephfs2 -o name=fs,fs=mycephfs2
 
 Unmounting CephFS
 =================
index d27cd11123c513c2047e94223409407ac938fc07..8e065a5865765121d412d3936cc5d9446931e703 100644 (file)
@@ -61,10 +61,13 @@ Basic
     for autodiscovery of monitor addresses and auth secrets. The default is
     to use the standard search path for ceph.conf files.
 
-:command:`mds_namespace=<fs-name>`
+:command: `fs=<fs-name>`
     Specify the non-default file system to be mounted. Not passing this
     option mounts the default file system.
 
+:command: `mds_namespace=<fs-name>`
+    A synonym of "fs=" and its use is deprecated.
+
 :command:`mount_timeout`
     int (seconds), Default: 60
 
index b243edd6dbc9fd75455e34f06b39f0c53ae69694..247dcac5d3afd48a154329e0219fb0abbac3de35 100644 (file)
@@ -164,9 +164,9 @@ by the mount.ceph helper program::
     sudo mount -t ceph {ip-address-of-MON}:{port-number-of-MON}:{path-to-be-mounted} -o name={user-name},secret={secret-key} {mount-point}
 
 If you have multiple file systems on your cluster you would need to pass
-``mds_namespace={fs-name}`` option to ``-o`` option to the ``mount`` command::
+``fs={fs-name}`` option to ``-o`` option to the ``mount`` command::
 
-    sudo mount -t ceph :/ /mnt/kcephfs2 -o name=admin,mds_namespace=mycephfs2
+    sudo mount -t ceph :/ /mnt/kcephfs2 -o name=admin,fs=mycephfs2
 
 Refer `mount.ceph man page`_ and `Mount CephFS using Kernel Driver`_ to read
 more about this.
index 1bd6950f838bfe78eabbcca48b93e40211ba8a98..3e34c8459be14a7d154a0e3c7244afb011ddb15c 100644 (file)
@@ -268,6 +268,13 @@ static int parse_options(const char *data, struct ceph_mount_info *cmi)
                        /* ignore */
                } else if (strcmp(data, "nofail") == 0) {
                        /* ignore */
+               } else if (strcmp(data, "fs") == 0) {
+                       if (!value || !*value) {
+                               fprintf(stderr, "mount option fs requires a value.\n");
+                               return -EINVAL;
+                       }
+                       data = "mds_namespace";
+                       skip = false;
                } else if (strcmp(data, "secretfile") == 0) {
                        int ret;