Message ID | 20210628075545.702106-5-vshankar@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | ceph: new mount device syntax | expand |
On Mon, 2021-06-28 at 13:25 +0530, Venky Shankar wrote: > Signed-off-by: Venky Shankar <vshankar@redhat.com> > --- > Documentation/filesystems/ceph.rst | 23 ++++++++++++++++++++--- > 1 file changed, 20 insertions(+), 3 deletions(-) > > diff --git a/Documentation/filesystems/ceph.rst b/Documentation/filesystems/ceph.rst > index 7d2ef4e27273..e46f9091b851 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@fsid.fs_name=/[subdir] mnt -o mon_host=monip1[:port][/monip2[:port]] > The actual code lists the option as "mon_addr". > 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,33 @@ 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@07fe3187-00d9-42a3-814b-72a4d5e7d5be.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 and the cluster FSID can be left out > +(as the mount helper will fill it in by reading the ceph configuration > +file):: > > + # mount -t ceph cephuser@cephfs=/ /mnt/ceph -o mon_host=mon-addr > > +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. Note that, the cluster FSID (passed as part > +of the device string) is validated by checking it with the FSID reported by > +the monitor. > > Mount Options > ============= > > + mon_host=ip_address[:port][/ip_address[:port]] > + Monitor address to the cluster > + Might want to mention that "mon_addr" is just used to bootstrap the connection to the cluster, and that it'll follow the monmap after that point. > + 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
On Mon, Jun 28, 2021 at 8:57 PM Jeff Layton <jlayton@redhat.com> wrote: > > On Mon, 2021-06-28 at 13:25 +0530, Venky Shankar wrote: > > Signed-off-by: Venky Shankar <vshankar@redhat.com> > > --- > > Documentation/filesystems/ceph.rst | 23 ++++++++++++++++++++--- > > 1 file changed, 20 insertions(+), 3 deletions(-) > > > > diff --git a/Documentation/filesystems/ceph.rst b/Documentation/filesystems/ceph.rst > > index 7d2ef4e27273..e46f9091b851 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@fsid.fs_name=/[subdir] mnt -o mon_host=monip1[:port][/monip2[:port]] > > > > The actual code lists the option as "mon_addr". Good catch. The mount helper uses `mon_host`, however, the option passed to the kernel is `mon_addr`. > > > 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,33 @@ 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@07fe3187-00d9-42a3-814b-72a4d5e7d5be.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 and the cluster FSID can be left out > > +(as the mount helper will fill it in by reading the ceph configuration > > +file):: > > > > + # mount -t ceph cephuser@cephfs=/ /mnt/ceph -o mon_host=mon-addr > > > > +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. Note that, the cluster FSID (passed as part > > +of the device string) is validated by checking it with the FSID reported by > > +the monitor. > > > > Mount Options > > ============= > > > > + mon_host=ip_address[:port][/ip_address[:port]] > > + Monitor address to the cluster > > + > > Might want to mention that "mon_addr" is just used to bootstrap the > connection to the cluster, and that it'll follow the monmap after that > point. ACK > > > + 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 > > -- > Jeff Layton <jlayton@redhat.com> >
diff --git a/Documentation/filesystems/ceph.rst b/Documentation/filesystems/ceph.rst index 7d2ef4e27273..e46f9091b851 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@fsid.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,33 @@ 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@07fe3187-00d9-42a3-814b-72a4d5e7d5be.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 and the cluster FSID can be left out +(as the mount helper will fill it in by reading the ceph configuration +file):: + # mount -t ceph cephuser@cephfs=/ /mnt/ceph -o mon_host=mon-addr +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. Note that, the cluster FSID (passed as part +of the device string) is validated by checking it with the FSID reported by +the monitor. 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
Signed-off-by: Venky Shankar <vshankar@redhat.com> --- Documentation/filesystems/ceph.rst | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-)