Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / ceph / doc / cephfs / createfs.rst
1 ========================
2 Create a Ceph filesystem
3 ========================
4
5 .. tip::
6
7     The ``ceph fs new`` command was introduced in Ceph 0.84.  Prior to this release,
8     no manual steps are required to create a filesystem, and pools named ``data`` and
9     ``metadata`` exist by default.
10
11     The Ceph command line now includes commands for creating and removing filesystems,
12     but at present only one filesystem may exist at a time.
13
14 A Ceph filesystem requires at least two RADOS pools, one for data and one for metadata.
15 When configuring these pools, you might consider:
16
17 - Using a higher replication level for the metadata pool, as any data
18   loss in this pool can render the whole filesystem inaccessible.
19 - Using lower-latency storage such as SSDs for the metadata pool, as this
20   will directly affect the observed latency of filesystem operations
21   on clients.
22
23 Refer to :doc:`/rados/operations/pools` to learn more about managing pools.  For
24 example, to create two pools with default settings for use with a filesystem, you
25 might run the following commands:
26
27 .. code:: bash
28
29     $ ceph osd pool create cephfs_data <pg_num>
30     $ ceph osd pool create cephfs_metadata <pg_num>
31
32 Once the pools are created, you may enable the filesystem using the ``fs new`` command:
33
34 .. code:: bash
35
36     $ ceph fs new <fs_name> <metadata> <data>
37
38 For example:
39
40 .. code:: bash
41
42     $ ceph fs new cephfs cephfs_metadata cephfs_data
43     $ ceph fs ls
44     name: cephfs, metadata pool: cephfs_metadata, data pools: [cephfs_data ]
45
46 Once a filesystem has been created, your MDS(s) will be able to enter
47 an *active* state.  For example, in a single MDS system:
48
49 .. code:: bash
50
51     $ ceph mds stat
52     e5: 1/1/1 up {0=a=up:active}
53
54 Once the filesystem is created and the MDS is active, you are ready to mount
55 the filesystem.  If you have created more than one filesystem, you will
56 choose which to use when mounting.
57
58         - `Mount CephFS`_
59         - `Mount CephFS as FUSE`_
60
61 .. _Mount CephFS: ../../cephfs/kernel
62 .. _Mount CephFS as FUSE: ../../cephfs/fuse