1 (edited by tchatzi 2017-02-21 16:37:21)

Topic: Wrong disk size - cant mount

My appologies if this is not the right place to ask a question like this but I can't find anyother forum or site that would help.

My disk is 1TB but suddenly I cant mount it anymore. It looks like it is only 512B

the /dev/sdb1 does not exists in /dev so I cannot mount it and ofcourse if I do

sudo mount /dev/sdb /mnt/sdb1

i get

mount: /dev/sdb: can't read superblock
# sudo fdisk /dev/sdb
Command (m for help): p
Disk /dev/sdb: 512 B, 512 bytes, 1 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xc6b7e2f7

Device     Boot Start        End    Sectors   Size Id Type
/dev/sdb1        2048 1953521663 1953519616 931,5G  7 HPFS/NTFS/exFAT
#sudo parted /dev/sdb
GNU Parted 3.2
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print                                                            
Error: Can't have a partition outside the disk!
Ignore/Cancel? i                                                          
Model: ATA SAMSUNG HN-M 11M (scsi)
Disk /dev/sdb: 512B
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  1000GB  1000GB  primary

this is the output from
# sudo dd if=/dev/sdb of=sdb-ahcomput.mbr bs=512 count=1
http://www.filedropper.com/sdb-ahcomput

this is the output from
# sudo sfdisk -d /dev/sdb > sdb-backup.txt

label: dos
label-id: 0xc6b7e2f7
device: /dev/sdb
unit: sectors

/dev/sdb1 : start=        2048, size=  1953519616, type=7

Any help would be much appreciated!

2

Re: Wrong disk size - cant mount

It appears that you are trying to mount the whole disk device (/dev/sdb), whereas the fdisk and parted output indicates that the file system is within the first primary partition (/dev/sdb1).

For example you might try:

sudo mdkir /tmp/mymount
sudo mount /dev/sdb1 /mnt/mymount

Regarding the error message:

Error: Can't have a partition outside the disk!

There is a tutorial for resolving this issue.  See How-to Fix Invalid MSDOS Partition Tables and more specifically the section How-to Fix Partition Outside the Disk.

3

Re: Wrong disk size - cant mount

Thanks for your reply,

First of all the problem is that, as I said, there is no device sdb1 in /dev to mount it.

and second the gparted and fdisk report the disk as 512B instead if 1TB and any change I make in sdb-backup.txt is not accepted by gparted nor fdisk

4 (edited by tchatzi 2017-02-21 20:32:25)

Re: Wrong disk size - cant mount

Apart from all these I just found out that the hexdumping the disk shows a lot of o bytes...and this is the whole and only output

# sudo hexdump -C /dev/sdb
00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000001b0  00 00 00 00 00 00 00 00  f7 e2 b7 c6 00 00 00 20  |............... |
000001c0  21 00 07 fe ff ff 00 08  00 00 00 58 70 74 00 00  |!..........Xpt..|
000001d0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000001f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 55 aa  |..............U.|
00000200

5

Re: Wrong disk size - cant mount

Did you try to analyze the drive with testdisk?
It is contained in the GParted livecd. It often helps to fix damaged MBR.

*** It is highly recommended to backup any important files before doing resize/move operations. ***

6

Re: Wrong disk size - cant mount

# testdrive /dev/sdb
Select a media (use Arrow keys, then press Enter):
>Disk /dev/sdb - 512 B - SAMSUNG HN-M 1MBB

as you can see it shows the disk as 512B

upon selecting "Analyze" it shows the following

Disk /dev/sdb - 512 B - CHS 1 255 63
Current partition structure:
     Partition                  Start        End    Size in sectors

Invalid NTFS or EXFAT boot
 1 P HPFS - NTFS              0  32 33 121601  25 24 1953519616
 1 P HPFS - NTFS              0  32 33 121601  25 24 1953519616

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

Search option and Deeper Search options return both

Disk /dev/sdb - 512 B - CHS 1 255 63
     Partition                  Start        End    Size in sectors
No partition found or selected for recovery

option Advanced -> Boot prints the following

