[parted-devel] Partition move function

Phillip Susi psusi at cfl.rr.com
Fri Apr 30 18:55:21 UTC 2010


On 4/30/2010 1:42 PM, Curtis Gedak wrote:
> Interested?  Yes.
> Ready to do it?  No, as I have many more higher priority bug fixes and
> enhancements to make to the GParted code.
> Perhaps you would consider writing a patch?  ;-)

Putting it on the end of my to-do list ;)

> 1)  If bad sectors are detected on a drive, then there is still a chance
> for the user to recover the data.  This can be done by repeatedly trying
> to read the bad sector until the read operation finally succeeds.  I
> have personally done this to recover data from a commercial database.  A
> higher number of recovery schemes are available if the partition is not
> moved.

Doesn't the drive internally retry a few times before returning the
error?  And the kernel retries a few times... I would think that by the
time it makes it all the way up to gparted, that there is basically no
way to recover the data.  Of course it doesn't hurt for gparted to retry
the read a few times...

> 2)  If bad sectors are detected, then I personally would suggest copying
> the data to another drive to avoid further data loss.  Moving the
> partition does not address the underlying problem of a hard drive failing.

Actually, it may.  Sometimes a bad sector just got corrupted but there
is nothing physically wrong with the medium.  While the data it
contained is gone, writing to it will succeed, effectively fixing the
bad sector.  I have done this a few times.  Even if the medium is
damaged, modern drives will just remap that sector to the spare pool,
effectively fixing it.

> 3)  We try our best in GParted to protect data as best we can.  The
> extra step of reading first prior to performing a move operation does
> provide some additional security because we avoid manipulating data on a
> partition with bad sectors.

Of course, you could offer to undo the move when an error is detected
for safety sake, though given the modern SMART recovery behaviors, I
don't see any advantage over simply continuing the move and filling in
zeros for the bad sector.



More information about the parted-devel mailing list