<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
You cannot use debugfs to modify a mounted filesystem, no differently than you cannot replace the tire on your car while you are driving it on the highway...
<div class=""><br class="">
</div>
<div class="">If you want to inject corruption into the filesystem while it is mounted (without corrupting the whole filesystem), you could use "CFS_FAIL_CHECK()" to add fault injection points directly into the code, as is done by LFSCK to create specific corruptions
and then repair them (see lustre/tests/sanity-lfsck.sh).</div>
<div class=""><br class="">
</div>
<div class="">Cheers, Andreas<br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On Jan 31, 2024, at 18:41, Saisha Kamat via lustre-devel <<a href="mailto:lustre-devel@lists.lustre.org" class="">lustre-devel@lists.lustre.org</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">Hello Artem,<br class="">
<br class="">
I apologize for the delay in my response. I also want to thank you for<br class="">
the suggestion.<br class="">
However, our objective is to inject modifications while Lustre is<br class="">
mounted, specifically targeting xattr faults such as LMA, Linkea, and<br class="">
Lovea. Could you please advise on which debugfs utility I can use for<br class="">
this purpose?<br class="">
<br class="">
We would greatly appreciate your guidance and clarity on these matters.<br class="">
<br class="">
Thanks and Regards,<br class="">
Saisha<br class="">
<br class="">
On Fri, Jan 26, 2024 at 5:24 PM Blagodarenko Artem<br class="">
<<a href="mailto:artem.blagodarenko@gmail.com" class="">artem.blagodarenko@gmail.com</a>> wrote:<br class="">
<blockquote type="cite" class=""><br class="">
[Caution: Email from External Sender. Do not click or open links or attachments unless you know this sender.]<br class="">
<br class="">
<br class="">
Hi Saisha,<br class="">
<br class="">
<br class="">
<br class="">
Thanks for your interest in Lustre FS and research efforts.<br class="">
<br class="">
Regarding your question. Had MDS been mounted when there was the xattre direct modification attempt?<br class="">
<br class="">
If yes, then xattr data consistency is not guaranteed.<br class="">
<br class="">
If it is possible, unmount MDS, make modifications, and mount it back.<br class="">
<br class="">
<br class="">
<br class="">
If MDS backend is LDISKFS, after unmounting MDS, you can mount it as<br class="">
<br class="">
<br class="">
<br class="">
Mount -t ldiskfs <path_to_dev> <mount_point> and modify any file.<br class="">
<br class="">
There is also debugfs utility which allows perform many useful modifications without mounting.<br class="">
<br class="">
<br class="">
<br class="">
Best regards,<br class="">
<br class="">
Artem Blagodarenko<br class="">
<br class="">
<br class="">
<br class="">
Best rega<br class="">
<br class="">
From: lustre-devel <a href="mailto:lustre-devel-bounces@lists.lustre.org" class="">
lustre-devel-bounces@lists.lustre.org</a> on behalf of Saisha Kamat via lustre-devel
<a href="mailto:lustre-devel@lists.lustre.org" class="">lustre-devel@lists.lustre.org</a><br class="">
Date: Friday, 26 January 2024 at 19:58<br class="">
To: <a href="mailto:lustre-devel@lists.lustre.org" class="">lustre-devel@lists.lustre.org</a>
<a href="mailto:lustre-devel@lists.lustre.org" class="">lustre-devel@lists.lustre.org</a><br class="">
Subject: [lustre-devel] Direct Modification of Lustre Metadata on Disk<br class="">
<br class="">
Hello,<br class="">
<br class="">
I am a Ph.D. student at UNC-Charlotte, focusing on research related to<br class="">
the Lustre File System. As part of my project, I am investigating<br class="">
scenarios involving the direct modification of xattr metadata on the<br class="">
Lustre disk, without unmounting the Lustre servers.<br class="">
<br class="">
To achieve this, I have attempted to open the MDS (Metadata Server)<br class="">
disk partition as a file descriptor, locate the target file and its<br class="">
xattr, and write a faulty value. However, I have encountered an<br class="">
unexpected issue where my changes appear to be saved to memory and are<br class="">
not being synchronized with the disk.<br class="">
After completing the write operation, when I read the same xattr<br class="">
again, it reflects the corrupted value. Strangely, when using the<br class="">
"getfattr" command, the original, correct value is displayed. This<br class="">
discrepancy has raised doubts about whether Lustre permits direct<br class="">
modifications to its metadata on the disk.<br class="">
Furthermore, I observed that even after unmounting and remounting the<br class="">
Lustre file system, the xattr continues to display the corrupted value<br class="">
upon reading, whereas "getfattr" still returns the original, correct<br class="">
value.<br class="">
<br class="">
Please help me understand whether Lustre allows direct modifications<br class="">
to its metadata on the disk and if there are any inherent limitations<br class="">
or considerations that I should be aware of.<br class="">
Additionally, any recommendations or alternative approaches for<br class="">
simulating faulty conditions for testing purposes would be highly<br class="">
valuable to my research.<br class="">
<br class="">
Thanks and Regards,<br class="">
Saisha<br class="">
_______________________________________________<br class="">
lustre-devel mailing list<br class="">
<a href="mailto:lustre-devel@lists.lustre.org" class="">lustre-devel@lists.lustre.org</a><br class="">
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org<br class="">
<br class="">
<br class="">
</blockquote>
_______________________________________________<br class="">
lustre-devel mailing list<br class="">
<a href="mailto:lustre-devel@lists.lustre.org" class="">lustre-devel@lists.lustre.org</a><br class="">
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org<br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
<div class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div>Cheers, Andreas</div>
<div>--</div>
<div>Andreas Dilger</div>
<div>Lustre Principal Architect</div>
<div>Whamcloud</div>
<div><br class="">
</div>
<div><br class="">
</div>
<div><br class="">
</div>
</div>
</div>
</div>
</div>
</div>
<br class="Apple-interchange-newline">
</div>
<br class="Apple-interchange-newline">
<br class="Apple-interchange-newline">
</div>
<br class="">
</div>
</body>
</html>