]>
Commit | Line | Data |
---|---|---|
91327a77 AA |
1 | ======================= |
2 | Mount CephFS using FUSE | |
3 | ======================= | |
7c673cae FG |
4 | |
5 | Before mounting a Ceph File System in User Space (FUSE), ensure that the client | |
6 | host has a copy of the Ceph configuration file and a keyring with CAPS for the | |
7 | Ceph metadata server. | |
8 | ||
9 | #. From your client host, copy the Ceph configuration file from the monitor host | |
10 | to the ``/etc/ceph`` directory. :: | |
11 | ||
12 | sudo mkdir -p /etc/ceph | |
13 | sudo scp {user}@{server-machine}:/etc/ceph/ceph.conf /etc/ceph/ceph.conf | |
14 | ||
15 | #. From your client host, copy the Ceph keyring from the monitor host to | |
16 | to the ``/etc/ceph`` directory. :: | |
17 | ||
18 | sudo scp {user}@{server-machine}:/etc/ceph/ceph.keyring /etc/ceph/ceph.keyring | |
19 | ||
20 | #. Ensure that the Ceph configuration file and the keyring have appropriate | |
21 | permissions set on your client machine (e.g., ``chmod 644``). | |
22 | ||
23 | For additional details on ``cephx`` configuration, see | |
24 | `CEPHX Config Reference`_. | |
25 | ||
26 | To mount the Ceph file system as a FUSE, you may use the ``ceph-fuse`` command. | |
27 | For example:: | |
28 | ||
f64942e4 | 29 | sudo mkdir /home/username/cephfs |
7c673cae FG |
30 | sudo ceph-fuse -m 192.168.0.1:6789 /home/username/cephfs |
31 | ||
32 | If you have more than one filesystem, specify which one to mount using | |
33 | the ``--client_mds_namespace`` command line argument, or add a | |
34 | ``client_mds_namespace`` setting to your ``ceph.conf``. | |
35 | ||
36 | See `ceph-fuse`_ for additional details. | |
37 | ||
38 | To automate mounting ceph-fuse, you may add an entry to the system fstab_. | |
39 | Additionally, ``ceph-fuse@.service`` and ``ceph-fuse.target`` systemd units are | |
40 | available. As usual, these unit files declare the default dependencies and | |
41 | recommended execution context for ``ceph-fuse``. An example ceph-fuse mount on | |
42 | ``/mnt`` would be:: | |
43 | ||
44 | sudo systemctl start ceph-fuse@/mnt.service | |
45 | ||
46 | A persistent mount point can be setup via:: | |
47 | ||
48 | sudo systemctl enable ceph-fuse@/mnt.service | |
49 | ||
50 | .. _ceph-fuse: ../../man/8/ceph-fuse/ | |
f64942e4 | 51 | .. _fstab: ../fstab/#fuse |
7c673cae | 52 | .. _CEPHX Config Reference: ../../rados/configuration/auth-config-ref |