1

I'm a Linux noob, just now migrating from Windows. This is my first question to the community, and I hope I get the forms right. I've looked around at the other similar questions here, but none seem to apply exactly to my situation, or else I just can't adapt their solutions to my specific case.

I have an external Western Digital 1 TB USB 2.0 hard drive that I'm trying to connect to my Ubuntu 12.04 Precise Pangolin computer. When I plug it in, I get an error looking like this:

    Unable to mount Elements 1T
Error mounting: mount exited with exit code 12: Failed to read last sector (1953523119): Invalid argument
HINTS: Either the volume is a RAID/LDM but it wasn't setup yet,
    or it was not setup correctly (e.g. by not using mdadm -build...),
    or a wrong device is tried to be mounted,
    or the partition table is corrupt (NTFS size is not valid).
Failed to mount '/dev/sdb1': Invalid argument
The device '/dev/sdb1' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?

When I check the partition with Disk utility, it sees the partition, but cannot mount it:

    Error mounting volume
An error occurred while performing an operation on "Elements 1T" (Partition 1 of WD WDCWD1oEADS-11M2B2): The operation failed
Details
Error mounting: mount exited with exit code 12: Failed to read last sector (1953523119): Invalid argument

It also shows this info:

Usage: File system
Partition Type: HPFS/NTFS (0x07)
Partition Flags: Bootable
Type: NTFS
Label: Elements 1T
Device: /dev/sdb1
Partition Label: -
Capacity: 1.0 TB (...bytes)
Available: -
Mount Point: Not Mounted

Check file system Returns: File system is not clean

Gparted, on the other hand, can't see the partition at all, it thinks the entire disk space is unallocated.

From some of the error codes and stuff I've gotten on terminal commands like fdisk etc. I hypothesize that the problem might be that Linux doesn't allow spaces in device names, can that be the problem? However, none of my disk utilities can change the names.

I know you guys usually want to see outputs from certain commands such as fdisk and cat, but if so you'll have to walk me through it, I don't know what I'm doing :-)

Grateful for all help M. Northstar

EDIT 1

The output of sudo ntfsck /dev/sdb1 that douggo suggested is this:

Failed to read last sector (1953523119): Invalid argument
HINTS: Either the volume is a RAID/LDM but it wasn't setup yet,
   or it was not setup correctly (e.g. by not using mdadm --build ...),
   or a wrong device is tried to be mounted,
   or the partition table is corrupt (partition is smaller than NTFS),
   or the NTFS boot sector is corrupt (NTFS size is not valid).
Failed to read file record at offset -5553569967260305760 (0xb2edc189f22bf6a0).
Loading $MFT runlist failed. Trying $MFTMirr.
Failed to read file record at offset -5561604126825345472 (0xb2d13683673a8e40).
Loading $MFTMirr runlist failed too. Aborting.
Failed to read last sector (1953523119): Invalid argument
HINTS: Either the volume is a RAID/LDM but it wasn't setup yet,
   or it was not setup correctly (e.g. by not using mdadm --build ...),
   or a wrong device is tried to be mounted,
   or the partition table is corrupt (partition is smaller than NTFS),
   or the NTFS boot sector is corrupt (NTFS size is not valid).

As you can see, two blocks with the same error I got before, with some new info sandwiched in between.

EDIT 2

As suggested by douggro, the output of chkdsk (translated by me from Swedish) is:

CHKDSK is verifying files
 33536 files processed
File verification completed
 3 large file records processed
 0 bad file records processed
 0 EA records processed
 0 reparse records processed
CHKDSK is verifying indexes
 38674 index entries processed
Index verification completed
 0 unindexed files scanned
 0 unindexed files recovered
CHKDSK is verifying security descriptors
 33536 file SDs/SIDs processed
Security descriptor verification completed
 2570 data files processed
CHKDSK is verifying the USN journal
 37004568 USN bytes processed
Verification of USN journal completed
Windows has checked the file system and found no problems

976761559 kB total disk space
620445736 kB in 27005 files
    14512 kB in 2571 indexes
     2820 kB in bad sectors
   165667 kB in use by the system
    65536 kB occupied by the log file
356132824 kB available on disk

     4096 byte in each allocation unit
244190389 total allocation units on disk
  8903206 allocation units available on disk
Elder Geek
  • 36,023
  • 25
  • 98
  • 183
