1MOUNT.CEPH(8) Ceph MOUNT.CEPH(8)
2
3
4
6 mount.ceph - mount a Ceph file system
7
9 mount.ceph name*@*fsid.*fs_name*=/[subdir] dir [-o options ]
10
11
13 mount.ceph is a helper for mounting the Ceph file system on a Linux
14 host. It serves to resolve monitor hostname(s) into IP addresses and
15 read authentication keys from disk; the Linux kernel client component
16 does most of the real work. To mount a Ceph file system use:
17
18 mount.ceph name@07fe3187-00d9-42a3-814b-72a4d5e7d5be.fs_name=/ /mnt/mycephfs -o mon_addr=1.2.3.4
19
20 where "name" is the RADOS client name (referred to hereafter as "RADOS
21 user", and meaning any individual or system actor such as an applica‐
22 tion).
23
24 Mount helper can fill in the cluster FSID by reading the ceph configu‐
25 ration file. Its recommended to call the mount helper via mount(8) as
26 per:
27
28 mount -t ceph name@.fs_name=/ /mnt/mycephfs -o mon_addr=1.2.3.4
29
30 Note that the dot . still needs to be a part of the device string in
31 this case.
32
33 The first argument is the device part of the mount command. It includes
34 the RADOS user for authentication, the file system name and a path
35 within CephFS that will be mounted at the mount point.
36
37 Monitor addresses can be passed using mon_addr mount option. Multiple
38 monitor addresses can be passed by separating addresses with a slash
39 (/). Only one monitor is needed to mount successfully; the client will
40 learn about all monitors from any responsive monitor. However, it is a
41 good idea to specify more than one in case the one happens to be down
42 at the time of mount. Monitor addresses takes the form ip_ad‐
43 dress[:port]. If the port is not specified, the Ceph default of 6789 is
44 assumed.
45
46 If monitor addresses are not specified, then mount.ceph will attempt to
47 determine monitor addresses using local configuration files and/or DNS
48 SRV records. In similar way, if authentication is enabled on Ceph clus‐
49 ter (which is done using CephX) and options secret and secretfile are
50 not specified in the command, the mount helper will spawn a child
51 process that will use the standard Ceph library routines to find a
52 keyring and fetch the secret from it (including the monitor address and
53 FSID if those not specified).
54
55 A sub-directory of the file system can be mounted by specifying the
56 (absolute) path to the sub-directory right after "=" in the device part
57 of the mount command.
58
59 Mount helper application conventions dictate that the first two options
60 are device to be mounted and the mountpoint for that device. Options
61 must be passed only after these fixed arguments.
62
64 Basic
65 conf Path to a ceph.conf file. This is used to initialize the Ceph
66 context for autodiscovery of monitor addresses and auth secrets.
67 The default is to use the standard search path for ceph.conf
68 files.
69
70 mount_timeout
71 int (seconds), Default: 60
72
73 ms_mode=<legacy|crc|secure|prefer-crc|prefer-secure>
74 Set the connection mode that the client uses for transport. The
75 available modes are:
76
77 • legacy: use messenger v1 protocol to talk to the cluster
78
79 • crc: use messenger v2, without on-the-wire encryption
80
81 • secure: use messenger v2, with on-the-wire encryption
82
83 • prefer-crc: crc mode, if denied agree to secure mode
84
85 • prefer-secure: secure mode, if denied agree to crc mode
86
87 mon_addr
88 Monitor address of the cluster in the form of ip_address[:port]
89
90 fsid Cluster FSID. This can be found using ceph fsid command.
91
92 secret secret key for use with CephX. This option is insecure because
93 it exposes the secret on the command line. To avoid this, use
94 the secretfile option.
95
96 secretfile
97 path to file containing the secret key to use with CephX
98
99 recover_session=<no|clean>
100 Set auto reconnect mode in the case where the client is block‐
101 listed. The available modes are no and clean. The default is no.
102
103 • no: never attempt to reconnect when client detects that it has
104 been blocklisted. Blocklisted clients will not attempt to re‐
105 connect and their operations will fail too.
106
107 • clean: client reconnects to the Ceph cluster automatically
108 when it detects that it has been blocklisted. During recon‐
109 nect, client drops dirty data/metadata, invalidates page
110 caches and writable file handles. After reconnect, file locks
111 become stale because the MDS loses track of them. If an inode
112 contains any stale file locks, read/write on the inode is not
113 allowed until applications release all stale file locks.
114
115 command
116 fs=<fs-name> Specify the non-default file system to be mounted,
117 when using the old syntax.
118
119 command
120 mds_namespace=<fs-name> A synonym of "fs=" (Deprecated).
121
122 Advanced
123 cap_release_safety
124 int, Default: calculated
125
126 caps_wanted_delay_max
127 int, cap release delay, Default: 60
128
129 caps_wanted_delay_min
130 int, cap release delay, Default: 5
131
132 dirstat
133 funky cat dirname for stats, Default: off
134
135 nodirstat
136 no funky cat dirname for stats
137
138 ip my ip
139
140 noasyncreaddir
141 no dcache readdir
142
143 nocrc no data crc on writes
144
145 noshare
146 create a new client instance, instead of sharing an existing in‐
147 stance of a client mounting the same cluster
148
149 osdkeepalive
150 int, Default: 5
151
152 osd_idle_ttl
153 int (seconds), Default: 60
154
155 rasize int (bytes), max readahead. Default: 8388608 (8192*1024)
156
157 rbytes Report the recursive size of the directory contents for st_size
158 on directories. Default: off
159
160 norbytes
161 Do not report the recursive size of the directory contents for
162 st_size on directories.
163
164 readdir_max_bytes
165 int, Default: 524288 (512*1024)
166
167 readdir_max_entries
168 int, Default: 1024
169
170 rsize int (bytes), max read size. Default: 16777216 (16*1024*1024)
171
172 snapdirname
173 string, set the name of the hidden snapdir. Default: .snap
174
175 write_congestion_kb
176 int (kb), max writeback in flight. scale with available memory.
177 Default: calculated from available memory
178
179 wsize int (bytes), max write size. Default: 16777216 (16*1024*1024)
180 (writeback uses smaller of wsize and stripe unit)
181
182 wsync Execute all namespace operations synchronously. This ensures
183 that the namespace operation will only complete after receiving
184 a reply from the MDS. This is the default.
185
186 nowsync
187 Allow the client to do namespace operations asynchronously. When
188 this option is enabled, a namespace operation may complete be‐
189 fore the MDS replies, if it has sufficient capabilities to do
190 so.
191
193 Mount the full file system:
194
195 mount -t ceph fs_user@.mycephfs2=/ /mnt/mycephfs
196
197 Mount only part of the namespace/file system:
198
199 mount.ceph fs_user@.mycephfs2=/some/directory/in/cephfs /mnt/mycephfs
200
201 Pass the monitor host's IP address, optionally:
202
203 mount.ceph fs_user@.mycephfs2=/ /mnt/mycephfs -o mon_addr=192.168.0.1
204
205 Pass the port along with IP address if it's running on a non-standard
206 port:
207
208 mount.ceph fs_user@.mycephfs2=/ /mnt/mycephfs -o mon_addr=192.168.0.1:7000
209
210 If there are multiple monitors, pass each address separated by a /:
211
212 mount.ceph fs_user@.mycephfs2=/ /mnt/mycephfs -o mon_addr=192.168.0.1/192.168.0.2/192.168.0.3
213
214 Pass secret key for CephX user optionally:
215
216 mount.ceph fs_user@.mycephfs2=/ /mnt/mycephfs -o secret=AQATSKdNGBnwLhAAnNDKnH65FmVKpXZJVasUeQ==
217
218 Pass file containing secret key to avoid leaving secret key in shell's
219 command history:
220
221 mount.ceph fs_user@.mycephfs2=/ /mnt/mycephfs -o secretfile=/etc/ceph/fs_username.secret
222
223 If authentication is disabled on Ceph cluster, omit the credential re‐
224 lated option:
225
226 mount.ceph fs_user@.mycephfs2=/ /mnt/mycephfs
227
228 To mount using the old syntax:
229
230 mount -t ceph 192.168.0.1:/ /mnt/mycephfs
231
233 mount.ceph is part of Ceph, a massively scalable, open-source, distrib‐
234 uted storage system. Please refer to the Ceph documentation at
235 https://docs.ceph.com for more information.
236
238 The recover_session= option was added to mainline Linux kernels in
239 v5.4. wsync and nowsync were added in v5.7.
240
242 ceph-fuse(8), ceph(8)
243
245 2010-2023, Inktank Storage, Inc. and contributors. Licensed under Cre‐
246 ative Commons Attribution Share Alike 3.0 (CC-BY-SA-3.0)
247
248
249
250
251dev Nov 02, 2023 MOUNT.CEPH(8)