[lustre-discuss] How to remove an OST completely

Tung-Han Hsieh thhsieh at twcp1.phys.ntu.edu.tw
Wed Mar 3 02:22:49 PST 2021

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

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:

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

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.


More information about the lustre-discuss mailing list