M. Northstar
  • 11
  • 1
  • 4
  • Do you have a Windows computer that you can run CheckDisk with? Your problem is similar to this one. You could also try sudo ntfsck /dev/sdb1 to scan for filesystem errors. – douggro Dec 24 '13 at 14:12
  • @douggro getting the hard drive back to my Windows unit is somewhat elaborate, it can be done in a pinch, however this drive was working just fine in the windows machine just hours ago. And that other question does seem very much like mine, but not entirely, as he got an exit code 1 error; plus they never got a solution (thank you for pointing it out to me, BTW, funny how I couldn't find it despite searching for several hours). – M. Northstar Dec 24 '13 at 14:47
  • Windows may ignore the error and mount it anyway. I'm guessing that this is one of the older units that used 2.5" drives in a SPAN configuration, and that's part of the problem with the sector counts. Did you try ntfsck on it? – douggro Dec 24 '13 at 14:58
  • @douggro The ntfsck output is in the edit. I'm not sure what a SPAN config is, but my drive looks like a 3.5". It's this one, I think. I have to leave the house for now, I'll try moving the drive over and running checkdisk when I get back. Thanks for your help. – M. Northstar Dec 24 '13 at 15:21
  • Yeah, check disk may be the only option that I can suggest. I have seen some weird drive behaviors when the power supplies are failing, like refusing to mount.. SPAN takes two drives and makes them appear as one logical volume. It was a typical ploy to make large disks with two less-expensive smaller disks. – douggro Dec 24 '13 at 15:47
  • @douggro Whoa, that was a lot longer than I had counted on, but here, finally, is the result of the chkdsk, in the edit. – M. Northstar Dec 26 '13 at 20:47
  • Looks like the 4K vs 512 sector size issue. Not sure what solutions available. – ubfan1 Dec 26 '13 at 23:56
  • Check out Check out http://askubuntu.com/questions/337693/how-to-format-a-4k-sector-hard-drive – ubfan1 Dec 27 '13 at 00:05
  • @ubfan1 I'm afraid that post doesn't quite apply to my situation. It would seem that parted needs an already mounted device to display that info, either that or I'm just too inexperienced to adapt the syntax. Could you tell me exactly what I should do to find out the logical/physical block size of my disks? – M. Northstar Dec 27 '13 at 20:35
  • Just looking at what you already posted:Error mounting: mount exited with exit code 12: Failed to read last sector (1953523119): Invalid argument (Note the 1953523119) but chkdsk says:244190389 total allocation units on disk. Something looks confused by the 4096 byte sectors. – ubfan1 Dec 27 '13 at 21:08
  • @ubfan1 That seems even more likely considering that I get the same error with my 2TB external WD HDD (same model as the 1TB, just double the size), but the last sector, the reading of which is failed, is 3907027119. The other question that douggro linked to, which was also for a 1TB disk, also failed at 1953523119, same as my 1TB disk. Is it just a coincidence that all of these last sectors end with 119? – M. Northstar Dec 28 '13 at 17:52
  • @M.Northstar The sector count is close enough for the 2TB disk that I wouldn't consider it a coincidence. – douggro Dec 28 '13 at 21:37
  • @douggro Close to what? Here's what we know: 1953523119 units (from Ubuntu) x 512 bytes is almost exactly the same as 244190389 units (from chkdsk) x 4096 bytes. That is, 1953523119 x 512 / 4096 = 244190389.875; so Windows sees 4k blocks, Ubuntu sees 512B blocks. However, those extra 0.875 bytes represent a 4k sector that is 1/8 (512B) short, or rather 7/8 of an extra one, since if the block was full, the count would be 1 greater than chkdsk's report. This is starting to look like an off-by-one error, or misalgnment, so how do find out which, and what do we do about it? – M. Northstar Dec 29 '13 at 15:36
  • I was referring to the total block counts shown between the 1 and 2TB drives. Accounting for some overhead blocks that aren't counted, the numbers were close enough to draw the conclusion that this is probably related to the 4K sector size issue. – douggro Dec 29 '13 at 18:30
  • Could you please spell out your math? I'm in a bit over my head here, I'm afraid, and anyone else who might read this thread in the future might be too. Plus, does anyone have any suggestions on how to resolve the issue? You know, without reformatting the drives and losing all my precious, precious files ;-) – M. Northstar Dec 30 '13 at 00:00
  • The sector counts * 512bytes are close enough to the capacity of the 1TB and 2TB drives that I see a relation to the 512/4096 problem being the cause. If you read ubfan1's link, the sector offset plays a role in the counts which could explain the fractional error you saw. I'd run down solutions based on what was in the linked post. – douggro Dec 30 '13 at 17:32
  • Ugh. Look at the answer to this post Someone seems to have experience dealing with this issue on the WD Elements HD's.. – douggro Dec 31 '13 at 08:19
  • Do you still have this problem? If you solved it please post your solution as an answer so that others may benefit from your experience. Thank you! – Elder Geek Jun 16 '14 at 14:23

0 Answers0