File and directory layouts
You can control how file or directory data is mapped to objects.
- A running, and healthy IBM Storage Ceph cluster.
- Deployment of a Ceph File System.
- Root-level access to the node.
- The
attrpackage installed.
A layout of a file or directory controls how its content is mapped to Ceph RADOS objects. The directory layouts serve primarily for setting an inherited layout for new files in that directory.
To view and set a file or directory layout, use virtual extended attributes or extended file
attributes (xattrs). The name of the layout attributes depends on whether a file is
a regular file or a directory:
- Regular files layout attributes are called
ceph.file.layout. - Directories layout attributes are called
ceph.dir.layout.
- Deploying the CephFS
- The
getfattr(1)manual page. - The
setfattr(1)manual page.
Layouts inheritance
Files inherit the layout of their parent directory when you create them. However, subsequent changes to the parent directory layout do not affect children. If a directory does not have any layouts set, files inherit the layout from the closest directory to the layout in the directory structure.