[LU-15580] create_iam utility is broken and excluded from the build Created: 21/Feb/22  Updated: 07/Oct/22

Status: Open
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Artem Blagodarenko (Inactive) Assignee: Artem Blagodarenko
Resolution: Unresolved Votes: 0
Labels: patch

Issue Links:
Related
is related to LU-7892 delete create_iam utility and referen... Open
is related to LU-4898 LFSCK 5: Need mechanism to recover FL... Open
is related to LU-15437 setparam to modify fldb Open
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

lustre/utils/create_iam utility is broken and excluded from the build, but can be useful during iam issues analysis. 



 Comments   
Comment by Andreas Dilger [ 21/Feb/22 ]

Unfortunately, create_iam.c is totally useless in its current form. libiam.c is an empty shell calling into ldiskfs via ioctl() on the file to modify it via IAM code in the kernel, but the IAM_IOC_* ioctls no longer exist.

I had made a patch to use libiam to rebuild the FLDB file based on create_iam.c, but then discovered afterward tha libiam.c was useless. I ended up fixing the kernel parameter interface to be able to rebuild FLDB by using set_param. (Patch not pushed to master yet, as I was away on vacation).

I'm not against filling out libiam.c to actually be able to create IAM format files in userspace, but I suspect it would be a lot of work. On the plus side, latest libext2fs has added htree directory support (mostly for large lost+found), so that might be usable as a starting point.

Comment by Gerrit Updater [ 21/Feb/22 ]

"Artem Blagodarenko <artem.blagodarenko@hpe.com>" uploaded a new patch: https://review.whamcloud.com/46574
Subject: LU-15580 utils: Fix create_iam utility
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 2dabeccd72b88164a8244e8e5a9fb0662d2c491b

Comment by Artem Blagodarenko (Inactive) [ 22/Feb/22 ]

adilger , thank you for pointing to the libiam.c and all this means for LDISKFS modification. Probably we need to fix them for filesystem manual recovery reasons.

Actually, I found create_iam at moment I was investigating the issue related to LU-12268. Started to write a utility, which I have uploaded to U-15581 yesterday, and create_iam.c gave me Iam structure hints. I have fixed it by the way.

Comment by Andreas Dilger [ 23/Sep/22 ]

Artem, not that this is a priority, but if you have a patch that changes libiam.c to actually be able to read/write IAM files (instead of just via the kernel), that would be useful to add to the 46574 patch. Otherwise this tool cannot do anything in its current form.

Generated at Sat Feb 10 03:19:32 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.