summaryrefslogtreecommitdiffstats
path: root/src/ceph/doc/cephfs/createfs.rst
blob: 005ede86e52981fbaadaab5405b0bdaf5763cdd2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
========================
Create a Ceph filesystem
========================

.. tip::

    The ``ceph fs new`` command was introduced in Ceph 0.84.  Prior to this release,
    no manual steps are required to create a filesystem, and pools named ``data`` and
    ``metadata`` exist by default.

    The Ceph command line now includes commands for creating and removing filesystems,
    but at present only one filesystem may exist at a time.

A Ceph filesystem requires at least two RADOS pools, one for data and one for metadata.
When configuring these pools, you might consider:

- Using a higher replication level for the metadata pool, as any data
  loss in this pool can render the whole filesystem inaccessible.
- Using lower-latency storage such as SSDs for the metadata pool, as this
  will directly affect the observed latency of filesystem operations
  on clients.

Refer to :doc:`/rados/operations/pools` to learn more about managing pools.  For
example, to create two pools with default settings for use with a filesystem, you
might run the following commands:

.. code:: bash

    $ ceph osd pool create cephfs_data <pg_num>
    $ ceph osd pool create cephfs_metadata <pg_num>

Once the pools are created, you may enable the filesystem using the ``fs new`` command:

.. code:: bash

    $ ceph fs new <fs_name> <metadata> <data>

For example:

.. code:: bash

    $ ceph fs new cephfs cephfs_metadata cephfs_data
    $ ceph fs ls
    name: cephfs, metadata pool: cephfs_metadata, data pools: [cephfs_data ]

Once a filesystem has been created, your MDS(s) will be able to enter
an *active* state.  For example, in a single MDS system:

.. code:: bash

    $ ceph mds stat
    e5: 1/1/1 up {0=a=up:active}

Once the filesystem is created and the MDS is active, you are ready to mount
the filesystem.  If you have created more than one filesystem, you will
choose which to use when mounting.

	- `Mount CephFS`_
	- `Mount CephFS as FUSE`_

.. _Mount CephFS: ../../cephfs/kernel
.. _Mount CephFS as FUSE: ../../cephfs/fuse