Viewing file and directory layout fields

Use the getfattr command to view layout fields on a file or directory.

About this task

For more information, see the getfattr(1) manual page.

Procedure

View layout fields on a file or directory as a single string.
Note: A directory does not have an explicit layout until you set it. Therefore, attempting to view the layout without first setting it fails because there are no changes to display.
getfattr -n ceph.TYPE.layout PATH
Replace:
  • TYPE with file or dir.
  • PATH with the path to the file or directory.
For example:
[root@mon ~]# getfattr -n ceph.dir.layout /home/test
ceph.dir.layout="stripe_unit=4194304 stripe_count=2 object_size=4194304 pool=cephfs_data"