diskfs / go-diskfs

MIT License
515 stars 116 forks source link

GPT table repair should reset last data sector #222

Closed rjosephwright closed 5 months ago

rjosephwright commented 5 months ago

This modifies the GPT table Repair method to update the last data sector and the Verify method to check for this. If this is not done, it can result in e.g. sgdisk warning of a partition overlapping the last data sector when the disk is resized.

A test has been added to create a disk with a GPT table and verify it, then resize and repair it and verify again successfully.