[lustre-devel] Clarification requested on safety of `lfs migrate` during concurrent writes

Ls Li lils1102 at outlook.com
Tue Jun 17 01:47:31 PDT 2025


Dear Lustre developers,

I am evaluating the use of `lfs migrate` to perform online OST data migration in a production environment where I/O activity must remain uninterrupted.

While reviewing the help output of the tool, I noticed the warning:

    "(may be not safe with concurrent writes)"

After tracing the commit history, I found that this warning was introduced in the following patch:
https://review.whamcloud.com/c/fs/lustre-release/+/13754

Based on my reading of the implementation:

- When using the `--block` option, a group lock appears to be used to protect the migration operation.
- When using `--non-block`, a lease mechanism is in place, and migration is aborted if conflicting access is detected.

However, I would like to better understand the scenarios in which this operation may still be considered unsafe.

Could you kindly clarify the following:

1. Under what conditions does `lfs migrate` pose a risk when concurrent writes are happening?
2. Specifically, if client processes are appending to or modifying files during `--non-block` migration, what types of issues might arise (e.g., metadata corruption, partial migration, or data inconsistency)?
3. Is the `--block` option considered completely safe under concurrent write loads, or are there known edge cases where group locking may be insufficient?

Any technical explanation, known limitations, or recommended best practices would be greatly appreciated.

Thank you very much for your time and insights.

Best regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lustre.org/pipermail/lustre-devel-lustre.org/attachments/20250617/61fbc309/attachment.htm>


More information about the lustre-devel mailing list