Details
-
Improvement
-
Resolution: Unresolved
-
Major
-
None
-
None
-
None
-
9223372036854775807
Description
For recovery purposes, it would be great to store the filename for all internal system files in xattrs on each inode. This would make OI Scrub able to recover these files easily if the root directory was corrupted and some/all files end up in lost+found. While OI Scrub can repair some of the layout already (e.g. move objects from lost+found back into an object directory O/SEQ/dN/OID), it would be much better to just move the "O/" or "SEQ" or "dN" directory as a whole back to the proper location instead of moving millions of objects separately.
Similarly, recovering CONFIGS, mountdata, and last_rcvd avoid the need for support personnel to get involved to recover this manually before the filesystem can even be mounted by Lustre.
Since the mount.lustre checks that the mountdata and last_rcvd files (in ldiskfs_is_lustre()) before even trying to mount the filesystem, this would need to be relaxed, and also allow mounting the filesystem if there are files in lost+found that have trusted.lov and trusted.lma xattrs on them (and whatever else we do to identify internal system files). Then, OI Scrub should try to identify critical files/directories in lost+found first, before trying to mount the filesystem. If the recovery of files from lost+found is unsuccessful, and the mountdata file cannot be recovered, the mount should fail with a error as it does today.