<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="">
As you have seen, it is *not* possible to enable metadata_csum on the MDT because this feature interacts poorly with another feature that Lustre needs (dirdata) on the MDT.  It _may_ be possible to enable metadata_csum on OSTs since it does not need the dirdata
 feature, though we haven't tested this.  There is an older ticket open in Jira <a class="issue-link" data-issue-key="LU-13650" href="https://jira.whamcloud.com/browse/LU-13650" id="key-val" rel="59488">LU-13650</a> that relates to enabling the metadata_csum
 feature, but I see that it is quite sparse on details of what is not working and what is needed to fix it.
<div class=""><br class="">
</div>
<div class="">If this is something that you would be interested to fix, then I think we could work together with the appropriate developers to understand the details and update the ldiskfs dirdata patch to work properly with metadata_csum, and you could make
 a lasting contribution to Lustre that will (eventually) also make its way into ext4.   Probably <a class="issue-link" data-issue-key="LU-13650" href="https://jira.whamcloud.com/browse/LU-13650" id="key-val" rel="59488">LU-13650</a> would be the right forum
 for this, rather than getting into the gritty details of the code on this list.  If you could create a Jira account and add yourself as a watcher on this ticket, please post the details (error messages, symptoms) into Jira.</div>
<div class=""><br class="">
</div>
<div class="">Thanks for your interest in Lustre.</div>
<div class=""><br class="">
</div>
<div class="">Cheers, Andreas<br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On Jun 25, 2024, at 05:38, Saisha Kamat <<a href="mailto:skamat1@charlotte.edu" class="">skamat1@charlotte.edu</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">Hello,<br class="">
<br class="">
Thank you for your previous response.<br class="">
<br class="">
I have a question regarding the integration of ext4 metadata checksumming with Lustre. Specifically, I am interested in enabling metadata check summing on a Lustre file system backed by ldiskfs.<br class="">
For context, I have a Lustre filesystem on /dev/sda, which is formatted as ldiskfs (MDS). I used the command
<b class=""><i class="">tune2fs -O metadata_csum /dev/sda </i></b>to enable metadata checksumming. However, after enabling this feature, I am unable to mount the Lustre filesystem (MDS node).
<div class="">Could you please advise if there is a way to enable metadata check summing on the underlying ext4 filesystem and successfully mount the Lustre MDS or OSS nodes on the same device? Are there specific steps or configurations required to achieve
 this?<br class="">
<br class="">
Thank you for your assistance and time. </div>
<div class=""><br class="">
Thanks and regards,</div>
<div class="">Saisha</div>
</div>
<br class="">
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Wed, Jun 12, 2024 at 6:27 PM Andreas Dilger <<a href="mailto:adilger@whamcloud.com" class="">adilger@whamcloud.com</a>> wrote:<br class="">
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div style="overflow-wrap: break-word;" class="">[<strong class=""><font color="red" class="">Caution</font></strong>: Email from External Sender. Do not click or open links or attachments unless you know this sender.]<br class="">
<span class=""> </span> On Jun 12, 2024, at 12:35, Saisha Kamat via lustre-devel <<a href="mailto:lustre-devel@lists.lustre.org" target="_blank" class="">lustre-devel@lists.lustre.org</a>> wrote:<br class="">
<div class="">
<blockquote type="cite" class=""><br class="">
<div class="">
<div dir="ltr" class="">Hello,<br class="">
<br class="">
I hope this email finds you well.<br class="">
<br class="">
My name is Saisha, and I am currently pursuing my Ph.D. at UNC-Charlotte, with a focus on research related to the Lustre File System. As part of my project, I am exploring the possibility of utilizing checksums to verify Lustre extended attributes.<br class="">
<br class="">
My understanding is that the ext4 file system supports checksums for extended attributes (xattrs). However, I am interested in whether this functionality extends to Lustre as well.<br class="">
</div>
</div>
</blockquote>
<div class=""><br class="">
</div>
Yes, the ext4 (and ZFS) xattr values have checksums.  No, the xattr checksums are neither managed or verified by Lustre, and only come into effect when they are passed on to the backing filesystem.  Conceivably, it would be possible to have a checksum (e.g.
 crc32c) for the xattr values in the MDS_GETXATTR and MDS_SETXATTR RPCs, if this is something you are interested to contribute.</div>
<div class=""><br class="">
</div>
<div class="">This could probably be done by overloading one of the 32-bit fields in the mdt_body for getxattr, and one in mdt_rec_reint for setxattr, but there is also "opportunistic" xattr prefetching done in the lookup RPC, so that would need to be covered
 as well.</div>
<div class=""><br class="">
</div>
<div class="">Also, the checksum would also need to be kept with the xattrs in cache and verified on access, otherwise they could become corrupted in memory after the RPC processing had completed.</div>
<div class=""><br class="">
</div>
<div class="">Finally, there is no interface to specify or verify the xattr checksum in the syscall interface, so there can be no guarantee that the data supplied in the setxattr is correct, or remains correct after supplied to getxattr, but the window there
 is very small.</div>
<div class=""><br class="">
</div>
<div class="">Cheers, Andreas</div>
<div class=""><br class="">
<blockquote type="cite" class="">
<div class="">
<div dir="ltr" class="">I would greatly appreciate it if you could provide some insights or direct me to relevant documentation on this matter. Any information or guidance you can offer would be invaluable to my research.<br class="">
<br class="">
Thank you very much for your time and assistance.
<div class=""><br class="">
</div>
<div class="">Thanks and Regards,</div>
<div class="">Saisha</div>
</div>
_______________________________________________<br class="">
lustre-devel mailing list<br class="">
<a href="mailto:lustre-devel@lists.lustre.org" target="_blank" class="">lustre-devel@lists.lustre.org</a><br class="">
<a href="http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org" target="_blank" class="">http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org</a><br class="">
</div>
</blockquote>
</div>
<br class="">
<div class="">
<div dir="auto" style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none;" class="">
<div dir="auto" style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none;" class="">
<div dir="auto" style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none;" class="">
<div dir="auto" style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none;" class="">
<div dir="auto" style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none;" class="">
<div dir="auto" style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none;" class="">
<div class="">Cheers, Andreas</div>
<div class="">--</div>
<div class="">Andreas Dilger</div>
<div class="">Lustre Principal Architect</div>
<div class="">Whamcloud</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
</div>
</div>
</div>
</div>
</div>
<br class="">
</div>
<br class="">
<br class="">
</div>
<br class="">
</div>
</blockquote>
</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>