-
Notifications
You must be signed in to change notification settings - Fork 1
Manually picked the changes from OpenZFS to import from the backup if… #104
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
Conversation
… the primary is corrupted by Windows2025
…nfo with 128 partition to fix the add disk failure
@datacore-senthil as we discussed let's test with disk having data because with the increase in partition may reduce the usable space and may cause data loose. |
Based on the suggestion, I did a manual validation without involving SSY. On a Windows Server 2022 VM, I created a ZPool and filled the pool to capacity. I then detached the virtual disk and re-attached it to another VM running Windows Server 2025. On that system, I was able to successfully import the pool and run a disktest check, which showed no errors. This confirms that the manual test passed. However, during the code review we had a concern regarding how nblocks and the calculation of the last LBA behave when the partition count is increased from 9 to 128. For 9 partitions: EFI_MIN_ARRAY_SIZE = 16 KB = 16384 bytes Since 2048 < 16384, the condition is true → nblocks is recalculated: nblocks = (16384 / 512) + 1 = 32 + 1 = 33 For 128 partitions , Direct calculation already gives nblocks = 33. Conclusion: To confirm, debug logs were added and compared across Windows 2022 and Windows 2025 environments: **[repair_vtoc] efi_last_u_lba : 41943006 in windows 2025, |
…tructed the primary (#104) * Manually picked the changes from OpenZFS to import from the backup if the primary is corrupted by Windows2025 * SSV-25279 , during import rewriting the corrupted primary partition info with 128 partition to fix the add disk failure * added log and handled error case (cherry picked from commit 081749a)
…tructed the primary (#104) * Manually picked the changes from OpenZFS to import from the backup if the primary is corrupted by Windows2025 * SSV-25279 , during import rewriting the corrupted primary partition info with 128 partition to fix the add disk failure * added log and handled error case (cherry picked from commit 081749a)
…tructed the primary (#104) (#109) * Manually picked the changes from OpenZFS to import from the backup if the primary is corrupted by Windows2025 * SSV-25279 , during import rewriting the corrupted primary partition info with 128 partition to fix the add disk failure * added log and handled error case (cherry picked from commit 081749a)
…tructed the primary (#104) (#108) * Manually picked the changes from OpenZFS to import from the backup if the primary is corrupted by Windows2025 * SSV-25279 , during import rewriting the corrupted primary partition info with 128 partition to fix the add disk failure * added log and handled error case (cherry picked from commit 081749a)
zpool import: reconstruct corrupted primary GPT from backup
On Windows 2025, zpool import can fail if the primary EFI/GPT partition table has been corrupted by OS. In such cases, the
import path is updated to detect the corruption and fall back to the backup GPT.
The code now:
This allows zpools with corrupted primary GPT labels to be imported successfully without data loss.
Jira's done : SSV-25260, SSV-25279