<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div class="">You may find advise from Andreas on this list (also attached below). I did not try setting fail_loc myself.</div>
<div class=""><br class="">
</div>
<div class="">In 2.9 there is setting  <span style="color: rgb(112, 112, 112); font-family: monospace; font-size: 14px; background-color: rgb(255, 255, 255);" class="">osp.*.max_create_count=0</span><font color="#707070" face="Arial, sans-serif" class=""><span style="font-size: 14px; background-color: rgb(255, 255, 255);" class=""> </span></font>described
 at LUDOC-305.</div>
<div class=""><br class="">
</div>
<div class="">We used to set OST degraded as described in lustre manual. </div>
<div class="">It works most of the time but at some point I saw lustre errors in logs for some ops. Sorry, I do not recall details.</div>
<div class=""><br class="">
</div>
<div class="">I still not sure either of these approaches will work for you: setting OST degraded or fail_loc will makes some osts selected instead of others.</div>
<div class="">You may want to verify if these settings will trigger clean error on user side (instead of blocking) when all OSTs are degraded.</div>
<div class=""><br class="">
</div>
<div class="">The other and also simpler approach would be to enable lustre quota and set quota below used space for all users (or groups).</div>
<div class=""><br class="">
</div>
<div class="">Alex.</div>
<div class=""><br class="">
<blockquote type="cite" class="">
<div style="margin: 0px;" class=""><span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif;" class=""><b class="">From: </b></span><span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif;" class="">"Dilger,
 Andreas" <<a href="mailto:andreas.dilger@intel.com" class="">andreas.dilger@intel.com</a>><br class="">
</span></div>
<div style="margin: 0px;" class=""><span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif;" class=""><b class="">Subject: </b></span><span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif;" class=""><b class="">Re:
 [lustre-discuss] lustre 2.5.3 ost not draining</b><br class="">
</span></div>
<div style="margin: 0px;" class=""><span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif;" class=""><b class="">Date: </b></span><span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif;" class="">July
 28, 2015 at 11:51:38 PM CDT</span></div>
<div style="margin: 0px;" class=""><span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif;" class=""><b class="">Cc: </b></span><span style="font-family: -webkit-system-font, 'Helvetica Neue', Helvetica, sans-serif;" class="">"<a href="mailto:lustre-discuss@lists.lustre.org" class="">lustre-discuss@lists.lustre.org</a>"
 <<a href="mailto:lustre-discuss@lists.lustre.org" class="">lustre-discuss@lists.lustre.org</a>><br class="">
</span></div>
<br class="">
<div class=""><span class="" style="float: none; display: inline !important;">Setting it degraded means the MDS will avoid allocations on that OST</span><br class="">
<span class="" style="float: none; display: inline !important;">unless there aren't enough OSTs to meet the request (e.g. stripe_count =</span><br class="">
<span class="" style="float: none; display: inline !important;">-1), so it should work.</span><br class="">
<br class="">
<span class="" style="float: none; display: inline !important;">That is actually a very interesting workaround for this problem, and it</span><br class="">
<span class="" style="float: none; display: inline !important;">will work for older versions of Lustre as well.  It doesn't disable the</span><br class="">
<span class="" style="float: none; display: inline !important;">OST completely, which is fine if you are doing space balancing (and may</span><br class="">
<span class="" style="float: none; display: inline !important;">even be desirable to allow apps that need more bandwidth for a widely</span><br class="">
<span class="" style="float: none; display: inline !important;">striped file), but it isn't good if you are trying to empty the OST</span><br class="">
<span class="" style="float: none; display: inline !important;">completely to remove it.</span><br class="">
<br class="">
<span class="" style="float: none; display: inline !important;">It looks like another approach would be to mark the OST as having no free</span><br class="">
<span class="" style="float: none; display: inline !important;">space using OBD_FAIL_OST_ENOINO (0x229) fault injection on that OST:</span><br class="">
<br class="">
<span class="" style="float: none; display: inline !important;">  lctl set_param fail_loc=0x229 fail_val=<ost_index></span><br class="">
<br class="">
<span class="" style="float: none; display: inline !important;">This would cause the OST to return 0 free inodes from OST_STATFS for the</span><br class="">
<span class="" style="float: none; display: inline !important;">specified OST index, and the MDT would skip this OST completely.  To</span><br class="">
<span class="" style="float: none; display: inline !important;">disable all of the OSTs on an OSS use <ost_index> = -1.  It isn't possible</span><br class="">
<span class="" style="float: none; display: inline !important;">to selectively disable a subset of OSTs using this method.  The</span><br class="">
<span class="" style="float: none; display: inline !important;">OBD_FAIL_OST_ENOINO fail_loc has been available since Lustre 2.2, which</span><br class="">
<span class="" style="float: none; display: inline !important;">covers all of the 2.4+ versions that are affected by this issue.</span><br class="">
<br class="">
<span class="" style="float: none; display: inline !important;">If this mechanism works for you (it should, as this fail_loc is used</span><br class="">
<span class="" style="float: none; display: inline !important;">during regular testing) I'd be obliged if someone could file an LUDOC bug</span><br class="">
<span class="" style="float: none; display: inline !important;">so the manual can be updated.</span><br class="">
<br class="">
<span class="" style="float: none; display: inline !important;">Cheers, Andreas</span></div>
</blockquote>
<br class="">
</div>
<br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Jul 12, 2017, at 4:20 PM, Riccardo Veraldi <<a href="mailto:Riccardo.Veraldi@cnaf.infn.it" class="">Riccardo.Veraldi@cnaf.infn.it</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">Hello,<br class="">
<br class="">
on one of my lustre FS I need to find a solution so that users can still<br class="">
access data on the FS but cannot write new files on it.<br class="">
I have hundreds of clients accessing the FS so remounting it ro is not<br class="">
really easily feasible.<br class="">
Is there an option on the OSS side to allow OSTs to be accessed just to<br class="">
read data and not to store new data ?<br class="">
tunefs.lustre could do that ?<br class="">
thank you<br class="">
<br class="">
Rick<br class="">
<br class="">
_______________________________________________<br class="">
lustre-discuss mailing list<br class="">
<a href="mailto:lustre-discuss@lists.lustre.org" class="">lustre-discuss@lists.lustre.org</a><br class="">
http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org<br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
</body>
</html>