<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    Hi,<br>
    <br>
    The manual describe this:<br>
    <br>
    <a class="moz-txt-link-freetext" href="https://doc.lustre.org/lustre_manual.xhtml#lustremaint.remove_ost">https://doc.lustre.org/lustre_manual.xhtml#lustremaint.remove_ost</a><br>
    <br>
    There is a note telling you that it will still be there, but can be
    replaced.<br>
    <br>
    Hope you migrated your data away from the OST also. Otherwise you
    would have lost it.<br>
    <br>
    Cheers,<br>
    Hans Henrik<br>
    <br>
    <div class="moz-cite-prefix">On 03.03.2021 11.22, Tung-Han Hsieh via
      lustre-discuss wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:20210303102249.i5npkuqhoqw6asgy@twcp1.phys.ntu.edu.tw">
      <pre class="moz-quote-pre" wrap="">Dear All,

Here is a question about how to remove an OST completely without
restarting the Lustre file system. Our Lustre version is 2.12.6.

We did the following steps to remove the OST:

1. Lock the OST (e.g., chome-OST0008) such that it will not create
   new files (run in the MDT server):

   lctl set_param osc.chome-OST0008-osc-MDT0000.max_create_count=0

2. Locate the list of files in the target OST: (e.g., chome-OST0008):
   (run in the client):

   lfs find --obd chome-OST0008_UUID /home

3. Remove OST (run in the MDT server):
   lctl conf_param osc.chome-OST0008-osc-MDT0000.active=0

4. Unmount the OST partition (run in the OST server)

After that, the total size of the Lustre file system decreased, and
everything looks fine. However, without restarting (i.e., rebooting
Lustre MDT / OST servers), we still feel that the removed OST is
still exists. For example, in MDT:

# lctl get_param osc.*.active
osc.chome-OST0000-osc-MDT0000.active=1
osc.chome-OST0001-osc-MDT0000.active=1
osc.chome-OST0002-osc-MDT0000.active=1
osc.chome-OST0003-osc-MDT0000.active=1
osc.chome-OST0008-osc-MDT0000.active=0
osc.chome-OST0010-osc-MDT0000.active=1
osc.chome-OST0011-osc-MDT0000.active=1
osc.chome-OST0012-osc-MDT0000.active=1
osc.chome-OST0013-osc-MDT0000.active=1
osc.chome-OST0014-osc-MDT0000.active=1

We still see chome-OST0008. And in dmesg of MDT, we see a lot of:

LustreError: 4313:0:(osp_object.c:594:osp_attr_get()) chome-OST0008-osc-MDT0000:osp_attr_get update error [0x100080000:0x10a54c:0x0]: rc = -108

In addition, when running LFSCK in the MDT server:

        lctl lfsck_start -A

even after all the works of MDT and OST are completed, we still see that 
(run in MDT server):

        lctl get_param mdd.*.lfsck_layout

the status is not completed:

mdd.chome-MDT0000.lfsck_layout=
name: lfsck_layout
magic: 0xb1732fed
version: 2
status: partial
flags: incomplete
param: all_targets
last_completed_time: 1614762495
time_since_last_completed: 4325 seconds
....

We suspect that the "incomplete" part might due to the already removed
chome-OST0008.

Is there any way to completely remove the chome-OST0008 from the Lustre
file system ? since that OST device has already been reformatted for
other usage.

Thanks very much.


T.H.Hsieh
_______________________________________________
lustre-discuss mailing list
<a class="moz-txt-link-abbreviated" href="mailto:lustre-discuss@lists.lustre.org">lustre-discuss@lists.lustre.org</a>
<a class="moz-txt-link-freetext" href="http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org">http://lists.lustre.org/listinfo.cgi/lustre-discuss-lustre.org</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>