<div dir="ltr">Did you unmount the OST ? remember to lfs_migrate the data otherwise old data would give errors</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Mar 5, 2021 at 11:59 AM Etienne Aujames via lustre-discuss &lt;<a href="mailto:lustre-discuss@lists.lustre.org">lustre-discuss@lists.lustre.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello,<br>
<br>
There is some process/work in progress on the LU-7668 to remove the OST<br>
directly on the MGS configuration.<br>
<br>
In the comment section Andreas describes a way to remove an OST with<br>
llog_print and llog_cancel (see <a href="https://review.whamcloud.com/41449" rel="noreferrer" target="_blank">https://review.whamcloud.com/41449</a>).<br>
<br>
Stephane Thiell have submitted a patch (<br>
<a href="https://review.whamcloud.com/41449/" rel="noreferrer" target="_blank">https://review.whamcloud.com/41449/</a>) to implement this process directly<br>
inside a lctl command &quot;del_ost&quot;.<br>
<br>
This process could be applied live, the changes will take effect only<br>
after whole system remount (when MGS configuration is read by<br>
clients/MDT).<br>
<br>
This process does not replace the migrate/locking parts.<br>
<br>
We tested this process in production, but maybe for now this is bit<br>
risky. So I recommend to backup the MGS configuration.<br>
<br>
Best regards.<br>
<br>
Etienne AUJAMES<br>
<br>
On Fri, 2021-03-05 at 12:56 +0800, Tung-Han Hsieh via lustre-discuss<br>
wrote:<br>
&gt; Dear Angelos,<br>
&gt; <br>
&gt; On Fri, Mar 05, 2021 at 12:15:19PM +0800, Angelos Ching via lustre-<br>
&gt; discuss wrote:<br>
&gt; &gt; Hi TH,<br>
&gt; &gt; <br>
&gt; &gt; I think you&#39;ll have to set max_create_count=20000 after step 7<br>
&gt; &gt; unless you<br>
&gt; &gt; unmount and remount your MDT.<br>
&gt; <br>
&gt; Yes. You are right. We have to set max_create_count=20000 for the<br>
&gt; replaced<br>
&gt; OST, otherwise it will not accept newly created files.<br>
&gt; <br>
&gt; &gt; And for step 4, I used conf_param instead of set_param during my<br>
&gt; &gt; drill and I<br>
&gt; &gt; noticed this might be more resilient if you are using a HA pair for<br>
&gt; &gt; the MDT<br>
&gt; &gt; because the MDS might try to activate the inactive OST during<br>
&gt; &gt; failover as<br>
&gt; &gt; set_param is only changing run time option?<br>
&gt; &gt; <br>
&gt; &gt; Regards,<br>
&gt; &gt; Angelos<br>
&gt; <br>
&gt; I am concerning that, sometimes, the replacement of the OST many take<br>
&gt; a<br>
&gt; long time. In between we may encounter some other events that need to<br>
&gt; reboot the MDT servers. I am only sure that we can deactivate /<br>
&gt; reactivate<br>
&gt; the OST by conf_param when MDT server is not rebooted. Once MDT<br>
&gt; server<br>
&gt; is rebooted after setting conf_param=0 on the OST, I am not sure<br>
&gt; whether<br>
&gt; it can be recovered back or not.<br>
&gt; <br>
&gt; So probably I missed another step. Between step 6 and 7, we need to<br>
&gt; reactivate the old OST before mounting the new OST ?<br>
&gt; <br>
&gt; 6. Prepare the new OST for replacement by mkfs.lustre with --replace<br>
&gt;    option, and set the index to the old OST index (e.g., 0x8):<br>
&gt;    ....<br>
&gt; <br>
&gt; 6.5. Reactivate the old OST index:<br>
&gt; <br>
&gt;    lctl set_param osc.chome-OST0008-osc-MDT0000.active=1<br>
&gt; <br>
&gt; 7. Mount the new OST (run in the new OST server).<br>
&gt; <br>
&gt; 8. Release the new OST for accepting new objects:<br>
&gt; <br>
&gt;    lctl set_param osc.chome-OST0008-osc-<br>
&gt; MDT0000.max_create_count=20000<br>
&gt; <br>
&gt; <br>
&gt; Cheers,<br>
&gt; <br>
&gt; T.H.Hsieh<br>
&gt; <br>
&gt; <br>
&gt; &gt; On 05/03/2021 11:48, Tung-Han Hsieh via lustre-discuss wrote:<br>
&gt; &gt; &gt; Dear Hans,<br>
&gt; &gt; &gt; <br>
&gt; &gt; &gt; Thank you very much. Replacing the OST is new to me and very very<br>
&gt; &gt; &gt; useful. We will try it next time.<br>
&gt; &gt; &gt; <br>
&gt; &gt; &gt; So, according to the description of the manual, to replace the<br>
&gt; &gt; &gt; OST<br>
&gt; &gt; &gt; we probably need to:<br>
&gt; &gt; &gt; <br>
&gt; &gt; &gt; 1. Lock the old OST (e.g., chome-OST0008) such that it will not<br>
&gt; &gt; &gt;     create new files (run in the MDT server):<br>
&gt; &gt; &gt; <br>
&gt; &gt; &gt;     lctl set_param osc.chome-OST0008-osc-<br>
&gt; &gt; &gt; MDT0000.max_create_count=0<br>
&gt; &gt; &gt; <br>
&gt; &gt; &gt; 2. Locate the list of files in the old OST: (e.g., chome-<br>
&gt; &gt; &gt; OST0008):<br>
&gt; &gt; &gt;     (run in the client):<br>
&gt; &gt; &gt; <br>
&gt; &gt; &gt;     lfs find --obd chome-OST0008_UUID /home &gt; /tmp/OST0008.txt<br>
&gt; &gt; &gt; <br>
&gt; &gt; &gt; 3. Migrate the listed files in /tmp/OST0008.txt out of the old<br>
&gt; &gt; &gt; OST.<br>
&gt; &gt; &gt;     (run in the client).<br>
&gt; &gt; &gt; <br>
&gt; &gt; &gt; 4. Remove the old OST temporarily (run in the MDT server):<br>
&gt; &gt; &gt; <br>
&gt; &gt; &gt;     lctl set_param osc.chome-OST0008-osc-MDT0000.active=0<br>
&gt; &gt; &gt; <br>
&gt; &gt; &gt;     (Note: should use &quot;set_param&quot; instead of &quot;conf_param&quot;)<br>
&gt; &gt; &gt; <br>
&gt; &gt; &gt; 5. Unmount the old OST partition (run in the old OST server)<br>
&gt; &gt; &gt; <br>
&gt; &gt; &gt; 6. Prepare the new OST for replacement by mkfs.lustre with --<br>
&gt; &gt; &gt; replace<br>
&gt; &gt; &gt;     option, and set the index to the old OST index (e.g., 0x8):<br>
&gt; &gt; &gt;     (run in the new OST server)<br>
&gt; &gt; &gt; <br>
&gt; &gt; &gt;     mkfs.lustre --ost --mgsnode=XXXXXX --index=0x8 --replace<br>
&gt; &gt; &gt; &lt;device_name&gt;<br>
&gt; &gt; &gt; <br>
&gt; &gt; &gt; 7. Mount the new OST (run in the new OST server).<br>
&gt; &gt; &gt; <br>
&gt; &gt; &gt; <br>
&gt; &gt; &gt; Best Regards,<br>
&gt; &gt; &gt; <br>
&gt; &gt; &gt; T.H.Hsieh<br>
&gt; &gt; &gt; <br>
&gt; &gt; &gt; <br>
&gt; &gt; &gt; On Thu, Mar 04, 2021 at 04:59:54PM +0100, Hans Henrik Happe via<br>
&gt; &gt; &gt; lustre-discuss wrote:<br>
&gt; &gt; &gt; &gt; Hi,<br>
&gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; The manual describe this:<br>
&gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; <a href="https://doc.lustre.org/lustre_manual.xhtml#lustremaint.remove_ost" rel="noreferrer" target="_blank">https://doc.lustre.org/lustre_manual.xhtml#lustremaint.remove_ost</a><br>
&gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; There is a note telling you that it will still be there, but<br>
&gt; &gt; &gt; &gt; can be<br>
&gt; &gt; &gt; &gt; replaced.<br>
&gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; Hope you migrated your data away from the OST also. Otherwise<br>
&gt; &gt; &gt; &gt; you would<br>
&gt; &gt; &gt; &gt; have lost it.<br>
&gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; Cheers,<br>
&gt; &gt; &gt; &gt; Hans Henrik<br>
&gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; On 03.03.2021 11.22, Tung-Han Hsieh via lustre-discuss wrote:<br>
&gt; &gt; &gt; &gt; &gt; Dear All,<br>
&gt; &gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; &gt; Here is a question about how to remove an OST completely<br>
&gt; &gt; &gt; &gt; &gt; without<br>
&gt; &gt; &gt; &gt; &gt; restarting the Lustre file system. Our Lustre version is<br>
&gt; &gt; &gt; &gt; &gt; 2.12.6.<br>
&gt; &gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; &gt; We did the following steps to remove the OST:<br>
&gt; &gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; &gt; 1. Lock the OST (e.g., chome-OST0008) such that it will not<br>
&gt; &gt; &gt; &gt; &gt; create<br>
&gt; &gt; &gt; &gt; &gt;     new files (run in the MDT server):<br>
&gt; &gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; &gt;     lctl set_param osc.chome-OST0008-osc-<br>
&gt; &gt; &gt; &gt; &gt; MDT0000.max_create_count=0<br>
&gt; &gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; &gt; 2. Locate the list of files in the target OST: (e.g., chome-<br>
&gt; &gt; &gt; &gt; &gt; OST0008):<br>
&gt; &gt; &gt; &gt; &gt;     (run in the client):<br>
&gt; &gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; &gt;     lfs find --obd chome-OST0008_UUID /home<br>
&gt; &gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; &gt; 3. Remove OST (run in the MDT server):<br>
&gt; &gt; &gt; &gt; &gt;     lctl conf_param osc.chome-OST0008-osc-MDT0000.active=0<br>
&gt; &gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; &gt; 4. Unmount the OST partition (run in the OST server)<br>
&gt; &gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; &gt; After that, the total size of the Lustre file system<br>
&gt; &gt; &gt; &gt; &gt; decreased, and<br>
&gt; &gt; &gt; &gt; &gt; everything looks fine. However, without restarting (i.e.,<br>
&gt; &gt; &gt; &gt; &gt; rebooting<br>
&gt; &gt; &gt; &gt; &gt; Lustre MDT / OST servers), we still feel that the removed OST<br>
&gt; &gt; &gt; &gt; &gt; is<br>
&gt; &gt; &gt; &gt; &gt; still exists. For example, in MDT:<br>
&gt; &gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; &gt; # lctl get_param osc.*.active<br>
&gt; &gt; &gt; &gt; &gt; osc.chome-OST0000-osc-MDT0000.active=1<br>
&gt; &gt; &gt; &gt; &gt; osc.chome-OST0001-osc-MDT0000.active=1<br>
&gt; &gt; &gt; &gt; &gt; osc.chome-OST0002-osc-MDT0000.active=1<br>
&gt; &gt; &gt; &gt; &gt; osc.chome-OST0003-osc-MDT0000.active=1<br>
&gt; &gt; &gt; &gt; &gt; osc.chome-OST0008-osc-MDT0000.active=0<br>
&gt; &gt; &gt; &gt; &gt; osc.chome-OST0010-osc-MDT0000.active=1<br>
&gt; &gt; &gt; &gt; &gt; osc.chome-OST0011-osc-MDT0000.active=1<br>
&gt; &gt; &gt; &gt; &gt; osc.chome-OST0012-osc-MDT0000.active=1<br>
&gt; &gt; &gt; &gt; &gt; osc.chome-OST0013-osc-MDT0000.active=1<br>
&gt; &gt; &gt; &gt; &gt; osc.chome-OST0014-osc-MDT0000.active=1<br>
&gt; &gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; &gt; We still see chome-OST0008. And in dmesg of MDT, we see a lot<br>
&gt; &gt; &gt; &gt; &gt; of:<br>
&gt; &gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; &gt; LustreError: 4313:0:(osp_object.c:594:osp_attr_get()) chome-<br>
&gt; &gt; &gt; &gt; &gt; OST0008-osc-MDT0000:osp_attr_get update error<br>
&gt; &gt; &gt; &gt; &gt; [0x100080000:0x10a54c:0x0]: rc = -108<br>
&gt; &gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; &gt; In addition, when running LFSCK in the MDT server:<br>
&gt; &gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; &gt;       lctl lfsck_start -A<br>
&gt; &gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; &gt; even after all the works of MDT and OST are completed, we<br>
&gt; &gt; &gt; &gt; &gt; still see that<br>
&gt; &gt; &gt; &gt; &gt; (run in MDT server):<br>
&gt; &gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; &gt;       lctl get_param mdd.*.lfsck_layout<br>
&gt; &gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; &gt; the status is not completed:<br>
&gt; &gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; &gt; mdd.chome-MDT0000.lfsck_layout=<br>
&gt; &gt; &gt; &gt; &gt; name: lfsck_layout<br>
&gt; &gt; &gt; &gt; &gt; magic: 0xb1732fed<br>
&gt; &gt; &gt; &gt; &gt; version: 2<br>
&gt; &gt; &gt; &gt; &gt; status: partial<br>
&gt; &gt; &gt; &gt; &gt; flags: incomplete<br>
&gt; &gt; &gt; &gt; &gt; param: all_targets<br>
&gt; &gt; &gt; &gt; &gt; last_completed_time: 1614762495<br>
&gt; &gt; &gt; &gt; &gt; time_since_last_completed: 4325 seconds<br>
&gt; &gt; &gt; &gt; &gt; ....<br>
&gt; &gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; &gt; We suspect that the &quot;incomplete&quot; part might due to the<br>
&gt; &gt; &gt; &gt; &gt; already removed<br>
&gt; &gt; &gt; &gt; &gt; chome-OST0008.<br>
&gt; &gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; &gt; Is there any way to completely remove the chome-OST0008 from<br>
&gt; &gt; &gt; &gt; &gt; the Lustre<br>
&gt; &gt; &gt; &gt; &gt; file system ? since that OST device has already been<br>
&gt; &gt; &gt; &gt; &gt; reformatted for<br>
&gt; &gt; &gt; &gt; &gt; other usage.<br>
&gt; &gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; &gt; Thanks very much.<br>
&gt; &gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; &gt; <br>
&gt; &gt; &gt; &gt; &gt; T.H.Hsieh<br>
&gt; &gt; &gt; &gt; &gt; _______________________________________________<br>
&gt; &gt; &gt; &gt; &gt; lustre-discuss mailing list<br>
&gt; &gt; &gt; &gt; &gt; <a href="mailto:lustre-discuss@lists.lustre.org" target="_blank">lustre-discuss@lists.lustre.org</a><br>
&gt; &gt; &gt; &gt; &gt; <a href="http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org" rel="noreferrer" target="_blank">http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org</a><br>
&gt; &gt; &gt; &gt; _______________________________________________<br>
&gt; &gt; &gt; &gt; lustre-discuss mailing list<br>
&gt; &gt; &gt; &gt; <a href="mailto:lustre-discuss@lists.lustre.org" target="_blank">lustre-discuss@lists.lustre.org</a><br>
&gt; &gt; &gt; &gt; <a href="http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org" rel="noreferrer" target="_blank">http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org</a><br>
&gt; &gt; &gt; _______________________________________________<br>
&gt; &gt; &gt; lustre-discuss mailing list<br>
&gt; &gt; &gt; <a href="mailto:lustre-discuss@lists.lustre.org" target="_blank">lustre-discuss@lists.lustre.org</a><br>
&gt; &gt; &gt; <a href="http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org" rel="noreferrer" target="_blank">http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org</a><br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; lustre-discuss mailing list<br>
&gt; &gt; <a href="mailto:lustre-discuss@lists.lustre.org" target="_blank">lustre-discuss@lists.lustre.org</a><br>
&gt; &gt; <a href="http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org" rel="noreferrer" target="_blank">http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org</a><br>
&gt; _______________________________________________<br>
&gt; lustre-discuss mailing list<br>
&gt; <a href="mailto:lustre-discuss@lists.lustre.org" target="_blank">lustre-discuss@lists.lustre.org</a><br>
&gt; <a href="http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org" rel="noreferrer" target="_blank">http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org</a><br>
_______________________________________________<br>
lustre-discuss mailing list<br>
<a href="mailto:lustre-discuss@lists.lustre.org" target="_blank">lustre-discuss@lists.lustre.org</a><br>
<a href="http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org" rel="noreferrer" target="_blank">http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org</a><br>
</blockquote></div>