HomeFreeBSD

MFC r365830: make it possible recovering broken GPT after some LBAs cut off

Description

MFC r365830: make it possible recovering broken GPT after some LBAs cut off

If pre-formatted device has GPT and a partition covering
last available LBAs and the device is attached using
a bridge reducing amount of LBAs, then it could be not enough
forcing GEOM to use primary GPT. Also, we should make it possible
to recover GPT and this requires either deleting or resizing the partition.

This change enables "gpart delete" and "gpart resize" commands
on corrupted GPT with following "gpart recover".

It still does not allow modifying corrupted GPT without
preliminary setting sysctl kern.geom.part.check_integrity=0

Reported by: Alex Korchmar

Details

Provenance
eugenAuthored on
Parents
rS365922: Apply an opimization for the kernels used by cexp(x) and cexpf(x) submitted
Branches
Unknown
Tags
Unknown