From patchwork Fri Jun 4 05:05:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venky Shankar X-Patchwork-Id: 12298691 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CF9EDC47083 for ; Fri, 4 Jun 2021 05:05:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B737361411 for ; Fri, 4 Jun 2021 05:05:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230016AbhFDFHV (ORCPT ); Fri, 4 Jun 2021 01:07:21 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:21912 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229826AbhFDFHV (ORCPT ); Fri, 4 Jun 2021 01:07:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622783135; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uBzG35ilP/bpTLtz/YegyzZWkOpHHA+iNvg+Mvv6+dk=; b=gFTcfgFfAqtIODd9aFnMOlG6oqefNzfvToDYqX+z2MwGEl5+joHIQUKTlDxTG6iicCeTb3 8Ng3A+BD/7rz/nHazF62LhEMjEIF25wI2B+12fQf1UrAnvA6xvoh8qWoM5NCapwPcR5Vaw O/NoLrFB98wdKKWs7Y9lpLXUfDvXbrQ= Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-259-wMqmLKt7N_2-0mcb99fp3w-1; Fri, 04 Jun 2021 01:05:34 -0400 X-MC-Unique: wMqmLKt7N_2-0mcb99fp3w-1 Received: by mail-pg1-f198.google.com with SMTP id 135-20020a63038d0000b0290220201658a7so5312678pgd.21 for ; Thu, 03 Jun 2021 22:05:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uBzG35ilP/bpTLtz/YegyzZWkOpHHA+iNvg+Mvv6+dk=; b=VOujyHOyCQ+++cUBtOKwahpCfXaC24hivnK13JRmDLvTNnu7/eyQv7EgaEVZlUAbgg A3gnjt3Td4xe7xaP8U07fql7TrfGgvksWwfig/4iQRbuYgRWpAJDDiTHV9AyxSaD5upE bU/zawnoZ2lymgj01b9W4e3sFkz4lmUl8bZ0RVOV9WkZnGXtUb07xu31kGI9QnlBBKFO 1FskeSpayT/b18tg12Y9dFkMrDy56Ep4RIshzV/PnONmsmpIIOok1/wsZ9B9KIS0wwv7 XjDGC7oTjXU93iDJJB2v+L2UkUo3a8qO/537WqRbR3jGaMC2ygmzz8wafTx9gx4MgXO1 Ru+Q== X-Gm-Message-State: AOAM532PV8Jcl95xc3A5aVD624fWpDLOtGysZ/ARyMtYq1M6ggncrL7C dbpGIU3Y2AwD51FIgg9xV+TuvpVmMVWqdON1xyt9r+40SpVC3MYjXtPa3tMiM3g/F3onWrkzx9n ujAzjgJ+TmbHG3ALnUImsIQ== X-Received: by 2002:a05:6a00:1685:b029:2da:df4b:b8b with SMTP id k5-20020a056a001685b02902dadf4b0b8bmr2706431pfc.16.1622783133127; Thu, 03 Jun 2021 22:05:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYYtohy3Q4o8jTXcyVb2KIRFblZntGJjeJlBAOBC8ExfqrQyVNOPUvKdMtiBMQb4UiSATosQ== X-Received: by 2002:a05:6a00:1685:b029:2da:df4b:b8b with SMTP id k5-20020a056a001685b02902dadf4b0b8bmr2706415pfc.16.1622783132884; Thu, 03 Jun 2021 22:05:32 -0700 (PDT) Received: from h3ckers-pride.redhat.com ([49.207.207.151]) by smtp.gmail.com with ESMTPSA id s20sm3634897pjn.23.2021.06.03.22.05.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Jun 2021 22:05:32 -0700 (PDT) From: Venky Shankar To: jlayton@kernel.org Cc: ceph-devel@vger.kernel.org, Venky Shankar Subject: [PATCH 1/3] ceph: new device mount syntax Date: Fri, 4 Jun 2021 10:35:10 +0530 Message-Id: <20210604050512.552649-2-vshankar@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210604050512.552649-1-vshankar@redhat.com> References: <20210604050512.552649-1-vshankar@redhat.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org Old mount device syntax (source) has the following problems: - mounts to the same cluster but with different fsnames and/or creds have identical device string which can confuse xfstests. - Userspace mount helper tool resolves monitor addresses and fill in mon addrs automatically, but that means the device shown in /proc/mounts is different than what was used for mounting. New device syntax is as follows: cephuser@mycephfs2=/path Note, there is no "monitor address" in the device string. That gets passed in as mount option. This keeps the device string same when monitor addresses change (on remounts). Also note that the userspace mount helper tool is backward compatible. I.e., the mount helper will fallback to using old syntax after trying to mount with the new syntax. Signed-off-by: Venky Shankar --- fs/ceph/super.c | 69 +++++++++++++++++++++++++++++++++---------------- fs/ceph/super.h | 1 + 2 files changed, 48 insertions(+), 22 deletions(-) diff --git a/fs/ceph/super.c b/fs/ceph/super.c index 9b1b7f4cfdd4..e273eabb0397 100644 --- a/fs/ceph/super.c +++ b/fs/ceph/super.c @@ -142,9 +142,9 @@ enum { Opt_congestion_kb, /* int args above */ Opt_snapdirname, - Opt_mds_namespace, Opt_recover_session, Opt_source, + Opt_mon_addr, /* string args above */ Opt_dirstat, Opt_rbytes, @@ -184,7 +184,6 @@ static const struct fs_parameter_spec ceph_mount_parameters[] = { fsparam_flag_no ("fsc", Opt_fscache), // fsc|nofsc fsparam_string ("fsc", Opt_fscache), // fsc=... fsparam_flag_no ("ino32", Opt_ino32), - fsparam_string ("mds_namespace", Opt_mds_namespace), fsparam_flag_no ("poolperm", Opt_poolperm), fsparam_flag_no ("quotadf", Opt_quotadf), fsparam_u32 ("rasize", Opt_rasize), @@ -196,6 +195,7 @@ static const struct fs_parameter_spec ceph_mount_parameters[] = { fsparam_u32 ("rsize", Opt_rsize), fsparam_string ("snapdirname", Opt_snapdirname), fsparam_string ("source", Opt_source), + fsparam_string ("mon_addr", Opt_mon_addr), fsparam_u32 ("wsize", Opt_wsize), fsparam_flag_no ("wsync", Opt_wsync), {} @@ -227,12 +227,12 @@ static void canonicalize_path(char *path) } /* - * Parse the source parameter. Distinguish the server list from the path. + * Parse the source parameter. Distinguish the device spec from the path. * * The source will look like: - * [,...]:[] + * =/ * where - * is [:] + * is name@fsname * is optional, but if present must begin with '/' */ static int ceph_parse_source(struct fs_parameter *param, struct fs_context *fc) @@ -240,12 +240,17 @@ static int ceph_parse_source(struct fs_parameter *param, struct fs_context *fc) struct ceph_parse_opts_ctx *pctx = fc->fs_private; struct ceph_mount_options *fsopt = pctx->opts; char *dev_name = param->string, *dev_name_end; - int ret; + char *fs_name_start; dout("%s '%s'\n", __func__, dev_name); if (!dev_name || !*dev_name) return invalfc(fc, "Empty source"); + fs_name_start = strchr(dev_name, '@'); + if (!fs_name_start) + return invalfc(fc, "Missing file system name"); + ++fs_name_start; /* start of file system name */ + dev_name_end = strchr(dev_name, '/'); if (dev_name_end) { /* @@ -262,24 +267,42 @@ static int ceph_parse_source(struct fs_parameter *param, struct fs_context *fc) dev_name_end = dev_name + strlen(dev_name); } - dev_name_end--; /* back up to ':' separator */ - if (dev_name_end < dev_name || *dev_name_end != ':') - return invalfc(fc, "No path or : separator in source"); + dev_name_end--; /* back up to '=' separator */ + if (dev_name_end < dev_name || *dev_name_end != '=') + return invalfc(fc, "No path or = separator in source"); dout("device name '%.*s'\n", (int)(dev_name_end - dev_name), dev_name); - if (fsopt->server_path) - dout("server path '%s'\n", fsopt->server_path); - ret = ceph_parse_mon_ips(param->string, dev_name_end - dev_name, - pctx->copts, fc->log.log); - if (ret) - return ret; + fsopt->mds_namespace = kstrndup(fs_name_start, + dev_name_end - fs_name_start, GFP_KERNEL); + dout("file system (mds namespace) '%s'\n", fsopt->mds_namespace); + if (fsopt->server_path) + dout("server path '%s'\n", fsopt->server_path); fc->source = param->string; param->string = NULL; return 0; } +static int ceph_parse_mon_addr(struct fs_parameter *param, + struct fs_context *fc) +{ + int r; + struct ceph_parse_opts_ctx *pctx = fc->fs_private; + struct ceph_mount_options *fsopt = pctx->opts; + + kfree(fsopt->mon_addr); + fsopt->mon_addr = kstrdup(param->string, GFP_KERNEL); + if (!fsopt->mon_addr) + return -ENOMEM; + + strreplace(param->string, '/', ','); + r = ceph_parse_mon_ips(param->string, strlen(param->string), + pctx->copts, fc->log.log); + param->string = NULL; + return r; +} + static int ceph_parse_mount_param(struct fs_context *fc, struct fs_parameter *param) { @@ -304,11 +327,6 @@ static int ceph_parse_mount_param(struct fs_context *fc, fsopt->snapdir_name = param->string; param->string = NULL; break; - case Opt_mds_namespace: - kfree(fsopt->mds_namespace); - fsopt->mds_namespace = param->string; - param->string = NULL; - break; case Opt_recover_session: mode = result.uint_32; if (mode == ceph_recover_session_no) @@ -322,6 +340,8 @@ static int ceph_parse_mount_param(struct fs_context *fc, if (fc->source) return invalfc(fc, "Multiple sources specified"); return ceph_parse_source(param, fc); + case Opt_mon_addr: + return ceph_parse_mon_addr(param, fc); case Opt_wsize: if (result.uint_32 < PAGE_SIZE || result.uint_32 > CEPH_MAX_WRITE_SIZE) @@ -473,6 +493,7 @@ static void destroy_mount_options(struct ceph_mount_options *args) kfree(args->mds_namespace); kfree(args->server_path); kfree(args->fscache_uniq); + kfree(args->mon_addr); kfree(args); } @@ -516,6 +537,10 @@ static int compare_mount_options(struct ceph_mount_options *new_fsopt, if (ret) return ret; + ret = strcmp_null(fsopt1->mon_addr, fsopt2->mon_addr); + if (ret) + return ret; + return ceph_compare_options(new_opt, fsc->client); } @@ -571,8 +596,8 @@ static int ceph_show_options(struct seq_file *m, struct dentry *root) if ((fsopt->flags & CEPH_MOUNT_OPT_NOCOPYFROM) == 0) seq_puts(m, ",copyfrom"); - if (fsopt->mds_namespace) - seq_show_option(m, "mds_namespace", fsopt->mds_namespace); + if (fsopt->mon_addr) + seq_printf(m, ",mon_addr=%s", fsopt->mon_addr); if (fsopt->flags & CEPH_MOUNT_OPT_CLEANRECOVER) seq_show_option(m, "recover_session", "clean"); diff --git a/fs/ceph/super.h b/fs/ceph/super.h index db80d89556b1..ead73dfb8804 100644 --- a/fs/ceph/super.h +++ b/fs/ceph/super.h @@ -97,6 +97,7 @@ struct ceph_mount_options { char *mds_namespace; /* default NULL */ char *server_path; /* default NULL (means "/") */ char *fscache_uniq; /* default NULL */ + char *mon_addr; }; struct ceph_fs_client { From patchwork Fri Jun 4 05:05:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venky Shankar X-Patchwork-Id: 12298693 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B144C4708F for ; Fri, 4 Jun 2021 05:05:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 73CC66140F for ; Fri, 4 Jun 2021 05:05:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230019AbhFDFHY (ORCPT ); Fri, 4 Jun 2021 01:07:24 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:39433 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229826AbhFDFHY (ORCPT ); Fri, 4 Jun 2021 01:07:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622783138; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DQOpmgYL0YZz/sjPt291XR/3p7tdkaX2wbNx75U0skI=; b=CXt7Yh1jHNfzK5ih8At1lX2mqQLUfe246/l1GWFsCyo/xY/4Udb/wHIMTFccnzzBI/Fghq koEcu12smjTSFWbCCnmbKZIY9XwN6+qga0NWqJxrsk4H6roo3ERcrAbmlQcXcVKl/jYR87 NY+GSbjseM+3b+fqWp7FtFz7Iasqrro= Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-413-erJcYFRtN3KxO2vaQ5kaSQ-1; Fri, 04 Jun 2021 01:05:36 -0400 X-MC-Unique: erJcYFRtN3KxO2vaQ5kaSQ-1 Received: by mail-pl1-f197.google.com with SMTP id b15-20020a1709027e0fb02900fef41cdedfso3666872plm.3 for ; Thu, 03 Jun 2021 22:05:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DQOpmgYL0YZz/sjPt291XR/3p7tdkaX2wbNx75U0skI=; b=K+TjyxPkavpWtsXWdUzNNthLv0T3+8ReMME9REpMafzQvMu7+uqIbBoc8FJF0V6m6Z v+dDSd/WsL0jB6zZnkTVwOe098eFin9Silm4wnGrzS5LTbIQpcvxL11cx4IDQqNkJruG IFC/3UKoN2BvhtWM1VaakMs7jy9jNWe2JDI2qmSwby5yo2hPM0njUJ36rX4oun04LNBQ 1+RpFpJNJI7pZqkgzL1tnu+/t/t0k4mEQYtkX17ZOeB3NCdjJQFC1EIT1/wV7Q98AHg8 Z/TW3Gm1ahfeQbRrRnijeq0tEgKM178w6DkBn5s1MTz1xFMaVAyQ0Fx6QPD8dVdXb/Dj DbVQ== X-Gm-Message-State: AOAM5318NUzrQFhI3XxDpoEX3z29t40EhFtw47208hLOAzy/QlV6sk6f c9cN4YQ0sBtSUw1nQKj7WJ/V+6Y/6OTUNJFYQ32UND7uxkJJ8BAmf+pnIEyYb8+EY7QZpZvElsP N8F0TGdiFcpXJtG6kJt4qxA== X-Received: by 2002:aa7:8e5a:0:b029:2e9:10d3:376f with SMTP id d26-20020aa78e5a0000b02902e910d3376fmr2851243pfr.19.1622783135872; Thu, 03 Jun 2021 22:05:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxqink9jKuw6nLNpajs/wpuIDw3rB62tIwzF8NvufjwIk2AmXmA2Bii8uBfvOuX6qHU+PePuw== X-Received: by 2002:aa7:8e5a:0:b029:2e9:10d3:376f with SMTP id d26-20020aa78e5a0000b02902e910d3376fmr2851234pfr.19.1622783135714; Thu, 03 Jun 2021 22:05:35 -0700 (PDT) Received: from h3ckers-pride.redhat.com ([49.207.207.151]) by smtp.gmail.com with ESMTPSA id s20sm3634897pjn.23.2021.06.03.22.05.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Jun 2021 22:05:35 -0700 (PDT) From: Venky Shankar To: jlayton@kernel.org Cc: ceph-devel@vger.kernel.org, Venky Shankar Subject: [PATCH 2/3] ceph: record updated mon_addr on remount Date: Fri, 4 Jun 2021 10:35:11 +0530 Message-Id: <20210604050512.552649-3-vshankar@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210604050512.552649-1-vshankar@redhat.com> References: <20210604050512.552649-1-vshankar@redhat.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org Note that the new monitors are just shown in /proc/mounts. Ceph does not (re)connect to new monitors yet. Signed-off-by: Venky Shankar --- fs/ceph/super.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fs/ceph/super.c b/fs/ceph/super.c index e273eabb0397..ccbd72e53998 100644 --- a/fs/ceph/super.c +++ b/fs/ceph/super.c @@ -1169,6 +1169,12 @@ static int ceph_reconfigure_fc(struct fs_context *fc) else ceph_clear_mount_opt(fsc, ASYNC_DIROPS); + if (strcmp(fsc->mount_options->mon_addr, fsopt->mon_addr)) { + kfree(fsc->mount_options->mon_addr); + fsc->mount_options->mon_addr = kstrdup(fsopt->mon_addr, + GFP_KERNEL); + } + sync_filesystem(fc->root->d_sb); return 0; } From patchwork Fri Jun 4 05:05:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venky Shankar X-Patchwork-Id: 12298695 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AD30DC47083 for ; Fri, 4 Jun 2021 05:05:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 959B561159 for ; Fri, 4 Jun 2021 05:05:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230025AbhFDFH1 (ORCPT ); Fri, 4 Jun 2021 01:07:27 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:27817 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229801AbhFDFH1 (ORCPT ); Fri, 4 Jun 2021 01:07:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622783141; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ACzH0AkzY9kFOE+5ls/yoXa3JG1amoUDFZvgvLzewBY=; b=VWEu0wgqNq6mT5a8nK8YnUVO0nGumHriXYfIFK/efWImXWxTiScdhNxJdo762FWAlFIbQs P6aHeq+BiPQmBIuJrbhvN7mncYiNXF5dOtw3B4YeEiuHe5pmpkMN/3yyb+RlWnrPXH7GcD VYhCGtN1ma1oBt8tsQc/2t/tDeKt81U= Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-203-DkyK_swPPbeocMu6GOmgxw-1; Fri, 04 Jun 2021 01:05:40 -0400 X-MC-Unique: DkyK_swPPbeocMu6GOmgxw-1 Received: by mail-pj1-f70.google.com with SMTP id f8-20020a17090a9b08b0290153366612f7so4536976pjp.1 for ; Thu, 03 Jun 2021 22:05:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ACzH0AkzY9kFOE+5ls/yoXa3JG1amoUDFZvgvLzewBY=; b=QYVPtYfXgL78lTvgdbmNGtFkj4Og3LiEnpFXIIaoBtmtOGVSJK9lgAtH4Hty7hr0rb m3F3qCoA447iJ/JFK+c/FcpGqvRK5Towv0d3ZR8WF0qJP7TNut1b7G+E2b5L2O19gq4g V4Tdvs3Hm9cOTkq9880hPJNa/udXiHHzyWEQauGmPxj4qnjw9buKKPIr0SOWFdlfLhmF xMWvmgUtLfYm7FX9jCrjBucmAAR2w8z/KOjSam1xNrd9CF3LL/Xoz6/WnJPKFdg4gdg1 kdutG2aT/QmKAAMW/R03sYXUMR1AzzgXReoT2+SjNF+wokGkvSW0H1CAZY/YEj6gCv5W Uopg== X-Gm-Message-State: AOAM531WD6SnrqS4gSkdgu1ceYtkjzG8n+Mf201Lhdp+KqX+Eq1Uo0us S+APKiE1Nj4mE0mTZA+tcDpswARt0okz1eBElA+5P511xQ0rhzd97v0Cxyuj0U/D5xmCxd8C+3f ShjI9dCfP+3csZAjZKE5sMA== X-Received: by 2002:a63:dd4b:: with SMTP id g11mr3024815pgj.300.1622783138711; Thu, 03 Jun 2021 22:05:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxyNXn0u7QmghOv5sgw8Jk3t/k+g0vNU8psflYZWzffBdS34t6hCROUIIOuya84N6xL3qXS0g== X-Received: by 2002:a63:dd4b:: with SMTP id g11mr3024798pgj.300.1622783138493; Thu, 03 Jun 2021 22:05:38 -0700 (PDT) Received: from h3ckers-pride.redhat.com ([49.207.207.151]) by smtp.gmail.com with ESMTPSA id s20sm3634897pjn.23.2021.06.03.22.05.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Jun 2021 22:05:38 -0700 (PDT) From: Venky Shankar To: jlayton@kernel.org Cc: ceph-devel@vger.kernel.org, Venky Shankar Subject: [PATCH 3/3] doc: document new CephFS mount device syntax Date: Fri, 4 Jun 2021 10:35:12 +0530 Message-Id: <20210604050512.552649-4-vshankar@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210604050512.552649-1-vshankar@redhat.com> References: <20210604050512.552649-1-vshankar@redhat.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org Signed-off-by: Venky Shankar --- Documentation/filesystems/ceph.rst | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/Documentation/filesystems/ceph.rst b/Documentation/filesystems/ceph.rst index 7d2ef4e27273..0e4ccefb7aea 100644 --- a/Documentation/filesystems/ceph.rst +++ b/Documentation/filesystems/ceph.rst @@ -82,7 +82,7 @@ Mount Syntax The basic mount syntax is:: - # mount -t ceph monip[:port][,monip2[:port]...]:/[subdir] mnt + # mount -t ceph user@fs_name=/[subdir] mnt -o mon_host=monip1[:port][/monip2[:port]] You only need to specify a single monitor, as the client will get the full list when it connects. (However, if the monitor you specify @@ -90,16 +90,26 @@ happens to be down, the mount won't succeed.) The port can be left off if the monitor is using the default. So if the monitor is at 1.2.3.4:: - # mount -t ceph 1.2.3.4:/ /mnt/ceph + # mount -t ceph cephuser@cephfs=/ /mnt/ceph -o mon_host=1.2.3.4 is sufficient. If /sbin/mount.ceph is installed, a hostname can be -used instead of an IP address. +used instead of an IP address. Multiple monitor addresses can be +passed by separating each address with a slash (`/`):: + # mount -t ceph cephuser@cephfs=/ /mnt/ceph -o mon_host=192.168.1.100/192.168.1.101 +When using the mount helper, monitor address can be read from ceph +configuration file if available. Mount Options ============= + mon_host=ip_address[:port][/ip_address[:port]] + Monitor address to the cluster + + fsid=cluster-id + FSID of the cluster + ip=A.B.C.D[:N] Specify the IP and/or port the client should bind to locally. There is normally not much reason to do this. If the IP is not