Re: [lustre-devel] Direct Modification of Lustre Metadata on Disk

Blagodarenko Artem via lustre-devel <[email protected]> Fri, 26 Jan 2024 22:24:45 +0000
Newsgroups org.lustre.lists.lustre-devel
Message-ID <LO2P265MB7274C2E5806D5C1E9655B5B4AB792@LO2P265MB7274.GBRP265.PROD.OUTLOOK.COM>
Hi Saisha,

Thanks for your interest in Lustre FS and research efforts.
Regarding your question. Had MDS been mounted when there was the xattre direct modification attempt?
If yes, then xattr data consistency is not guaranteed.
If it is possible, unmount MDS, make modifications, and mount it back.

If MDS backend is LDISKFS, after unmounting MDS, you can mount it as

Mount -t ldiskfs <path_to_dev> <mount_point> and modify any file.
There is also debugfs utility which allows perform many useful modifications without mounting.

Best regards,
Artem Blagodarenko

Best rega
From: lustre-devel [email protected]<mailto:[email protected]> on behalf of Saisha Kamat via lustre-devel [email protected]<mailto:[email protected]>
Date: Friday, 26 January 2024 at 19:58
To: [email protected]<mailto:[email protected]> [email protected]<mailto:[email protected]>
Subject: [lustre-devel] Direct Modification of Lustre Metadata on Disk
Hello,

I am a Ph.D. student at UNC-Charlotte, focusing on research related to
the Lustre File System. As part of my project, I am investigating
scenarios involving the direct modification of xattr metadata on the
Lustre disk, without unmounting the Lustre servers.

To achieve this, I have attempted to open the MDS (Metadata Server)
disk partition as a file descriptor, locate the target file and its
xattr, and write a faulty value. However, I have encountered an
unexpected issue where my changes appear to be saved to memory and are
not being synchronized with the disk.
After completing the write operation, when I read the same xattr
again, it reflects the corrupted value. Strangely, when using the
"getfattr" command, the original, correct value is displayed. This
discrepancy has raised doubts about whether Lustre permits direct
modifications to its metadata on the disk.
Furthermore, I observed that even after unmounting and remounting the
Lustre file system, the xattr continues to display the corrupted value
upon reading, whereas "getfattr" still returns the original, correct
value.

Please help me understand whether Lustre allows direct modifications
to its metadata on the disk and if there are any inherent limitations
or considerations that I should be aware of.
Additionally, any recommendations or alternative approaches for
simulating faulty conditions for testing purposes would be highly
valuable to my research.

Thanks and Regards,
Saisha
_______________________________________________
lustre-devel mailing list
[email protected]<mailto:[email protected]>
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org

_______________________________________________
lustre-devel mailing list
[email protected]
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org