mds: set file layout policy on directory hierarchy
It woud be helpful to have a way to specify multiple files' object sizes. Currently there is an ioctl for controlling individual file block sizes. However, there is nothing for setting object size between global scope (tweaking config.cc's g_default_file_layout) and individual file. It may make sense to specify this for an entire directory at a time, e.g. with an xattr.
Example use case: I am presently evaluating Hadoop with Ceph as a base file system. Sage noted the state of block size specifying to me, and suggested xattr may be the way to go.
#2 Updated by Sage Weil almost 9 years ago
Alex Nelson wrote:
One complication that may arise: If directory xattrs are what are used, what would be the semantics of a file hard-linked under directories with different object sizes specified?
The striping parameters (incl object size) are set on file creation, at which point there is only one link.
#3 Updated by Sage Weil almost 9 years ago
If we use an xattr for this, one issue will be keeping the ancestor directly policy consistent across any mds node managing a subtree nested beneath that point. We probably don't want to require that all parent xattrs be readable in order to create new files.
Make xattrs aggressively rereplicated across nodes after update? Or, just use xattrs as interface, but manage the "policy" separately and aggressively replicate that across nodes?
#9 Updated by Greg Farnum over 8 years ago
- Status changed from In Progress to Feedback
Wrote the ioctl and updated test_ioctls to test it, then debugged issues with it. Still don't have any kind of ceph-manager tool or whatever, but I think that should be a separate issue.
In ceph commit:65b69f065ae755256d3abbbfd5d633e36cd3439b and ceph-client commit:9c448f311320827831daca99876ad4a7b419f70b
(these are just the file_layouts branches)