Removing character mapping

Learn how to remove the ceph.dir.charmap attribute from a directory in CephFS. If the attribute is not set, the directory has no character mapping. Character mapping is inherited only at the time of directory creation. Removing the mapping from a directory does not affect its parent or child directories.

Before you begin

Before you begin, make sure that you have the following prerequisites in place:
  • Directory must not be part of a snapshot. .
  • Directory must be empty before character mapping can be removed.
  • You must have appropriate authorization to modify extended attributes on the directory.

Procedure

  1. To remove the ceph.dir.charmap attribute and restore the default behavior, run the setfattr command.
      setfattr -x ceph.dir.charmap foo/
    For example,
    setfattr -x ceph.dir.charmap foo/ 
    getfattr -n ceph.dir.charmap foo/ 
    foo/: ceph.dir.charmap: No such attribute
    
  2. To confirm that the character mapping was removed, run the following command.
    getfattr -n ceph.dir.charmap <directory>/
    For example,
    foo/: ceph.dir.charmap: No such attribute