<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="">
On Oct 29, 2024, at 16:48, Defazio, Gian-Carlo <<a href="mailto:defazio1@llnl.gov" class="">defazio1@llnl.gov</a>> wrote:
<div>
<blockquote type="cite" class="">
<div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; 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;">
<div style="margin: 0in; font-size: 11pt; font-family: Aptos, sans-serif;" class="">
<o:p class=""> </o:p></div>
<div style="margin: 0in; font-size: 11pt; font-family: Aptos, sans-serif;" class="">
We’re doing another file system migration. We’d like users to have read-only access to the existing filesystem during and then for a while after the final sync.</div>
<div style="margin: 0in; font-size: 11pt; font-family: Aptos, sans-serif;" class="">
<o:p class=""> </o:p></div>
<div style="margin: 0in; font-size: 11pt; font-family: Aptos, sans-serif;" class="">
The 2 mechanisms we’re looking at are setting the MDTs read-only using “lctl set_param mdt.*.readonly=1” and remounting the filesystem on all the clients using “mount -o remount,ro”.</div>
<div style="margin: 0in; font-size: 11pt; font-family: Aptos, sans-serif;" class="">
<o:p class=""> </o:p></div>
<div style="margin: 0in; font-size: 11pt; font-family: Aptos, sans-serif;" class="">
My impression is that in the case of setting the MDTs read-only, files already opened in write mode will still be writable. For remounting, if files are opened in write mode the remount will fail and complain that the file system is busy. Our current plan is
to do the remounting of all clients because it’s easier to see if some user has some file open in write mode.</div>
<div style="margin: 0in; font-size: 11pt; font-family: Aptos, sans-serif;" class="">
<o:p class=""> </o:p></div>
<div style="margin: 0in; font-size: 11pt; font-family: Aptos, sans-serif;" class="">
Is there a way to make the file system read-only that’s minimally disruptive to users but doesn’t have the potential problem of having to chase down every process writing to the filesystem?</div>
</div>
</blockquote>
<br class="">
</div>
<div>In 2.15 the mdt.*.readonly=1 parameter is the only option. There is patch <a href="https://review.whamcloud.com/56304" class="">
https://review.whamcloud.com/56304</a> ("<a href="https://jira.whamcloud.com/browse/LU-12515" class="">LU-12515</a> ofd: allow setting a target to readonly") which missed the cutoff for 2.16.0 that can also set the OSTs read-only.</div>
<div><br class="">
</div>
<div>My suggestion would be to set the mdt.*.readonly=1 parameter sooner rather than later, then let the open write handles "peter out" over some days before or during an initial data migration pass (which will likely take some days itself). You can then likely
remount all/most of the clients read-only since the running jobs will have finished and/or deal with the few remaining clients processes that have open-for-write handles and then do a final resync pass to catch any changes afterward.</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="">
</body>
</html>