Disk /dev/sdb - 512 B - CHS 1 255 63
     Partition                  Start        End    Size in sectors
 1 P HPFS - NTFS              0  32 33 121601  25 24 1953519616

Boot sector
ntfs_boot_sector: Can't read boot sector.
Status: Bad

Backup boot sector
ntfs_boot_sector: Can't read backup boot sector.
Status: Bad

Sectors are identical.

A valid NTFS Boot sector must be present in order to access
any data; even if the partition is not bootable.

I 'm running out of ideas

7

Re: Wrong disk size - cant mount

List option and Undelete both return

 1 P HPFS - NTFS              0  32 33 121601  25 24 1953519616



Can't open filesystem. Filesystem seems damaged.

8

Re: Wrong disk size - cant mount

"CHS 1 255 63"  seems strange.
I would think about some hardware problem.
I don't know what "Status: Bad" means in your last report (damaged content or damaged hardware).
You could look at the dmesg output as a first step.

*** It is highly recommended to backup any important files before doing resize/move operations. ***

9

Re: Wrong disk size - cant mount

Another idea you might try is to visit the manufacturers web site, locate any drive testing software they have, and then run that to test your disk device.

Note that such software may overwrite the contents of the disk so if you are are at all able it is advisable to backup as much of your data as possible before running the manufacturer drive testing software.

10 (edited by tchatzi 2017-02-23 16:41:47)

Re: Wrong disk size - cant mount

this all I could find in dmesg

[    0.905330] sd 3:0:0:0: [sdb] 1953525168 512-byte logical blocks: (1.00 TB/931 GiB)
[    0.905361] sd 3:0:0:0: [sdb] Write Protect is off
[    0.905363] sd 3:0:0:0: [sdb] Mode Sense: 00 3a 00 00
[    0.905372] sd 3:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    0.931866]  sdb: sdb1 sdb2 sdb3
[    0.932341] sd 3:0:0:0: [sdb] Attached SCSI disk

and this is all I could find in kern.log and syslog

Feb 22 14:15:43 egloo kernel: [    1.100239] sd 2:0:0:0: [sdb] 1 512-byte logical blocks: (512 B/512 B)
Feb 22 14:15:43 egloo kernel: [    1.100364] sd 2:0:0:0: [sdb] Write Protect is off
Feb 22 14:15:43 egloo kernel: [    1.100366] sd 2:0:0:0: [sdb] Mode Sense: 00 3a 00 00
Feb 22 14:15:43 egloo kernel: [    1.100394] sd 2:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Feb 22 14:15:43 egloo kernel: [    1.125266]  sdb: sdb1
Feb 22 14:15:43 egloo kernel: [    1.125269] sdb: p1 start 2048 is beyond EOD, enabling native capacity
Feb 22 14:15:43 egloo kernel: [    1.125699]  sdb: sdb1
Feb 22 14:15:43 egloo kernel: [    1.125704] sdb: p1 start 2048 is beyond EOD, truncated
Feb 22 14:15:43 egloo kernel: [    1.125897] sd 2:0:0:0: [sdb] Attached SCSI disk

I will search for a manufacturer software. I'll take an image of the disk first as you suggested ofcource.

11

Re: Wrong disk size - cant mount

ah great I can't even take a valid image of the disk

# sudo dd if=/dev/sdb of=/opt/backup/sdb/sdb.ddimg
1+0 records in
1+0 records out
512 bytes copied, 0,000879866 s, 582 kB/s

the fact that there is no /dev/sdb1 is what worries me

12

Re: Wrong disk size - cant mount

It sounds like a backup is not possible.  ;-(

I still suggest trying test software from the manufacturer's web site to test the drive.

Failing that, you might try the drive in another computer, or just write it off as a failed hard drive.

13

Re: Wrong disk size - cant mount

What about the SMART report?
sudo smartctl -a /dev/sdb
or
sudo smartctl -a -d ata /dev/sdb

It helped me to confirm hardware problems on a couple of hard drives in the past.

*** It is highly recommended to backup any important files before doing resize/move operations. ***