[LU-11811] Provide an interface to set Lustre MDT into readonly mode Created: 18/Dec/18  Updated: 19/May/22  Resolved: 08/Aug/19

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.13.0
Fix Version/s: Lustre 2.13.0

Type: Improvement Priority: Critical
Reporter: Jinshan Xiong Assignee: Jinshan Xiong
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Cloners
is cloned by LU-12515 Provide an interface to set OST/clien... Open
Related
is related to LU-12995 sanity test_802: Mount client without... Open
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

There was an outage on our site where a script was deleting tons of valuable data from Lustre file systems. It takes some times to figure out the problematic script and kill it.

It seems like Lustre lacks of a functionality to set the whole file system into readonly mode, which is useful in this case because it can help stop bleeding immediately.



 Comments   
Comment by James A Simmons [ 18/Dec/18 ]

pdsh -w mgs_server lctl *.*.$FSNAME*-.active=0"

Comment by Gerrit Updater [ 18/Dec/18 ]

Jinshan Xiong (jinshan.xiong@gmail.com) uploaded a new patch: https://review.whamcloud.com/33892
Subject: LU-11811 mdt: Add a proc entry to set MDT to readonly
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: c87bdcfab1cdea0e1fe0b2d41f8ea513c65bfc0e

Comment by Andreas Dilger [ 19/Dec/18 ]

pdsh -w mgs_server "lctl *.*.$FSNAME*-.active=0"

I don't think this would make a difference? While it would make the OSTs inactive on the MGS (or maybe the MDS also, if they are the same machine), this would only stop the objects from being destroyed. It wouldn't stop the MDS from deleting the filenames from the filesystem, including the layout xattrs, and the pending-unlink OST objects would mostly be useless even if the data is still on the OSTs.

Comment by Gerrit Updater [ 11/Feb/19 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/33892/
Subject: LU-11811 mdt: Add a proc entry to set MDT to readonly
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 23bae7dc21b5c955c096431d485e49a7298ec404

Comment by Peter Jones [ 11/Feb/19 ]

Landed for 2.13

Comment by Andreas Dilger [ 05/Jul/19 ]

I don't think there was an update to the manual to document this new functionality.

Comment by Peter Jones [ 22/Jul/19 ]

Shouldn't that be tracked under an LUDOC ticket?

Comment by Andreas Dilger [ 22/Jul/19 ]

Peter, we can't track LUDOC tickets against the 2.13 release in Jira, AFAIK.

Comment by Peter Jones [ 22/Jul/19 ]

We easily can - https://jira.whamcloud.com/projects/LUDOC/versions/14590

Comment by Andreas Dilger [ 08/Aug/19 ]

Added LUDOC-455 to track the manual additions for this feature.

Generated at Sat Feb 10 02:47:08 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.