Skip to contentSkip to conversation

doc: ceph: update userspace command to get CephFS metadata

PATCH In review Artem Ikonnikov 2 participants 2 messages May 18, 2024 – May 21, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 doc: ceph: update userspace command to get CephFS metadata

According to ceph documentation "getfattr -d /some/dir" no longer displays the list of all extended attributes. Both CephFS kernel and FUSE clients hide this information.

To retrieve the information you have to specify the particular attribute name e.g. "getfattr -n ceph.dir.rbytes /some/dir"

---
 Documentation/filesystems/ceph.rst | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
Documentation/filesystems/ceph.rst +9 -6
index 085f309ece60..6d2276a87a5a 100644
@@ -67,12 +67,15 @@ Snapshot names have two limitations:
   more than 255 characters, and `<node-id>` takes 13 characters, the long
   snapshot names can take as much as 255 - 1 - 1 - 13 = 240.
 
-Ceph also provides some recursive accounting on directories for nested
-files and bytes.  That is, a 'getfattr -d foo' on any directory in the
-system will reveal the total number of nested regular files and
-subdirectories, and a summation of all nested file sizes.  This makes
-the identification of large disk space consumers relatively quick, as
-no 'du' or similar recursive scan of the file system is required.
+Ceph also provides some recursive accounting on directories for nested files
+and bytes.  You can run the commands::
+
+ getfattr -n ceph.dir.rfiles /some/dir
+ getfattr -n ceph.dir.rbytes /some/dir
+
+to get the total number of nested files and their combined size, respectively.
+This makes the identification of large disk space consumers relatively quick,
+as no 'du' or similar recursive scan of the file system is required.
 
 Finally, Ceph also allows quotas to be set on any directory in the system.
 The quota can restrict the number of bytes or the number of files stored
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 29 lines · Artem Ikonnikov

According to ceph documentation "getfattr -d /some/dir" no longer displays the list of all extended attributes. Both CephFS kernel and FUSE clients hide this information.

To retrieve the information you have to specify the particular attribute name e.g. "getfattr -n ceph.dir.rbytes /some/dir"

---
  Documentation/filesystems/ceph.rst | 15 +++++++++------
  1 file changed, 9 insertions(+), 6 deletions(-)
Documentation/filesystems/ceph.rst +2 -6
index 085f309ece60..6d2276a87a5a 100644
@@ -67,12 +67,15 @@ Snapshot names have two limitations:
    more than 255 characters, and `<node-id>` takes 13 characters, the long
    snapshot names can take as much as 255 - 1 - 1 - 13 = 240.
 
-Ceph also provides some recursive accounting on directories for nested
-files and bytes.  That is, a 'getfattr -d foo' on any directory in the
-system will reveal the total number of nested regular files and
-subdirectories, and a summation of all nested file sizes.  This makes
-the identification of large disk space consumers relatively quick, as
-no 'du' or similar recursive scan of the file system is required.
+Ceph also provides some recursive accounting on directories for nested files
+and bytes.  You can run the commands::

Documentation/filesystems/ceph.rst Snapshot names have two limitations: · line 81

Quoted 10 lines
Documentation/filesystems/ceph.rst +7 -0
+
+ getfattr -n ceph.dir.rfiles /some/dir
+ getfattr -n ceph.dir.rbytes /some/dir
+
+to get the total number of nested files and their combined size, respectively.
+This makes the identification of large disk space consumers relatively quick,
+as no 'du' or similar recursive scan of the file system is required.
 
  Finally, Ceph also allows quotas to be set on any directory in the system.
  The quota can restrict the number of bytes or the number of files stored

LGTM.