2015-04-07 10:11:29 +00:00
|
|
|
:orphan:
|
|
|
|
|
2011-09-09 23:21:52 +00:00
|
|
|
========================================
|
2019-10-21 14:42:04 +00:00
|
|
|
mount.ceph -- mount a Ceph file system
|
2011-09-09 23:21:52 +00:00
|
|
|
========================================
|
|
|
|
|
|
|
|
.. program:: mount.ceph
|
|
|
|
|
|
|
|
Synopsis
|
|
|
|
========
|
|
|
|
|
2021-05-14 04:38:19 +00:00
|
|
|
| **mount.ceph** *name*@*fsid*.*fs_name*=/[*subdir*] *dir* [-o *options* ]
|
2011-09-09 23:21:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
Description
|
|
|
|
===========
|
|
|
|
|
2019-10-21 14:42:04 +00:00
|
|
|
**mount.ceph** is a helper for mounting the Ceph file system on a Linux host.
|
|
|
|
It serves to resolve monitor hostname(s) into IP addresses and read
|
|
|
|
authentication keys from disk; the Linux kernel client component does most of
|
2021-05-14 04:38:19 +00:00
|
|
|
the real work. To mount a Ceph file system use::
|
|
|
|
|
|
|
|
mount.ceph name@07fe3187-00d9-42a3-814b-72a4d5e7d5be.fs_name=/ /mnt/mycephfs -o mon_addr=1.2.3.4
|
|
|
|
|
|
|
|
Mount helper can fill in the cluster FSID by reading the ceph configuration file.
|
2021-12-08 11:43:27 +00:00
|
|
|
Its recommended to call the mount helper via mount(8) as per::
|
2021-05-14 04:38:19 +00:00
|
|
|
|
|
|
|
mount -t ceph name@.fs_name=/ /mnt/mycephfs -o mon_addr=1.2.3.4
|
|
|
|
|
|
|
|
Note that the dot ``.`` still needs to be a part of the device string in this case.
|
|
|
|
|
|
|
|
The first argument is the device part of the mount command. It includes the
|
|
|
|
RADOS user for authentication, the file system name and a path within CephFS
|
|
|
|
that will be mounted at the mount point.
|
|
|
|
|
|
|
|
Monitor addresses can be passed using ``mon_addr`` mount option. Multiple monitor
|
|
|
|
addresses can be passed by separating addresses with a slash (`/`). Only one
|
|
|
|
monitor is needed to mount successfully; the client will learn about all monitors
|
|
|
|
from any responsive monitor. However, it is a good idea to specify more than one
|
|
|
|
in case the one happens to be down at the time of mount. Monitor addresses takes
|
|
|
|
the form ip_address[:port]. If the port is not specified, the Ceph default of 6789
|
|
|
|
is assumed.
|
|
|
|
|
|
|
|
If monitor addresses are not specified, then **mount.ceph** will attempt to determine
|
|
|
|
monitor addresses using local configuration files and/or DNS SRV records. In similar
|
|
|
|
way, if authentication is enabled on Ceph cluster (which is done using CephX) and
|
|
|
|
options ``secret`` and ``secretfile`` are not specified in the command, the mount
|
|
|
|
helper will spawn a child process that will use the standard Ceph library routines
|
|
|
|
to find a keyring and fetch the secret from it (including the monitor address and
|
|
|
|
FSID if those not specified).
|
2019-10-21 14:42:04 +00:00
|
|
|
|
|
|
|
A sub-directory of the file system can be mounted by specifying the (absolute)
|
2021-05-14 04:38:19 +00:00
|
|
|
path to the sub-directory right after "=" in the device part of the mount command.
|
2019-10-21 14:42:04 +00:00
|
|
|
|
|
|
|
Mount helper application conventions dictate that the first two options are
|
|
|
|
device to be mounted and the mountpoint for that device. Options must be
|
2012-08-02 23:03:19 +00:00
|
|
|
passed only after these fixed arguments.
|
|
|
|
|
2011-09-09 23:21:52 +00:00
|
|
|
|
|
|
|
Options
|
|
|
|
=======
|
|
|
|
|
2019-10-21 14:42:04 +00:00
|
|
|
Basic
|
|
|
|
-----
|
2011-09-09 23:21:52 +00:00
|
|
|
|
2019-10-21 14:42:04 +00:00
|
|
|
:command:`conf`
|
|
|
|
Path to a ceph.conf file. This is used to initialize the Ceph context
|
|
|
|
for autodiscovery of monitor addresses and auth secrets. The default is
|
|
|
|
to use the standard search path for ceph.conf files.
|
2011-09-09 23:21:52 +00:00
|
|
|
|
|
|
|
:command:`mount_timeout`
|
2019-10-21 14:42:04 +00:00
|
|
|
int (seconds), Default: 60
|
2011-09-09 23:21:52 +00:00
|
|
|
|
2021-01-11 18:38:13 +00:00
|
|
|
:command:`ms_mode=<legacy|crc|secure|prefer-crc|prefer-secure>`
|
|
|
|
Set the connection mode that the client uses for transport. The available
|
|
|
|
modes are:
|
|
|
|
|
|
|
|
- ``legacy``: use messenger v1 protocol to talk to the cluster
|
|
|
|
|
|
|
|
- ``crc``: use messenger v2, without on-the-wire encryption
|
|
|
|
|
|
|
|
- ``secure``: use messenger v2, with on-the-wire encryption
|
|
|
|
|
|
|
|
- ``prefer-crc``: crc mode, if denied agree to secure mode
|
|
|
|
|
|
|
|
- ``prefer-secure``: secure mode, if denied agree to crc mode
|
|
|
|
|
2021-05-14 04:38:19 +00:00
|
|
|
:command:`mon_addr`
|
|
|
|
Monitor address of the cluster in the form of ip_address[:port]
|
|
|
|
|
|
|
|
:command:`fsid`
|
|
|
|
Cluster FSID. This can be found using `ceph fsid` command.
|
2011-09-09 23:21:52 +00:00
|
|
|
|
2019-10-21 14:42:04 +00:00
|
|
|
:command:`secret`
|
|
|
|
secret key for use with CephX. This option is insecure because it exposes
|
|
|
|
the secret on the command line. To avoid this, use the secretfile option.
|
2011-09-09 23:21:52 +00:00
|
|
|
|
2019-10-21 14:42:04 +00:00
|
|
|
:command:`secretfile`
|
|
|
|
path to file containing the secret key to use with CephX
|
2011-09-09 23:21:52 +00:00
|
|
|
|
2019-10-21 14:42:04 +00:00
|
|
|
:command:`recover_session=<no|clean>`
|
2020-06-15 15:27:03 +00:00
|
|
|
Set auto reconnect mode in the case where the client is blocklisted. The
|
2019-10-21 14:42:04 +00:00
|
|
|
available modes are ``no`` and ``clean``. The default is ``no``.
|
|
|
|
|
|
|
|
- ``no``: never attempt to reconnect when client detects that it has been
|
2021-03-10 04:23:35 +00:00
|
|
|
blocklisted. Blocklisted clients will not attempt to reconnect and
|
|
|
|
their operations will fail too.
|
2019-10-21 14:42:04 +00:00
|
|
|
|
|
|
|
- ``clean``: client reconnects to the Ceph cluster automatically when it
|
2020-06-15 15:27:03 +00:00
|
|
|
detects that it has been blocklisted. During reconnect, client drops
|
2019-10-21 14:42:04 +00:00
|
|
|
dirty data/metadata, invalidates page caches and writable file handles.
|
|
|
|
After reconnect, file locks become stale because the MDS loses track of
|
|
|
|
them. If an inode contains any stale file locks, read/write on the inode
|
|
|
|
is not allowed until applications release all stale file locks.
|
|
|
|
|
|
|
|
Advanced
|
|
|
|
--------
|
2011-09-09 23:21:52 +00:00
|
|
|
:command:`cap_release_safety`
|
2019-10-21 14:42:04 +00:00
|
|
|
int, Default: calculated
|
2011-09-09 23:21:52 +00:00
|
|
|
|
2019-10-21 14:42:04 +00:00
|
|
|
:command:`caps_wanted_delay_max`
|
|
|
|
int, cap release delay, Default: 60
|
2011-09-09 23:21:52 +00:00
|
|
|
|
2019-10-21 14:42:04 +00:00
|
|
|
:command:`caps_wanted_delay_min`
|
|
|
|
int, cap release delay, Default: 5
|
2011-09-09 23:21:52 +00:00
|
|
|
|
2019-10-21 14:42:04 +00:00
|
|
|
:command:`dirstat`
|
|
|
|
funky `cat dirname` for stats, Default: off
|
2011-09-09 23:21:52 +00:00
|
|
|
|
2019-10-21 14:42:04 +00:00
|
|
|
:command:`nodirstat`
|
|
|
|
no funky `cat dirname` for stats
|
2011-09-09 23:21:52 +00:00
|
|
|
|
2019-10-21 14:42:04 +00:00
|
|
|
:command:`ip`
|
|
|
|
my ip
|
2011-12-15 22:03:00 +00:00
|
|
|
|
2019-10-21 14:42:04 +00:00
|
|
|
:command:`noasyncreaddir`
|
|
|
|
no dcache readdir
|
2011-09-09 23:21:52 +00:00
|
|
|
|
2019-10-21 14:42:04 +00:00
|
|
|
:command:`nocrc`
|
|
|
|
no data crc on writes
|
2011-09-09 23:21:52 +00:00
|
|
|
|
|
|
|
:command:`noshare`
|
2019-10-21 14:42:04 +00:00
|
|
|
create a new client instance, instead of sharing an existing instance of
|
|
|
|
a client mounting the same cluster
|
2011-09-09 23:21:52 +00:00
|
|
|
|
2019-10-21 14:42:04 +00:00
|
|
|
:command:`osdkeepalive`
|
|
|
|
int, Default: 5
|
2011-09-09 23:21:52 +00:00
|
|
|
|
2019-10-21 14:42:04 +00:00
|
|
|
:command:`osd_idle_ttl`
|
|
|
|
int (seconds), Default: 60
|
2011-09-09 23:21:52 +00:00
|
|
|
|
2019-10-21 14:42:04 +00:00
|
|
|
:command:`rasize`
|
|
|
|
int (bytes), max readahead. Default: 8388608 (8192*1024)
|
2011-09-09 23:21:52 +00:00
|
|
|
|
2019-10-21 14:42:04 +00:00
|
|
|
:command:`rbytes`
|
|
|
|
Report the recursive size of the directory contents for st_size on
|
|
|
|
directories. Default: off
|
2011-09-09 23:21:52 +00:00
|
|
|
|
2019-10-21 14:42:04 +00:00
|
|
|
:command:`norbytes`
|
|
|
|
Do not report the recursive size of the directory contents for
|
|
|
|
st_size on directories.
|
2011-09-09 23:21:52 +00:00
|
|
|
|
2019-10-21 14:42:04 +00:00
|
|
|
:command:`readdir_max_bytes`
|
|
|
|
int, Default: 524288 (512*1024)
|
2019-08-13 11:32:00 +00:00
|
|
|
|
2019-10-21 14:42:04 +00:00
|
|
|
:command:`readdir_max_entries`
|
|
|
|
int, Default: 1024
|
2019-09-30 11:00:16 +00:00
|
|
|
|
2019-10-21 14:42:04 +00:00
|
|
|
:command:`rsize`
|
|
|
|
int (bytes), max read size. Default: 16777216 (16*1024*1024)
|
2019-09-30 11:00:16 +00:00
|
|
|
|
2019-10-21 14:42:04 +00:00
|
|
|
:command:`snapdirname`
|
|
|
|
string, set the name of the hidden snapdir. Default: .snap
|
2019-09-30 11:00:16 +00:00
|
|
|
|
2019-10-21 14:42:04 +00:00
|
|
|
:command:`write_congestion_kb`
|
|
|
|
int (kb), max writeback in flight. scale with available
|
|
|
|
memory. Default: calculated from available memory
|
2019-10-21 14:37:57 +00:00
|
|
|
|
2019-10-21 14:42:04 +00:00
|
|
|
:command:`wsize`
|
|
|
|
int (bytes), max write size. Default: 16777216 (16*1024*1024) (writeback
|
|
|
|
uses smaller of wsize and stripe unit)
|
2019-10-21 14:37:57 +00:00
|
|
|
|
2020-03-03 18:32:47 +00:00
|
|
|
:command:`wsync`
|
|
|
|
Execute all namespace operations synchronously. This ensures that the
|
|
|
|
namespace operation will only complete after receiving a reply from
|
|
|
|
the MDS. This is the default.
|
|
|
|
|
|
|
|
:command:`nowsync`
|
|
|
|
Allow the client to do namespace operations asynchronously. When this
|
|
|
|
option is enabled, a namespace operation may complete before the MDS
|
|
|
|
replies, if it has sufficient capabilities to do so.
|
2011-09-09 23:21:52 +00:00
|
|
|
|
|
|
|
Examples
|
|
|
|
========
|
|
|
|
|
|
|
|
Mount the full file system::
|
|
|
|
|
2021-05-14 04:38:19 +00:00
|
|
|
mount -t ceph fs_user@.mycephfs2=/ /mnt/mycephfs
|
2011-09-09 23:21:52 +00:00
|
|
|
|
2019-10-21 14:42:04 +00:00
|
|
|
Mount only part of the namespace/file system::
|
2011-09-09 23:21:52 +00:00
|
|
|
|
2021-05-14 04:38:19 +00:00
|
|
|
mount.ceph fs_user@.mycephfs2=/some/directory/in/cephfs /mnt/mycephfs
|
2019-08-13 11:32:00 +00:00
|
|
|
|
2019-10-21 14:42:04 +00:00
|
|
|
Pass the monitor host's IP address, optionally::
|
2011-09-09 23:21:52 +00:00
|
|
|
|
2021-05-14 04:38:19 +00:00
|
|
|
mount.ceph fs_user@.mycephfs2=/ /mnt/mycephfs -o mon_addr=192.168.0.1
|
2011-09-09 23:21:52 +00:00
|
|
|
|
2019-10-21 14:42:04 +00:00
|
|
|
Pass the port along with IP address if it's running on a non-standard port::
|
2011-09-09 23:21:52 +00:00
|
|
|
|
2021-05-14 04:38:19 +00:00
|
|
|
mount.ceph fs_user@.mycephfs2=/ /mnt/mycephfs -o mon_addr=192.168.0.1:7000
|
2019-10-21 14:42:04 +00:00
|
|
|
|
2021-05-14 04:38:19 +00:00
|
|
|
If there are multiple monitors, pass each address separated by a `/`::
|
2019-10-21 14:42:04 +00:00
|
|
|
|
2021-05-14 04:38:19 +00:00
|
|
|
mount.ceph fs_user@.mycephfs2=/ /mnt/mycephfs -o mon_addr=192.168.0.1/192.168.0.2/192.168.0.3
|
2019-10-21 14:42:04 +00:00
|
|
|
|
|
|
|
Pass secret key for CephX user optionally::
|
|
|
|
|
2021-05-14 04:38:19 +00:00
|
|
|
mount.ceph fs_user@.mycephfs2=/ /mnt/mycephfs -o secret=AQATSKdNGBnwLhAAnNDKnH65FmVKpXZJVasUeQ==
|
2019-10-21 14:42:04 +00:00
|
|
|
|
|
|
|
Pass file containing secret key to avoid leaving secret key in shell's command
|
|
|
|
history::
|
|
|
|
|
2021-05-14 04:38:19 +00:00
|
|
|
mount.ceph fs_user@.mycephfs2=/ /mnt/mycephfs -o secretfile=/etc/ceph/fs_username.secret
|
|
|
|
|
|
|
|
If authentication is disabled on Ceph cluster, omit the credential related option::
|
2019-10-21 14:37:57 +00:00
|
|
|
|
2021-05-14 04:38:19 +00:00
|
|
|
mount.ceph fs_user@.mycephfs2=/ /mnt/mycephfs
|
2011-09-09 23:21:52 +00:00
|
|
|
|
|
|
|
Availability
|
|
|
|
============
|
|
|
|
|
2020-03-03 18:32:47 +00:00
|
|
|
**mount.ceph** is part of Ceph, a massively scalable, open-source, distributed
|
2021-03-21 16:17:21 +00:00
|
|
|
storage system. Please refer to the Ceph documentation at https://docs.ceph.com
|
2020-03-03 18:32:47 +00:00
|
|
|
for more information.
|
|
|
|
|
|
|
|
Feature Availability
|
|
|
|
====================
|
2011-09-09 23:21:52 +00:00
|
|
|
|
2020-03-03 18:32:47 +00:00
|
|
|
The ``recover_session=`` option was added to mainline Linux kernels in v5.4.
|
|
|
|
``wsync`` and ``nowsync`` were added in v5.7.
|
2019-10-21 14:42:04 +00:00
|
|
|
|
2011-09-09 23:21:52 +00:00
|
|
|
See also
|
|
|
|
========
|
|
|
|
|
2011-09-21 23:28:43 +00:00
|
|
|
:doc:`ceph-fuse <ceph-fuse>`\(8),
|
2011-09-09 23:21:52 +00:00
|
|
|
:doc:`ceph <ceph>`\(8)
|