Skip to content

Commit

Permalink
Merge pull request #6848 from H3C/wip-zcl-layout-rst
Browse files Browse the repository at this point in the history
doc:file must be empty when writing layout fields of file use "setfattr"

Reviewed-by: John Spray <john.spray@redhat.com>
  • Loading branch information
jcsp committed Dec 8, 2015
2 parents 84ee7c3 + 07c334a commit 534ff38
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions doc/cephfs/file-layouts.rst
Expand Up @@ -95,7 +95,22 @@ Layout fields are modified using ``setfattr``:
$ setfattr -n ceph.file.layout.pool -v 1 file2 # Setting pool by ID
$ setfattr -n ceph.file.layout.pool -v cephfs_data file2 # Setting pool by name
.. note::

When the layout fields of a file are modified using ``setfattr``, this file must be empty, otherwise an error will occur.

.. code-block:: bash
# touch an empty file
$ touch file1
# modify layout field successfully
$ setfattr -n ceph.file.layout.stripe_count -v 3 file1
# write something to file1
$ echo "hello world" > file1
$ setfattr -n ceph.file.layout.stripe_count -v 4 file1
setfattr: file1: Directory not empty
Inheritance of layouts
----------------------

Expand Down

0 comments on commit 534ff38

Please sign in to comment.