[LU-5268] HSM: importing with copytool can lead to data corruption Created: 27/Jun/14  Updated: 31/Jan/22  Resolved: 31/Jan/22

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.5.0, Lustre 2.5.1
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Frank Zago (Inactive) Assignee: WC Triage
Resolution: Won't Fix Votes: 0
Labels: HSM

Issue Links:
Related
is related to LU-3565 HSM: Allow specifying minimum FID seq... Resolved
Severity: 3
Rank (Obsolete): 14701

 Description   

This is a hypothetical bug.

When importing a file with the posix copytool, a hardlink is done at the end to link from the archvie of the file being restored to the new archive file (hash of the new fid). When restoring a complete filesystem, it is very possible that the new fid being allocated already existed on the old filesystem (and thus in the HSM archive). In which case the new archive filename will already exist. At that point the hard link operation in import_one() will fail, which leaves the imported file pointing to the archive of another file, and restoring that file will lead to data corruption.

Solution: link the new archive to a new directory; ie have --hsm-root and --hsm-root-import options. Then, optionally, let the user merge back both directories once the import is done.



 Comments   
Comment by Robert Read (Inactive) [ 27/Jun/14 ]

Yet another reason to not use FIDs as the index of an external archive...

Comment by Thomas LEIBOVICI - CEA (Inactive) [ 02/Jul/14 ]

Following this recovery procedure avoids fid conflicts when reimporting from the archive:

  • get the highest fid sequence from the archive:
    lhsmtool_posix --max-sequence <fsname>
  • set minimum fid sequence of MDT (see LU-3565).
  • reimport entries from the archive

This should be added to the Lustre manual.

Comment by Frank Zago (Inactive) [ 02/Jul/14 ]

Thanks Thomas. That looks like another good way to solve that problem.

Generated at Sat Feb 10 01:50:00 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.