Talk:Identify damaged files

From ArchWiki
Latest comment: 24 January by Indigo in topic ddrutility

Exact numbers

the exact number to use in the seek - how is this arrived at - is it a block number directly from the badblocks output? Is it calculated from those block numbers?

To make the harddrive transparently map out the badblock with a spare good sector you will have to simply write zeros to the bad block using the dd command as root. Remember that with this command you have to work with the same block size as your filesystem and the block as to be relative to the partition the filesystem is on and NOT the harddrive as a whole:
dd if=/dev/zero of=/dev/sdxy bs=4096 count=1 seek=2269012
sync

and this piece: " NOT the harddrive as a whole:"

are there directions somewhere on how to do this adjustment? —This unsigned comment is by Sanjeev K Sharma (talk) 15:29, 30 August 2015‎. Please sign your posts with ~~~~!

Easiest way is to rerun badblocks from the specific partition found to have problems and with the same blocksize as your filesystem uses. Then you shouldn't need to adjust the block numbers.

Example:

badblocks -b 4096 /dev/sda1

Ksd (talk) 00:01, 20 October 2018 (UTC)Reply[reply]


Btrfs section may need updating

My btrfs scrub gave the following warning:

BTRFS warning (device sda1): i/o error at logical 3147743232 on dev /dev/sda1, physical 4229873664, root 5, inode 1209, offset 200704, length 4096, links 1 (path: some/poor/file)

As you can see, there is no "sector" field as wiki currently has. Gandalf3 (talk) 20:05, 13 May 2018 (UTC)Reply[reply]

MaBeef here

This is MaBeef, the guy who originally created this article. I'm back under a new username (Ksd) because I lost my login credentials for my original user.

I had originally written this article years ago as sort of a dump of all of my notes from trying to troubleshoot a harddrive I thought was dying (turned out to be a bad PSU). I was meaning to eventually clean up it and add to it but then lost track due to health problems I was having so I want to apologize for abandoning my own article. I am very glad to see it's still here and that people have found it useful enough to update. Everyone has done a great job of cleaning it up and the new BTRFS section looks very useful.

I've gone ahead and *finally* added a reiserfs section and an XFS section. Ksd (talk) 23:54, 19 October 2018 (UTC)Reply[reply]

ddrutility

ddrutility has the (just tested and working) `ddru_ntfsfindbad` command which was very easy to use. It needs a mapfile/logfile from ddrescue. ddrutility is found in the aur, but the [upstream](https://sourceforge.net/projects/ddrutility/) seems to be unmaintained. Would this still be a valid addition to this article? It also has the command `ddru_findbad` which is said to work on ext4, but as I don't have so many failing hdds I havent tried this command Game (talk) 10:02, 22 January 2024 (UTC)Reply[reply]

It's good you had success, but I'd be wary to add a section for a non-Linux native filesystem (plus last maintained 2016). Have a look at File recovery#List of utilities, How about adding it to that selection? --Indigo (talk) 21:28, 22 January 2024 (UTC)Reply[reply]
Thanks. Just did that. Game (talk) 20:16, 24 January 2024 (UTC)Reply[reply]
Cheers. --Indigo (talk) 20:36, 24 January 2024 (UTC)Reply[reply]