-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mount fails because "LTFS17285E Failed to search the final index in IP (1)" even when ltfs can try to search on DP. #479
Comments
It looks a bug. The blocks Lines 1661 to 1663 in 7271446
and Lines 1690 to 1693 in 7271446
shall be swapped. Upper code belongs to the logic that handles WP happens on IP. So index on IP might corrupted, thus skip flag shall be But lower code belongs to the logic that handles WP happens on DP. The index shall be searched from IP. So skip flag shall be |
Hello @piste-jp, Thanks for quick response. I am curious. Could we just remove the "can_skip_ip" flag and let At the end the logic consists in using the latest index on tape, so it does not hurt to simply try to search the index on both partitions, mark the index as 0 in case some searching failed, and use the latest index. Regards |
I believe it's little bit dangerous. Because the block starts from L1680 means the tape says IP has the latest index. So an index on IP must be existed at least. Why do we provide a skip flag or obsolete the skip flag and always allow the skip? Lines 1680 to 1695 in 7271446
Your proposal might relax acceptable tape condition a little bit it just ignores unexpected behavior of tape drive or LTFS itself. I believe we need to understand why it happens if that really happens. And fix it correctly. But your proposal just hide that fact with any knowledge. I believe it's not time to do that at this time. |
I have created the following PR #480 with the modifications that you pointed out. Do you think we can ensure that the change will not break the tape, and it is safe to be Implemented? I am currently trying to replicate this scenario using itdt... I think the only problem is in case we write incorrect index data into the tape. In addition, it is good to emphasize that this involves a "data lost" scenario, since the index found will not point to all files within the tape. Regards |
For PR discussion, you need to use the comment thread on the PR. Let's use #480.
I cannot understand this ... Why? |
What I meant is because the write perm error I am not sure if we can trust the state of the indexes within the tape. According to the LTFS standard v2.4: A volume that has been locked because a permanent write error "shall be mounted as read-only using the highest generation index available on the tape in either partition" Is it possible that the highest index found available within the tape corresponds to a previous generation and therefore do not specify the latest files within the tape? Could you confirm if after write perm error and successfully find the latest index in either partition that index will always point to the latest file within the tape? Really appreciate your support Regards |
First of all, In this case, it is clear that your scenario is not a Second, it looks you pointed out the scenario based on reading through only the mount process logic. I believe it is not a correct approach. You need to understand the implementation of write side. Long story short, when LTFS gets a write perm from the drive, LTFS writes down an index
The drive returned a GOOD response after writing latest index on tape. So LTFS marks it is
I can review if you provide such code. But honestly, it's not sure I need to do this because,
I believe reporting mount error (and fail) when read index generator is matched to the one on MAM is no benefit to users. |
Nice talking to you @piste-jp. Yes we will take care of the pull request. Thanks! |
Describe the bug
When a tape cartridge with a write permanent error is trying to be mounted and the MAM (cartridge memory) attribute of the Index Partion (IP) stores a generation number lower than the MAM attribute of the Data Partition (DP), the mount process fails with error LTFS17285E even when ltfs can still search for the index in the DP.
Following logs shows that scenario.
To Reproduce
Note: It is hard to reproduce since as mentioned above the tape cartridge needs to have a write permanent error.
Expected behavior
A clear and concise description of what you expected to happen.
It seems the issue can be solved by making the
_ltfs_search_index_wp@ltfs/src/libltfs/ltfs.c
process to continue searching on the DP even if the search on the IP fails. (It can be done by setting can_skip_ip = true).ltfs/src/libltfs/ltfs.c
Lines 1464 to 1507 in 7271446
Additional context
This makes me to ask, was there any reason to avoid the index to be searched on the Data Partition?
The "can_skip_ip" flag was explicitaly set to false in the following commit 3287850, was there any special reason to do that?
The text was updated successfully, but these errors were encountered: