Page 1 of 1

Can't Mount Recovered Partition

Posted: 04 May 2016, 01:50
by netmind
I believe my drive was formatted in error by my dns-323 nas.

I ran testdisk, analyzed, and wrote back what I believe to be the right partitions: 1 swap, 1 primary, 2nd primary (ext2 I think). When I plug the drive into usb 3 HD dock, Ubuntu is able to automatically mount and read the files from the 1st primary partition. However it is unable to properly mount the 2nd partition and gives the following error:

Error mounting /dev/sdb3 at /media/ubuntu/478cc222-c00c-4f7f-ac18-171b3127f983: Command-line `mount -t "ext2" -o "uhelper=udisks2,nodev,nosuid" "/dev/sdb3" "/media/ubuntu/478cc222-c00c-4f7f-ac18-171b3127f983"' exited with non-zero exit status 32: mount: mount /dev/sdb3 on /media/ubuntu/478cc222-c00c-4f7f-ac18-171b3127f983 failed: Structure needs cleaning

If I ignore the error and run testdisk again and go into the advanced->filesystem utils-> undelete option, testdisk shows all the files I expect in the partition. They are all listed down as undeleted also (ie not in RED).

I'm a beginner at linux and not sure what to do next. I was hoping that testdisk would help recover everything in place.

Any help is much appreciated.

Re: Can't Mount Recovered Partition

Posted: 04 May 2016, 06:20
by cgrenier

Code: Select all

sudo fsck -a /dev/sdb3
Does it fix the problem ? If not, what is the output ?

Re: Can't Mount Recovered Partition

Posted: 05 May 2016, 15:44
by netmind
Thanks for the response and sorry for delay. I took some time create a image of the partition first - just in case.

Here's the response from running the command. I'm running live CD so, the device changed to sdd3.

fsck from util-linux 2.27.1
/dev/sdd3: Note: if several inode or block bitmap blocks or part
of the inode table require relocation, you may wish to try
running e2fsck with the '-b 32768' option first. The problem
may lie only with the primary block group descriptors, and
the backup block group descriptors may be OK.

/dev/sdd3: Block bitmap for group 1024 is not in group. (block 0)

(i.e., without -a or -p options)

Re: Can't Mount Recovered Partition

Posted: 06 May 2016, 02:36
by netmind
I also ran the Superblock function in Testdisk and got the following:

Disk /dev/sdd - 2000 GB / 1863 GiB - CHS 243201 255 63

Partition Start End Size in sectors

> Linux 130 0 1 243200 254 56 3904935608
superblock 0, blocksize=4096 []
superblock 32768, blocksize=4096 []
superblock 98304, blocksize=4096 []
superblock 163840, blocksize=4096 []
superblock 229376, blocksize=4096 []
superblock 294912, blocksize=4096 []
superblock 819200, blocksize=4096 []
superblock 884736, blocksize=4096 []
superblock 1605632, blocksize=4096 []
superblock 2654208, blocksize=4096 []

After than I tried: sudo fsck -b 32768 -B 4096 -n /dev/sdd3.

It gave a whole bunch of messages (see attached file for full log). However at the end there was the following error and seemed like it aborted:

Illegal double indirect block (2856403265) in inode 34720. IGNORED.
Illegal triple indirect block (1094795539) in inode 34720. IGNORED.
Error while iterating over blocks in inode 34720: Illegal triply indirect block found

/dev/sdd3: ********** WARNING: Filesystem still has errors **********

e2fsck: aborted

/dev/sdd3: ********** WARNING: Filesystem still has errors **********

I tried re-running with all of the other superblocks, but they all resulted in simillar error at the end of the log.

Where should I go next?

Re: Can't Mount Recovered Partition

Posted: 18 May 2016, 21:05
by dns323Sucks

I ran into the same problem. DNS323 told me it wants to format the new drive that I added but ended up formatting the old disk. I am looking into the testdisk, and it says it can recover files from ext2 partition, for Fat32 it says it can revover files and directories, so I am assuming that we can't just recover a bunch directories in ext2. With 2TB disk, it would be unreasonable to copy out file by file.

Which guide did you use to recover the partition? I am assuming here that recovering the parition means you update the parition table of the borked disk, so that the disk becomes readable by the file system.

Re: Can't Mount Recovered Partition

Posted: 19 May 2016, 06:40
by cgrenier
As the partition has been reformated, use PhotoRec to recover your data.

Re: Can't Mount Recovered Partition

Posted: 26 May 2016, 17:12
by netmind
I created a dd image and then decided to just run the fsck –y despite the errors – seemed to work.

I’m able to mount now. I think I got all or at least most of my files back.

Thanks for all the help.

@dns323sucks - reading through these 2 links helped me: ... ith-alt-f/