TestDisk - "This partition ends after the disk limits."

How to use TestDisk to recover lost partition
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read https://www.cgsecurity.org/testdisk.pdf
Locked
Message
Author
MarkHagan
Posts: 5
Joined: 06 Apr 2015, 10:15

TestDisk - "This partition ends after the disk limits."

#1 Post by MarkHagan »

Hello, I have a corrupt 2TB disk and have run TestDisk Analyse and Deeper Search but I am not sure how to proceed.

Some background also.

My Netgear ReadyNAS Duo v2 2TB disk reports as "corrupted boot"

I am running Ubuntu 14.04 LTS in dual boot with my Windows 8 preinstalled Dell Inspiron 660 with approx 0.5TB given to each OS.

I have the disk to be recovered connected by SATA USB Bridge. (shows as /dev/sdb).

I tried attaching the log file but it told me .log and .txt aren't allowed!

===============

Code: Select all


Sun Apr  5 09:19:46 2015
Command line: TestDisk

TestDisk 6.14, Data Recovery Utility, July 2013
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org
OS: Linux, kernel 3.13.0-48-generic (#80-Ubuntu SMP Thu Mar 12 11:16:15 UTC 2015) x86_64
Compiler: GCC 4.8
Compilation date: 2013-10-29T01:29:29
ext2fs lib: 1.42.9, ntfs lib: libntfs-3g, reiserfs lib: none, ewf lib: none
/dev/sda: LBA, HPA, LBA48, DCO support
/dev/sda: size       1953525168 sectors
/dev/sda: user_max   1953525168 sectors
/dev/sda: native_max 1953525168 sectors
Warning: can't get size for Disk /dev/mapper/control - 0 B - 1 sectors, sector size=512
Hard disk list
Disk /dev/sda - 1000 GB / 931 GiB - CHS 121601 255 63, sector size=512 - ST31000524AS, S/N:5VPD82CS, FW:JC4A
Disk /dev/sdb - 2000 GB / 1863 GiB - CHS 30400 255 63, sector size=4096 - WDC WD20 EFRX-68AX9N0

Partition table type (auto): Intel
Disk /dev/sdb - 2000 GB / 1863 GiB - WDC WD20 EFRX-68AX9N0
Partition table type: Intel

Analyse Disk /dev/sdb - 2000 GB / 1863 GiB - CHS 30400 255 63
Geometry from i386 MBR: head=256 sector=63
check_part_i386 1 type EE: no test
Current partition structure:
 1 P EFI GPT                  0   0  2 243201  80 63 3907029167

Warning: Bad ending head (CHS and LBA don't match)
No partition is bootable

search_part()
Disk /dev/sdb - 2000 GB / 1863 GiB - CHS 30400 255 63

recover_EXT2: s_block_group_nr=0/31, s_mnt_count=1/38, s_blocks_per_group=32768, s_inodes_per_group=2048
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1048317
recover_EXT2: part_size 1048317
     Linux                   28 170 15    93 235 11    1048317
     ext3 blocksize=4096 Large file Sparse superblock Recover, 4293 MB / 4094 MiB

recover_EXT2: s_block_group_nr=0/14788, s_mnt_count=16/4294967295, s_blocks_per_group=32768, s_inodes_per_group=2048
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 484573184
recover_EXT2: part_size 484573184
     Linux                15154  74 25 45317 147 14  484573184
     ext4 blocksize=4096 Large file Sparse superblock Recover, 1984 GB / 1848 GiB
This partition ends after the disk limits. (start=243453696, size=484573184, end=728026879, disk end=488378646)
Disk /dev/sdb - 2000 GB / 1863 GiB - CHS 30400 255 63
Check the harddisk size: HD jumpers settings, BIOS detection...
The harddisk (2000 GB / 1863 GiB) seems too small! (< 2981 GB / 2777 GiB)
The following partition can't be recovered:
     Linux                15154  74 25 45317 147 14  484573184
     ext4 blocksize=4096 Large file Sparse superblock Recover, 1984 GB / 1848 GiB

Results
   * Linux                   28 170 15    93 235 14    1048320
     ext3 blocksize=4096 Large file Sparse superblock Recover, 4293 MB / 4095 MiB


dir_partition inode=2
   * Linux                   28 170 15    93 235 14    1048320
     ext3 blocksize=4096 Large file Sparse superblock Recover, 4293 MB / 4095 MiB
ext2fs_dir_iterate failed with error 1.
Directory /

interface_write()
 1 * Linux                   28 170 15    93 235 14    1048320

search_part()
Disk /dev/sdb - 2000 GB / 1863 GiB - CHS 30400 255 63
file_pread(5,3,buffer,8(0/0/9)) read err: Partial read
file_pread(5,2,buffer,8(0/0/9)) read err: Partial read

recover_EXT2: s_block_group_nr=0/31, s_mnt_count=1/38, s_blocks_per_group=32768, s_inodes_per_group=2048
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1048317
recover_EXT2: part_size 1048317
     Linux                   28 170 15    93 235 11    1048317
     ext3 blocksize=4096 Large file Sparse superblock Recover, 4293 MB / 4094 MiB

recover_EXT2: s_block_group_nr=0/31, s_mnt_count=1/38, s_blocks_per_group=32768, s_inodes_per_group=2048
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1048317
recover_EXT2: part_size 1048317
     Linux                   28 182 27    93 247 23    1048317
     ext3 blocksize=4096 Large file Sparse superblock Recover, 4293 MB / 4094 MiB

recover_EXT2: s_block_group_nr=0/31, s_mnt_count=1/38, s_blocks_per_group=32768, s_inodes_per_group=2048
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1048317
recover_EXT2: part_size 1048317
     Linux                   28 247 28    94  57 24    1048317
     ext3 blocksize=4096 Large file Sparse superblock Recover, 4293 MB / 4094 MiB

recover_EXT2: s_block_group_nr=0/31, s_mnt_count=1/38, s_blocks_per_group=32768, s_inodes_per_group=2048
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1048317
recover_EXT2: part_size 1048317
     Linux                   29   0  1    94  64 60    1048317
     ext3 blocksize=4096 Large file Sparse superblock Recover, 4293 MB / 4094 MiB

recover_EXT2: s_block_group_nr=0/31, s_mnt_count=1/38, s_blocks_per_group=32768, s_inodes_per_group=2048
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1048317
recover_EXT2: part_size 1048317
     Linux                   29  33  5    94  98  1    1048317
     ext3 blocksize=4096 Large file Sparse superblock Recover, 4293 MB / 4094 MiB

recover_EXT2: s_block_group_nr=0/31, s_mnt_count=1/38, s_blocks_per_group=32768, s_inodes_per_group=2048
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1048317
recover_EXT2: part_size 1048317
     Linux                   29  73 45    94 138 41    1048317
     ext3 blocksize=4096 Large file Sparse superblock Recover, 4293 MB / 4094 MiB

recover_EXT2: s_block_group_nr=0/14788, s_mnt_count=16/4294967295, s_blocks_per_group=32768, s_inodes_per_group=2048
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 484573184
recover_EXT2: part_size 484573184
     Linux                15154  74 25 45317 147 14  484573184
     ext4 blocksize=4096 Large file Sparse superblock Recover, 1984 GB / 1848 GiB
This partition ends after the disk limits. (start=243453696, size=484573184, end=728026879, disk end=488378646)
Disk /dev/sdb - 2000 GB / 1863 GiB - CHS 30400 255 63
Check the harddisk size: HD jumpers settings, BIOS detection...
The harddisk (2000 GB / 1863 GiB) seems too small! (< 2981 GB / 2777 GiB)
The following partition can't be recovered:
     Linux                15154  74 25 45317 147 14  484573184
     ext4 blocksize=4096 Large file Sparse superblock Recover, 1984 GB / 1848 GiB
get_geometry_from_list_part_aux head=255 nbr=1
get_geometry_from_list_part_aux head=255 nbr=1

Results
     Linux                   28 170 15    93 235 14    1048320
     ext3 blocksize=4096 Large file Sparse superblock Recover, 4293 MB / 4095 MiB
     Linux                   28 182 27    93 247 26    1048320
     ext3 blocksize=4096 Large file Sparse superblock Recover, 4293 MB / 4095 MiB
     Linux                   28 247 28    94  57 27    1048320
     ext3 blocksize=4096 Large file Sparse superblock Recover, 4293 MB / 4095 MiB
     Linux                   29   0  1    94 254 63    1060290
     ext3 blocksize=4096 Large file Sparse superblock Recover, 4342 MB / 4141 MiB
     Linux                   29  33  5    94  98  4    1048320
     ext3 blocksize=4096 Large file Sparse superblock Recover, 4293 MB / 4095 MiB
     Linux                   29  73 45    94 138 44    1048320
     ext3 blocksize=4096 Large file Sparse superblock Recover, 4293 MB / 4095 MiB


dir_partition inode=2
     Linux                   28 170 15    93 235 14    1048320
     ext3 blocksize=4096 Large file Sparse superblock Recover, 4293 MB / 4095 MiB
ext2fs_dir_iterate failed with error 1.
Directory /


dir_partition inode=2
     Linux                   28 182 27    93 247 26    1048320
     ext3 blocksize=4096 Large file Sparse superblock Recover, 4293 MB / 4095 MiB
ext2fs_dir_iterate failed with error 1.
Directory /


dir_partition inode=2
     Linux                   28 247 28    94  57 27    1048320
     ext3 blocksize=4096 Large file Sparse superblock Recover, 4293 MB / 4095 MiB
ext2fs_dir_iterate failed with error 1.
Directory /


dir_partition inode=2
     Linux                   29   0  1    94 254 63    1060290
     ext3 blocksize=4096 Large file Sparse superblock Recover, 4342 MB / 4141 MiB
ext2fs_dir_iterate failed with error 1.
Directory /


dir_partition inode=2
     Linux                   29  33  5    94  98  4    1048320
     ext3 blocksize=4096 Large file Sparse superblock Recover, 4293 MB / 4095 MiB
ext2fs_dir_iterate failed with error 1.
Directory /


dir_partition inode=2
     Linux                   29  73 45    94 138 44    1048320
     ext3 blocksize=4096 Large file Sparse superblock Recover, 4293 MB / 4095 MiB
ext2fs_dir_iterate failed with error 1.
Directory /

interface_write()
 
No partition found or selected for recovery
simulate write!

write_mbr_i386: starting...
write_all_log_i386: starting...
No extended partition

TestDisk exited normally.

User avatar
cgrenier
Site Admin
Posts: 5432
Joined: 18 Feb 2012, 15:08
Location: Le Perreux Sur Marne, France
Contact:

Re: TestDisk - "This partition ends after the disk limits."

#2 Post by cgrenier »

Can you try using TestDisk 7.0-WIP ?

MarkHagan
Posts: 5
Joined: 06 Apr 2015, 10:15

Re: TestDisk - "This partition ends after the disk limits."

#3 Post by MarkHagan »

Hi,

Thanks for responding. I have run it with 7.0-WIP as suggested and there are slightly different results but still no real sign that it might have found anything.

Code: Select all



Tue Apr  7 09:37:49 2015
Command line: TestDisk

TestDisk 7.0-WIP, Data Recovery Utility, March 2015
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org
OS: Linux, kernel 3.13.0-48-generic (#80-Ubuntu SMP Thu Mar 12 11:16:15 UTC 2015) x86_64
Compiler: GCC 4.4
Compilation date: 2015-04-05T19:53:59
ext2fs lib: 1.42.8, ntfs lib: libntfs-3g, reiserfs lib: 0.3.1-rc8, ewf lib: 20120504
/dev/sda: LBA, HPA, LBA48, DCO support
/dev/sda: size       1953525168 sectors
/dev/sda: user_max   1953525168 sectors
/dev/sda: native_max 1953525168 sectors
Warning: can't get size for Disk /dev/mapper/control - 0 B - 0 sectors, sector size=512
Hard disk list
Disk /dev/sda - 1000 GB / 931 GiB - CHS 121601 255 63, sector size=512 - ST31000524AS, S/N:5VPD82CS, FW:JC4A
Disk /dev/sdb - 2000 GB / 1863 GiB - CHS 30400 255 63, sector size=4096 - WDC WD20 EFRX-68AX9N0

Partition table type (auto): Intel
Disk /dev/sdb - 2000 GB / 1863 GiB - WDC WD20 EFRX-68AX9N0
Partition table type: Intel

Analyse Disk /dev/sdb - 2000 GB / 1863 GiB - CHS 30400 255 63
Geometry from i386 MBR: head=256 sector=63
check_part_i386 1 type EE: no test
Current partition structure:
 1 P EFI GPT                  0   0  2 243201  80 63 3907029167

Warning: Bad ending head (CHS and LBA don't match)
No partition is bootable

search_part()
Disk /dev/sdb - 2000 GB / 1863 GiB - CHS 30400 255 63

recover_EXT2: s_block_group_nr=0/31, s_mnt_count=1/38, s_blocks_per_group=32768, s_inodes_per_group=2048
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1048317
recover_EXT2: part_size 1048317
     Linux                   28 170 15    93 235 11    1048317
     ext3 blocksize=4096 Large file Sparse superblock Recover, 4293 MB / 4094 MiB

recover_EXT2: s_block_group_nr=0/14788, s_mnt_count=16/4294967295, s_blocks_per_group=32768, s_inodes_per_group=2048
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 484573184
recover_EXT2: part_size 484573184
     Linux                15154  74 25 45317 147 14  484573184
     ext4 blocksize=4096 Large file Sparse superblock Recover, 1984 GB / 1848 GiB
This partition ends after the disk limits. (start=243453696, size=484573184, end=728026879, disk end=488378646)
Disk /dev/sdb - 2000 GB / 1863 GiB - CHS 30400 255 63
Check the harddisk size: HD jumpers settings, BIOS detection...
The harddisk (2000 GB / 1863 GiB) seems too small! (< 2981 GB / 2777 GiB)
The following partition can't be recovered:
     Linux                15154  74 25 45317 147 14  484573184
     ext4 blocksize=4096 Large file Sparse superblock Recover, 1984 GB / 1848 GiB

Results
   * Linux                   28 170 15    93 235 14    1048320
     ext3 blocksize=4096 Large file Sparse superblock Recover, 4293 MB / 4095 MiB

Hint for advanced users. dmsetup may be used if you prefer to avoid to rewrite the partition table for the moment:
echo "0 8386560 linear /dev/sdb 3684352" | dmsetup create test0


dir_partition inode=2
   * Linux                   28 170 15    93 235 14    1048320
     ext3 blocksize=4096 Large file Sparse superblock Recover, 4293 MB / 4095 MiB
ext2fs_dir_iterate failed with error 1.
Directory /

interface_write()
 1 * Linux                   28 170 15    93 235 14    1048320

search_part()
Disk /dev/sdb - 2000 GB / 1863 GiB - CHS 30400 255 63
file_pread(5,3,buffer,8(0/0/9)) read err: Partial read
file_pread(5,2,buffer,8(0/0/9)) read err: Partial read

recover_EXT2: s_block_group_nr=0/31, s_mnt_count=1/38, s_blocks_per_group=32768, s_inodes_per_group=2048
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1048317
recover_EXT2: part_size 1048317
     Linux                   28 170 15    93 235 11    1048317
     ext3 blocksize=4096 Large file Sparse superblock Recover, 4293 MB / 4094 MiB

recover_EXT2: s_block_group_nr=0/31, s_mnt_count=1/38, s_blocks_per_group=32768, s_inodes_per_group=2048
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1048317
recover_EXT2: part_size 1048317
     Linux                   28 182 27    93 247 23    1048317
     ext3 blocksize=4096 Large file Sparse superblock Recover, 4293 MB / 4094 MiB

recover_EXT2: s_block_group_nr=0/31, s_mnt_count=1/38, s_blocks_per_group=32768, s_inodes_per_group=2048
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1048317
recover_EXT2: part_size 1048317
     Linux                   28 247 28    94  57 24    1048317
     ext3 blocksize=4096 Large file Sparse superblock Recover, 4293 MB / 4094 MiB

recover_EXT2: s_block_group_nr=0/31, s_mnt_count=1/38, s_blocks_per_group=32768, s_inodes_per_group=2048
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1048317
recover_EXT2: part_size 1048317
     Linux                   29   0  1    94  64 60    1048317
     ext3 blocksize=4096 Large file Sparse superblock Recover, 4293 MB / 4094 MiB

recover_EXT2: s_block_group_nr=0/31, s_mnt_count=1/38, s_blocks_per_group=32768, s_inodes_per_group=2048
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1048317
recover_EXT2: part_size 1048317
     Linux                   29  33  5    94  98  1    1048317
     ext3 blocksize=4096 Large file Sparse superblock Recover, 4293 MB / 4094 MiB

recover_EXT2: s_block_group_nr=0/31, s_mnt_count=1/38, s_blocks_per_group=32768, s_inodes_per_group=2048
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1048317
recover_EXT2: part_size 1048317
     Linux                   29  73 45    94 138 41    1048317
     ext3 blocksize=4096 Large file Sparse superblock Recover, 4293 MB / 4094 MiB

recover_EXT2: s_block_group_nr=0/14788, s_mnt_count=16/4294967295, s_blocks_per_group=32768, s_inodes_per_group=2048
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 484573184
recover_EXT2: part_size 484573184
     Linux                15154  74 25 45317 147 14  484573184
     ext4 blocksize=4096 Large file Sparse superblock Recover, 1984 GB / 1848 GiB
This partition ends after the disk limits. (start=243453696, size=484573184, end=728026879, disk end=488378646)
Disk /dev/sdb - 2000 GB / 1863 GiB - CHS 30400 255 63
Check the harddisk size: HD jumpers settings, BIOS detection...
The harddisk (2000 GB / 1863 GiB) seems too small! (< 2981 GB / 2777 GiB)
The following partition can't be recovered:
     Linux                15154  74 25 45317 147 14  484573184
     ext4 blocksize=4096 Large file Sparse superblock Recover, 1984 GB / 1848 GiB
get_geometry_from_list_part_aux head=255 nbr=1
get_geometry_from_list_part_aux head=255 nbr=1

Results
     Linux                   28 170 15    93 235 14    1048320
     ext3 blocksize=4096 Large file Sparse superblock Recover, 4293 MB / 4095 MiB
     Linux                   28 182 27    93 247 26    1048320
     ext3 blocksize=4096 Large file Sparse superblock Recover, 4293 MB / 4095 MiB
     Linux                   28 247 28    94  57 27    1048320
     ext3 blocksize=4096 Large file Sparse superblock Recover, 4293 MB / 4095 MiB
     Linux                   29   0  1    94 254 63    1060290
     ext3 blocksize=4096 Large file Sparse superblock Recover, 4342 MB / 4141 MiB
     Linux                   29  33  5    94  98  4    1048320
     ext3 blocksize=4096 Large file Sparse superblock Recover, 4293 MB / 4095 MiB
     Linux                   29  73 45    94 138 44    1048320
     ext3 blocksize=4096 Large file Sparse superblock Recover, 4293 MB / 4095 MiB

Hint for advanced users. dmsetup may be used if you prefer to avoid to rewrite the partition table for the moment:
echo "0 8386560 linear /dev/sdb 3684352" | dmsetup create test0
echo "0 8386560 linear /dev/sdb 3690496" | dmsetup create test1
echo "0 8386560 linear /dev/sdb 3723264" | dmsetup create test2
echo "0 8482320 linear /dev/sdb 3727080" | dmsetup create test3
echo "0 8386560 linear /dev/sdb 3743744" | dmsetup create test4
echo "0 8386560 linear /dev/sdb 3764224" | dmsetup create test5


dir_partition inode=2
     Linux                   28 170 15    93 235 14    1048320
     ext3 blocksize=4096 Large file Sparse superblock Recover, 4293 MB / 4095 MiB
ext2fs_dir_iterate failed with error 1.
Directory /


dir_partition inode=2
   L Linux                   28 170 15    93 235 14    1048320
     ext3 blocksize=4096 Large file Sparse superblock Recover, 4293 MB / 4095 MiB
ext2fs_dir_iterate failed with error 1.
Directory /


dir_partition inode=2
   L Linux                   28 182 27    93 247 26    1048320
     ext3 blocksize=4096 Large file Sparse superblock Recover, 4293 MB / 4095 MiB
ext2fs_dir_iterate failed with error 1.
Directory /


dir_partition inode=2
   L Linux                   28 247 28    94  57 27    1048320
     ext3 blocksize=4096 Large file Sparse superblock Recover, 4293 MB / 4095 MiB
ext2fs_dir_iterate failed with error 1.
Directory /


dir_partition inode=2
   P Linux                   29   0  1    94 254 63    1060290
     ext3 blocksize=4096 Large file Sparse superblock Recover, 4342 MB / 4141 MiB
ext2fs_dir_iterate failed with error 1.
Directory /


dir_partition inode=2
   L Linux                   29  33  5    94  98  4    1048320
     ext3 blocksize=4096 Large file Sparse superblock Recover, 4293 MB / 4095 MiB
ext2fs_dir_iterate failed with error 1.
Directory /


dir_partition inode=2
   L Linux                   29  73 45    94 138 44    1048320
     ext3 blocksize=4096 Large file Sparse superblock Recover, 4293 MB / 4095 MiB
ext2fs_dir_iterate failed with error 1.
Directory /
Invalid partition structure.

TestDisk exited normally.

MarkHagan
Posts: 5
Joined: 06 Apr 2015, 10:15

Re: TestDisk - "This partition ends after the disk limits."

#4 Post by MarkHagan »

Oh and also, I changed the partition types to L or P from D just to see if I could list files with the 'p' command but all gave the response 'No file system found'.

The one that was P didn't have the option to be L.

MarkHagan
Posts: 5
Joined: 06 Apr 2015, 10:15

Re: TestDisk - "This partition ends after the disk limits."

#5 Post by MarkHagan »

Hello again.

I managed to backup the disk to a new 2TB WD Red drive using ddrescue but this time have them both installed internally with direct SATA cables rather than the USB bridge.

Testdisk now sees more information and that the disk is RAID. I gives the message 'Invalid RAID superblock' but I can list the files in the MS Data partition but I don't know if this is all my files.

I am attaching the log. Can you please tell me what my next step should be? Many thanks.

Code: Select all



Mon Apr 13 09:51:40 2015
Command line: TestDisk

TestDisk 7.0-WIP, Data Recovery Utility, April 2015
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org
OS: Linux, kernel 3.13.0-49-generic (#81-Ubuntu SMP Tue Mar 24 19:29:48 UTC 2015) x86_64
Compiler: GCC 4.4
Compilation date: 2015-04-11T18:14:07
ext2fs lib: 1.42.8, ntfs lib: libntfs-3g, reiserfs lib: 0.3.1-rc8, ewf lib: 20120504
/dev/sda: LBA, HPA, LBA48, DCO support
/dev/sda: size       1953525168 sectors
/dev/sda: user_max   1953525168 sectors
/dev/sda: native_max 1953525168 sectors
/dev/sdb: LBA, HPA, LBA48, DCO support
/dev/sdb: size       3907029168 sectors
/dev/sdb: user_max   3907029168 sectors
/dev/sdb: native_max 3907029168 sectors
/dev/sdc: LBA, HPA, LBA48, DCO support
/dev/sdc: size       3907029168 sectors
/dev/sdc: user_max   3907029168 sectors
/dev/sdc: native_max 3907029168 sectors
Warning: can't get size for Disk /dev/mapper/control - 0 B - 0 sectors, sector size=512
Hard disk list
Disk /dev/sda - 1000 GB / 931 GiB - CHS 121601 255 63, sector size=512 - ST31000524AS, S/N:5VPD82CS, FW:JC4A
Disk /dev/sdb - 2000 GB / 1863 GiB - CHS 243201 255 63, sector size=512 - WDC WD20EFRX-68EUZN0, S/N:WD-WCC4M7YVYDFT, FW:82.00A82
Disk /dev/sdc - 2000 GB / 1863 GiB - CHS 243201 255 63, sector size=512 - WDC WD20EFRX-68AX9N0, S/N:WD-WMC300796124, FW:80.00A80

Partition table type (auto): EFI GPT
Disk /dev/sdb - 2000 GB / 1863 GiB - WDC WD20EFRX-68EUZN0
Partition table type: EFI GPT

Analyse Disk /dev/sdb - 2000 GB / 1863 GiB - CHS 243201 255 63
hdr_size=92
hdr_lba_self=1
hdr_lba_alt=3907029167 (expected 3907029167)
hdr_lba_start=34
hdr_lba_end=3907029134
hdr_lba_table=2
hdr_entries=128
hdr_entsz=128
check_part_gpt failed for partition
 1 P Linux Raid                    64    8388671    8388608
Current partition structure:
Invalid RAID superblock
 1 P Linux Raid                    64    8388671    8388608
 1 P Linux Raid                    64    8388671    8388608
 2 P Linux Raid               8388672    9437247    1048576 [2CB05DBEC8B5:1]
 3 P Linux Raid               9437248 3907025072 3897587825 [2CB05DBEC8B5:2]

search_part()
Disk /dev/sdb - 2000 GB / 1863 GiB - CHS 243201 255 63

recover_EXT2: s_block_group_nr=0/31, s_mnt_count=1/38, s_blocks_per_group=32768, s_inodes_per_group=2048
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1048317
recover_EXT2: part_size 8386536
     MS Data                     2112    8388647    8386536
     ext3 blocksize=4096 Large file Sparse superblock Recover, 4293 MB / 4094 MiB

Raid magic value at 522/43/34
Raid apparent size: 1619297892 sectors
2CB05DBEC8B5:1 md 1.x L.Endian Raid 1 - Array Slot : 0 (0)
     Linux Raid               8388672    9437231    1048560 [2CB05DBEC8B5:1]
     md 1.x L.Endian Raid 1 - Array Slot : 0 (0), 536 MB / 511 MiB

Raid magic value at 587/112/38
Raid apparent size: 1619297892 sectors
2CB05DBEC8B5:2 md 1.x L.Endian Raid 1 - Array Slot : 0 (0, failed)
     Linux Raid               9437248 3907022759 3897585512 [2CB05DBEC8B5:2]
     md 1.x L.Endian Raid 1 - Array Slot : 0 (0, failed), 1995 GB / 1858 GiB

Results
   P MS Data                     2112    8388647    8386536
     ext3 blocksize=4096 Large file Sparse superblock Recover, 4293 MB / 4094 MiB
   P Linux Raid               8388672    9437231    1048560 [2CB05DBEC8B5:1]
     md 1.x L.Endian Raid 1 - Array Slot : 0 (0), 536 MB / 511 MiB
   P Linux Raid               9437248 3907022759 3897585512 [2CB05DBEC8B5:2]
     md 1.x L.Endian Raid 1 - Array Slot : 0 (0, failed), 1995 GB / 1858 GiB

Hint for advanced users. dmsetup may be used if you prefer to avoid to rewrite the partition table for the moment:
echo "0 8386536 linear /dev/sdb 2112" | dmsetup create test0
echo "0 1048560 linear /dev/sdb 8388672" | dmsetup create test1
echo "0 3897585512 linear /dev/sdb 9437248" | dmsetup create test2

   P Linux Raid               9437248 3907022759 3897585512 [2CB05DBEC8B5:2]
     md 1.x L.Endian Raid 1 - Array Slot : 0 (0, failed), 1995 GB / 1858 GiB
Support for this filesystem hasn't been implemented.

   P Linux Raid               8388672    9437231    1048560 [2CB05DBEC8B5:1]
     md 1.x L.Endian Raid 1 - Array Slot : 0 (0), 536 MB / 511 MiB
Support for this filesystem hasn't been implemented.


dir_partition inode=2
   P MS Data                     2112    8388647    8386536
     ext3 blocksize=4096 Large file Sparse superblock Recover, 4293 MB / 4094 MiB
Directory /
       2 drwxr-xr-x    98     98      4096  2-Feb-2015 04:39 .
       2 drwxr-xr-x    98     98      4096  2-Feb-2015 04:39 ..
      11 drwx------     0      0     16384 14-Feb-2013 03:32 lost+found
   34817 drwxrwxrwt     0      0      4096  2-Feb-2015 15:08 tmp
   30721 drwxr-xr-x     0      0      4096  7-Mar-2011 10:59 srv
   45057 drwxr-xr-x     0      0      4096 22-Mar-2011 13:37 ramfs
   40961 drwxr-xr-x     0      0      4096 14-Feb-2013 11:35 opt
   18433 drwxr-xr-x     0      0      4096 14-Feb-2013 03:33 lib
   36865 drwxr-xr-x     0      0      4096 14-Feb-2013 03:33 usr
    8193 drwxr-xr-x     0      0      4096 14-Feb-2013 03:33 bin
   32769 drwxr-xr-x     0      0      4096 14-Feb-2013 03:33 home
   57345 drwxr-xr-x     0      0      4096 26-Dec-2014 13:20 etc
    2049 drwxr-xr-x     0      0      4096 22-Mar-2011 13:39 mnt
    4097 drwxr-xr-x     0      0      4096 22-Mar-2011 13:37 c
   14337 drwxr-xr-x     0      0      4096 14-Aug-2012 03:56 dev
   10241 drwxr-xr-x     0      0      4096 22-Mar-2011 13:37 sys
    6145 drwxr-xr-x     0      0      4096 14-Feb-2013 11:37 var
   63489 drwxr-xr-x     0      0      4096 22-Mar-2011 13:40 USB
   12289 drwxr-xr-x     0      0      4096 22-Mar-2011 13:39 initrd
   16385 drwx------     0      0      4096 14-Feb-2013 11:36 root
   20481 drwxr-xr-x     0      0      4096 21-Jul-2010 09:36 selinux
   22529 drwxr-xr-x     0      0      4096  3-Oct-2011 03:53 boot
   24577 drwxr-xr-x     0      0      4096 14-Feb-2013 03:33 sbin
   26625 drwxr-xr-x    98     98      4096 14-Feb-2013 03:33 frontview
   63490 drwxr-xr-x     0      0      4096 22-Mar-2011 13:37 proc
      12 lrwxrwxrwx     0      0        12  2-Mar-2013 09:50 Documents
X     13 -rw-------     0      0         0  2-Feb-2015 04:39 org.netatalk.supports-eas.gTeCH1
      15 -rw-r--r--     0      0  24197120 14-Feb-2013 11:35 files.tar
      16 -rw-r--r--     0      0         0 14-Feb-2013 11:35 .update_success
      17 -rw-------     0      0      1024 14-Feb-2013 11:36 .rnd
      18 lrwxrwxrwx     0      0         9 14-Feb-2013 11:37 backup
      19 lrwxrwxrwx     0      0         8 14-Feb-2013 11:37 media
X     20 -rw-------     0      0         0 26-Dec-2014 13:20 org.netatalk.supports-eas.ps2X5t

interface_write()
 1 P MS Data                     2112    8388647    8386536
 2 P Linux Raid               8388672    9437231    1048560 [2CB05DBEC8B5:1]
 3 P Linux Raid               9437248 3907022759 3897585512 [2CB05DBEC8B5:2]
simulate write!

TestDisk exited normally.

User avatar
cgrenier
Site Admin
Posts: 5432
Joined: 18 Feb 2012, 15:08
Location: Le Perreux Sur Marne, France
Contact:

Re: TestDisk - "This partition ends after the disk limits."

#6 Post by cgrenier »

You should be able to mount the files from the 2 raid partitions and copy the files.
Bypassing the RAID, as root, try

Code: Select all

mkdir /mnt/sdb2 /mnt/sdb3
mount -o ro /dev/sdb2 /mnt/sdb2
mount -o ro /dev/sdb3 /mnt/sdb3
ls /mnt/sdb2 /mnt/sdb3
Once it's done, reinstall your NAS system. I fyo are lucky, you will not have to restore your data.

MarkHagan
Posts: 5
Joined: 06 Apr 2015, 10:15

Re: TestDisk - "This partition ends after the disk limits."

#7 Post by MarkHagan »

Thanks Christophe!

Coincidentally I tried to mount the device but it complained about the unknown filesystem

Code: Select all

mark@mark-Inspiron-660:/$ sudo mount /dev/sdb3 /mnt/sdb-backup/
mount: unknown filesystem type 'linux_raid_member'
I searched the error and doing the following created two RAID arrays

sudo mdadm --assemble --scan

And then I was able to access the disk with the data on it as a logical volume (which I also had to research).

Code: Select all

mark@mark-Inspiron-660:~$ sudo pvs 
[sudo] password for mark:    
/dev/sdc1: read failed after 0 of 4096 at 4096: Input/output error   
PV         VG   Fmt  Attr PSize PFree    
/dev/md2   c    lvm2 a--  1.81t 10.00g 

mark@mark-Inspiron-660:~$ sudo lvdisplay   
/dev/sdc1: read failed after 0 of 4096 at 4096: Input/output error   
--- Logical volume ---   
LV Path                /dev/c/c   
LV Name                c   
VG Name                c   
LV UUID                v3f2ty-50Ig-4rDe-57De-dlJD-8Sx5-mKJc32   
LV Write Access        read/write   
LV Creation host, time ,    
LV Status              NOT available   
LV Size                1.81 TiB   
Current LE             29576   
Segments               1   
Allocation             inherit   
Read ahead sectors     auto

 mark@mark-Inspiron-660:~$ sudo vgchange -ay c   
1 logical volume(s) in volume group "c" now active 

mark@mark-Inspiron-660:~$ sudo mount /dev/c/c /mnt/sdb-backup/ 
mark@mark-Inspiron-660:~$ ls -l /mnt/sdb-backup/ 
total 48 
-rw------- 1 root   root     7168 Jan 30 23:17 aquota.group 
-rw------- 1 root   root     8192 Jan 30 23:17 aquota.user 
drwxrwxrwt 4 nobody nogroup  4096 Jan 30  2014 backup 
drwxrwxrwx 6 nobody nogroup  4096 Mar 26  2013 Documents 
drwxr-xr-x 3     98      98  4096 Feb 14  2013 home 
drwx------ 2 root   root    16384 Feb 14  2013 lost+found 
drwxrwxrwt 5 nobody nogroup  4096 Feb 14  2013 media

FYI the /dev/sdc1 is the original bad disk device not the new image which is /dev/sdb.

It appears the disks weren't in as bad shape as I'd thought and the ddrescue seems to have made a good image!

Thank you for all your time and help.

Mark

Locked