Manually formatting some of this due to the quoting sections having been done poorly. You should not type inside the "quote box" when you're adding your own lines. You can quote individual sections of someone else's comment by highlighting it and clicking Reply from the menu that appears, so that it gets added to your new comment and then you write below it, OUTSIDE the box.
1-This attribute is 0 for me.Why? I think I am not trying to write on those problematic sectors .In addition I tried to read them with GNU ddrescue (and because of reading, pending_sector has been increased but unable to reallocate them due to nothing has been written to those sectors ,
so should I try to write on sector ? If yes ?
Which option you prefer?
- Find sectors with long test(or software or Linux tool) and try to write zero/null by dd command?
- -Victoria, but in Windows
- Western data lifeguard (filling zero on pending sector )
The reallocated sectors value will only increase when a sector completely FAILS. Until it becomes "bad" (meaning the quality of the magnetic signal of the bits drops below the threshold programmed into the firmware) it will only be PENDING, where the firmware can detect that the quality is not perfect, but it's still working. Different drives have different thesholds. Your drive may still consider the sector good enough to be PENDING if it just has to be read twice, or maybe three times, but if it needs 4 reads then it's "bad" and gets reallocated. But that means it takes 2 or 3 times as long to read those sectors compared to a perfect drive with no defects. Note that software can't control how often the drive attempts to read a pending sector with a single request; the software can ask just once, but the drive determines how many attempts to make and the software doesn't know how many attempts it took, and the software can't tell the drive to make fewer attempts.
ddrescue and any other tools have to read every sector in order to locate legitimate data. Pending sectors are still considered valid sectors, so they have to be read. If the sector is marked bad and remapped, then NO consumer software will ever look at that physical sector ever again. The only way to make that happen is for the software to attempt writing to that sector over and over until the quality gets so bad that the drive firmware remaps it.
I don't know much about dd but there are ways to force it to rewrite specific blocks many times until they fail and get remapped. I presume you'd need to do it against every pending sector, which means needing to find out every sector. That may not really be effective either, since the number of sectors on your drive with problems keeps increasing. The data in those sectors is erased.
ddrescue is not concerned with trying to "fix" the drive and force sector remaps. It's only concerned with trying to copy the data from it. The "pending" sectors are currently readable, it just takes multiple attempts. That will make it take longer than normal to read and copy the data, but it should succeed eventually unless there is catastrophic failure. How long it ultimately takes depends on how many sectors are having problems and how many retries are required to read them or force them to fail and be remapped.
A tool like Victoria in Windows is just an easier way to force the pending sectors to fail on the entire drive. It will automatically hammer the pending sectors by making repeated requests until they fail (when you use re-map mode), without affecting good sectors. (The software also doesn't know that a specific sector is "pending". It only knows that it took longer than normal to read the data, so it assumes that sector is starting to fail.) The data in the pending sectors SHOULD get moved to the remapped sectors instead of being lost, unless the sector fails catastrophically and can't be read. The rest of your data will be unaffected. But just like using dd, all this is doing is trying to force the sectors to be remapped in an attempt to make the drive "good" again. The process could cause the drive to fail catastrophically and lose ALL your data.
WD Data LifeGuard fills the ENTIRE drive with zeros, so all your data would be lost, and it doesn't repeatedly write to the pending sectors to try to force them to be remapped. You'd have to run it over and over to do that. So this option would not be good.
Last night after your comment, I visted several top-notch data recovery software such as R-Studio , DMDE , Disk Drill , easeUS , Stellar Data ,they claim to retrieve data back from bad sector and even corrupted/RAW and damaged disk
------Does imaging with ddrescue have any advantages over one of these tools?
ddrescue (and dd itself) is open-source and has a LOT of options and capabilities, so if you know what you're doing you can do a lot more than commercial tools, and of course it's free. Some of those other tools are also free while others may only show you what they CAN recover but won't do it until you pay them. ddrescue is also MUCH more complex to use since it's only by command line.
NO consumer software can recover data from a sector that has been re-mapped by the drive firmware. Those sectors simply don't exist anymore as far as the drive is concerned. Most rescue tools are concerned with recovering data that has been accidentally deleted, or where the partition table or file allocation table (or equivalent) has been damaged or lost, or the drive has been repartitioned or reformatted. That's what a RAW or corrupted drive is. In those cases, there is no physical fault with the drive, and the software just reads the disk sector by sector and attempts to find data structures that indicate where the partitions and files were located, and copies the data to another location. They can also scan a drive that does have physical problems, such as pending sectors, which may have caused the corruption, but they still depend on the drive itself being able to read the physical sectors. That's all ddrescue is doing. If the drive is unable to read a sector after multiple attempts, the data is lost and the sector is remapped.
Your drive may not have any reallocated sectors yet, but it does have pending sectors that are increasing, and it seems that it has had data corruption occur since you can't read the partitions. Any of those tools can likely recover a lot of the data, but during the process more sectors will become pending, and possibly some will be remapped. But the pending sectors ARE still readable.
Unfortunately the more you try to recover data, the more you're going to risk causing more problems and total failure. That's just the nature of this type of failure. If the data is important enough, you need to physically send the drive to a data recovery specialist. (A company that does this professionally. Not just some general computer repair company that says they'll recover data.)
There are two types of bad sector :
1- Logical or soft bad sector
2- Physical or Hard bad sector
The logical bad sector is where the operating system made a decision that a sector is bad because it didn't respond properly. For example if the sector has to be read 3 times and it takes 3 seconds to do that, the operating system may be coded to only wait 2 seconds. If it takes longer than 2 seconds, the OS decides the sector is "bad" and marks it as such in a special location in the filesystem. Or it may return an error instead of valid data and be marked bad that way. Or it may do a read/write/read test and if the data gets corrupted the sector is marked bad. In Windows, after you run chkdsk there is a line that shows the number of bad sectors. That refers to logical bad sectors that the OS has detected during normal operation or during a chkdsk scan specifically for bad sectors. Logical bad sectors are NOT remapped. You just lose the amount of capacity of however many bad sectors there are. If you ever format the drive, the data about those logical bad sectors is erased, so they will then get used again. Logical bad sectors CAN be perfectly good physically, as there are other reasons for the drive to take longer to respond at times.
Physical bad sectors is obviously when there is a physical fault with the magnetic surface. Magnetic media can wear out if it was poor quality from the factory, or become detached from the platter surface, or be damaged by impact. A physical bad sector is detected by the read/write heads of the drive because it can sense the strength of the magnetic field. When it goes below a certain threshold, the drive's firmware records that the sector is bad and remaps it. This is a permanent reallocation and the physical sector will never be readable by software again.
Is there a way to copy specific folders directly in Linux or Windows? (Six months ago, I was unable to access the HDD'd drives.)
I have taken this to mean that when you plugged it in, the operating system could not see the partitions or the files. If you can provide more information on what was done it might be possible to make it accessible again. If you can do that, then you can just copy the files you need before destroying or recycling the drive. Getting access to the files themselves that way would be the fastest and safest way to get what you need, because there would be no need to scan the whole disk and cause more stress on it.
ddrescue will only read and copy the data of the entire drive to another location, so that you can then dig through the contents. Some other tools like TestDisk and PhotoRec, as well as some of the ones you mentioned, can try to just identify the files and create a list of what it discovered, instead of taking the time to copy the entire drive, and then allow you to select which ones you want to retrieve.
I think those tools are all equally stressful to the drive, but ddrescue or another tool that just tries to image the entire disk MAY be the safest. It will just read the entire drive and create an image of it, and then you can work with the image instead of the drive. ddrescue is supposed to try to read only "good" sectors first, but in your drive's case there aren't any "bad" ones yet, none that are actually returning errors, so it might just take a bit longer as I said, while the drive itself retries the questionable sectors until the data reads successfully. Once it gets past the bad areas, it will go much faster.
If you use a tool like TestDisk or PhotoRec that generates a list of recoverable files, it will have to read the entire drive once to build the list, then read it again to recover the files you select. Depending on where the bad areas are, this COULD result in more stress and more failures and loss of data. I think they can also be set to simply recover all the files they find though, similar to ddrescue, but they just copy the files instead of creating a solid image of the entire drive. You then have to depend on whatever directory structure they decide is accurate and have to hope it's useful. With the ddrescue image file, you can mount the image file itself and treat it like a hard drive to perform any other data recovery you want, including running TestDisk, PhotoRec or others, without risking further damage.