Skip to content

Conversation

@datacore-senthil
Copy link

@datacore-senthil datacore-senthil commented Sep 12, 2025

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:

Reads GPT information from the backup when primary shows corruption.
Reconstructs the primary GPT with the correct partition style.
Rewrites the primary GPT on disk and proceeds with import.
This allows zpools with corrupted primary GPT labels to be imported successfully without data loss.

Jira's done : SSV-25260, SSV-25279

…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)
@datacore-senthil datacore-senthil merged commit 7b7abc8 into rel-10psp21 Sep 12, 2025
0 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants