Lustre-devel archive mirror
 help / color / mirror / Atom feed
From: Andreas Dilger via lustre-devel <lustre-devel@lists.lustre.org>
To: Saisha Kamat <skamat1@charlotte.edu>
Cc: "lustre-devel@lists.lustre.org" <lustre-devel@lists.lustre.org>
Subject: Re: [lustre-devel] [EXTERNAL] Re: Direct Modification of Lustre Metadata on Disk
Date: Thu, 1 Feb 2024 20:59:22 +0000	[thread overview]
Message-ID: <1825EEAC-C476-44ED-8C88-C52A713E2273@ddn.com> (raw)
In-Reply-To: <CACyzrcQEW_R2byC5AzvF7GwbD1z9o25MgnY2DS8yRd8ePrUz6g@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 4418 bytes --]

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...

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).

Cheers, Andreas

On Jan 31, 2024, at 18:41, Saisha Kamat via lustre-devel <lustre-devel@lists.lustre.org<mailto:lustre-devel@lists.lustre.org>> wrote:

Hello Artem,

I apologize for the delay in my response. I also want to thank you for
the suggestion.
However, our objective is to inject modifications while Lustre is
mounted, specifically targeting xattr faults such as LMA, Linkea, and
Lovea. Could you please advise on which debugfs utility I can use for
this purpose?

We would greatly appreciate your guidance and clarity on these matters.

Thanks and Regards,
Saisha

On Fri, Jan 26, 2024 at 5:24 PM Blagodarenko Artem
<artem.blagodarenko@gmail.com<mailto:artem.blagodarenko@gmail.com>> wrote:

[Caution: Email from External Sender. Do not click or open links or attachments unless you know this sender.]


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 lustre-devel-bounces@lists.lustre.org<mailto:lustre-devel-bounces@lists.lustre.org> on behalf of Saisha Kamat via lustre-devel lustre-devel@lists.lustre.org<mailto:lustre-devel@lists.lustre.org>
Date: Friday, 26 January 2024 at 19:58
To: lustre-devel@lists.lustre.org<mailto:lustre-devel@lists.lustre.org> lustre-devel@lists.lustre.org<mailto:lustre-devel@lists.lustre.org>
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
lustre-devel@lists.lustre.org<mailto:lustre-devel@lists.lustre.org>
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org


_______________________________________________
lustre-devel mailing list
lustre-devel@lists.lustre.org<mailto:lustre-devel@lists.lustre.org>
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org

Cheers, Andreas
--
Andreas Dilger
Lustre Principal Architect
Whamcloud








[-- Attachment #1.2: Type: text/html, Size: 8894 bytes --]

[-- Attachment #2: Type: text/plain, Size: 165 bytes --]

_______________________________________________
lustre-devel mailing list
lustre-devel@lists.lustre.org
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org

  reply	other threads:[~2024-02-01 21:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-26 19:57 [lustre-devel] Direct Modification of Lustre Metadata on Disk Saisha Kamat via lustre-devel
2024-01-26 22:24 ` Blagodarenko Artem via lustre-devel
2024-02-01  1:41   ` [lustre-devel] [EXTERNAL] " Saisha Kamat via lustre-devel
2024-02-01 20:59     ` Andreas Dilger via lustre-devel [this message]
2024-02-04 17:34       ` Saisha Kamat via lustre-devel
2024-01-28  5:13 ` [lustre-devel] " Andreas Dilger via lustre-devel
2024-02-01  1:26   ` [lustre-devel] [EXTERNAL] " Saisha Kamat via lustre-devel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1825EEAC-C476-44ED-8C88-C52A713E2273@ddn.com \
    --to=lustre-devel@lists.lustre.org \
    --cc=adilger@whamcloud.com \
    --cc=skamat1@charlotte.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).