]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
doc: add example of setting pool in cephfs layout 17372/head
authorJohn Spray <jspray@redhat.com>
Wed, 30 Aug 2017 13:05:09 +0000 (14:05 +0100)
committerJohn Spray <john.spray@redhat.com>
Thu, 7 Sep 2017 13:41:43 +0000 (15:41 +0200)
Signed-off-by: John Spray <john.spray@redhat.com>
doc/cephfs/file-layouts.rst

index 6281e594b140f72d60a95a5d49bc604691699d02..cf82b33abea021970c831b7e5c8de6e6054aaf1a 100644 (file)
@@ -201,15 +201,27 @@ directories do not have layouts set:
 
     
 Adding a data pool to the MDS
----------------------------------
+-----------------------------
 
 Before you can use a pool with CephFS you have to add it to the Metadata Servers.
 
 .. code-block:: bash
 
     $ ceph fs add_data_pool cephfs cephfs_data_ssd
-    # Pool should now show up
-    $ ceph fs ls
+    $ ceph fs ls  # Pool should now show up
     .... data pools: [cephfs_data cephfs_data_ssd ]
 
 Make sure that your cephx keys allows the client to access this new pool.
+
+You can then update the layout on a directory in CephFS to use the pool you added:
+
+.. code-block:: bash
+
+    $ mkdir /mnt/cephfs/myssddir
+    $ setfattr -n ceph.dir.layout.pool -v cephfs_data_ssd /mnt/cephfs/myssddir
+
+All new files created within that directory will now inherit its layout and place their data in your newly added pool. 
+
+You may notice that object counts in your primary data pool (the one passed to ``fs new``) continue to increase, even if files are being created in the pool you added.  This is normal: the file data is stored in the pool specified by the layout, but a small amount of metadata is kept in the primary data pool for all files.
+
+