Thomas-Tsai / partclone

Partclone provides utilities to backup a partition smartly and it is designed for higher compatibility of the file system by using existing library.
GNU General Public License v2.0
328 stars 108 forks source link

Description of the --rescue is not accurate #60

Open xh32 opened 9 years ago

xh32 commented 9 years ago

Hi Thomas, thanks for developing this useful open-source tool! Partclone has saved 85% of my data on a dying disk. However, I think the description about -R or --rescue may be not accurate enough.

The "-R, --rescue" option is described as "Continue after disk read errors." in the usage (http://www.partclone.org/usage/partclone.php). However, after reading the source code, I think -R or --rescue actually performs a bad sector backup functionality, which means apart from skipping bad sectors, it will try it's best to read the bad sectors to save more data.

mirh commented 2 years ago

I haven't checked the source code, but still I believe the description could be immensely improved. If physical/mechanical breakage is suspected, people should be warmly recommended to use other specialized tool for recovery (such as ddrescue) Alternatively users should be informed they can try to run fsck/chkdsk to see if the bad sectors go away.

Thomas-Tsai commented 2 years ago

Thank you for this idea! Normally, partclone reads bad block and stopping. The warning message will display first, the user can try option -R. The option -R just try again and ignore the error code because we design partclone can help to backup all other used blocks in the damaged disk. Yes, there is no more WARNING message.

As your suggestion, We should add more descriptions:

  1. no option -R:

                "*************************************************************************\n" 
                "* WARNING: The disk has bad sectors. This means physical damage on the  *\n" 
                "* disk surface caused by deterioration, manufacturing faults, or        *\n" 
                "* another reason. The reliability of the disk may remain stable or      *\n" 
                "* degrade quickly. Use the --rescue option to efficiently save as much  *\n" 
                "* data as possible! Or try other tools(fsck / dd-rescue) to avoid data loss. *\n" 
                "*************************************************************************\n"; 
  2. with option -R : The process will ignore all bad blocks and we should add the WARNING:

    WARNING: Due to physical and mechanica reasons, the bad blocks are ignored by option -R/--rescue.
mirh commented 2 years ago

Mhhh, that design sounds very legit indeed. Are are you sure bad sectors *must* mean physically faulty hardware though? Like, couldn't it just be some logical error for whatever "inoffensive" reason?

Also isn't "rescue" perhaps too much of a bold expression considering AFAIU you aren't using any particularly smart algorithm for recovery (if there is even such a thing though, excuse my ignorance)?