LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (http://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Can't mount external hard drive (http://www.linuxquestions.org/questions/linux-hardware-18/cant-mount-external-hard-drive-738738/)

a_m0d 07-08-2009 06:48 PM

Can't mount external hard drive
 
I recently bought a new external hard drive (WD Elements, 1TB) for use as a backup for my laptop. The first thing I did was repartition the drive so that it would work better on linux - I created an 800GB partition as ext3fs, and also a 200GB partition as NTFS (for use with Windows). This all went well, and I ran my backup script to copy everything over to the backup. Subsequent backups also went well.

However, the last few times that I have plugged the drive in, it refuses to mount (running Fedora 10 with Gnome desktop). When I open nautilus in the Computer view, it shows the drive there as USB Drive. It used to show two mounted drives - Laptop Backup and 200GB Disk (or something like that).

I ran
Code:

ls /dev | grep sd
and found that it wasn't picking up the partitions anymore (it just showed /dev/sdb and not /dev/sdb1 /dev/sdb2). I couldn't run
Code:

e2fsck
on the partition, because the kernel didn't see the partition. However,
Code:

parted
and gparted both see the partitions there on the disk. I ran
Code:

parted /dev/sdb recover 0 800GB
and then I could see the /dev/sdb1 partition, but I still can't mount it.

Now when I plug in the drive, it does appear in the drives list in nautilus, but I still can't mount either partition. The error that I get is
Code:

Unable to mount location

DBus error org.freedesktop.DBus.
Error.NoReply: Did not receive a reply.
Possible causes include: the remote application did not send a reply,
the message bus security policy blocked the reply,
the reply timeout expired,
or the network connection was broken.

The error when mounting the NTFS partition is
Code:

Cannot mount volume.

Unable to mount the volume.
Details
ntfs_attr_pread_i: ntfs_pread failed: Input/output error
Failed to read $UpCase, unexpected length (-1 != 131072).
Failed to mount 'dev/sdb2': Input/output error NTFS is either inconsistent, or there is a hardware fault, or it's a SoftRAID/FakeRAID hardware.
Ini the first case run chkdsk /f on Windows then reboot into Windows twice.
The usage of the /f parameter is very important!
If the device is a SoftRAID/FakeRAID then first activate it and mount a different device under the /dev/mapper/ directory, (e.g. /dev/mapper/nvidia_eahaabcc1).
Please see the 'dmraid' documentation for more details.

I did somehow manage to mount one of the partitions once, but I was unable to view anything below the first folder (which was /media/Laptop\ Backup/a_m0d).

Has anyone got any suggestions for me to try? I don't really want to reformat, because there is some data on there that is no longer on my laptop hard drive. Thanks in advance.

onebuck 07-08-2009 07:03 PM

Hi,

Quote:

Originally Posted by a_m0d (Post 3601538)
I recently bought a new external hard drive (WD Elements, 1TB) for use as a backup for my laptop. The first thing I did was repartition the drive so that it would work better on linux - I created an 800GB partition as ext3fs, and also a 200GB partition as NTFS (for use with Windows). This all went well, and I ran my backup script to copy everything over to the backup. Subsequent backups also went well.

However, the last few times that I have plugged the drive in, it refuses to mount (running Fedora 10 with Gnome desktop). When I open nautilus in the Computer view, it shows the drive there as USB Drive. It used to show two mounted drives - Laptop Backup and 200GB Disk (or something like that).

How did you umount the hdd? Cleanly?

Quote:

Originally Posted by a_m0d (Post 3601538)
I ran
Code:

ls /dev | grep sd
and found that it wasn't picking up the partitions anymore (it just showed /dev/sdb and not /dev/sdb1 /dev/sdb2). I couldn't run
Code:

e2fsck
on the partition, because the kernel didn't see the partition. However,
Code:

parted
and gparted both see the partitions there on the disk. I ran
Code:

parted /dev/sdb recover 0 800GB
and then I could see the /dev/sdb1 partition, but I still can't mount it.

You are only going to see the devices in '/dev' not the partitions on the device if the device is not recognized. You should run your 'fsck' on a unmounted filesystem. Make sure that the filesystem(s) on the device is not mounted then run 'fsck' which is the front-end. You should be able to run 'e2fsck' on the filesystem in each partition as long as no one else has access since it's not mounted. To insure this you could boot a install cd/dvd or a LiveCD. Then run the 'fsck'. After you run the repair then you should be able to mount.

Quote:

Originally Posted by a_m0d (Post 3601538)
Now when I plug in the drive, it does appear in the drives list in nautilus, but I still can't mount either partition. The error that I get is
Code:

Unable to mount location

DBus error org.freedesktop.DBus.
Error.NoReply: Did not receive a reply.
Possible causes include: the remote application did not send a reply,
the message bus security policy blocked the reply,
the reply timeout expired,
or the network connection was broken.

The error when mounting the NTFS partition is
Code:

Cannot mount volume.

Unable to mount the volume.
Details
ntfs_attr_pread_i: ntfs_pread failed: Input/output error
Failed to read $UpCase, unexpected length (-1 != 131072).
Failed to mount 'dev/sdb2': Input/output error NTFS is either inconsistent, or there is a hardware fault, or it's a SoftRAID/FakeRAID hardware.
Ini the first case run chkdsk /f on Windows then reboot into Windows twice.
The usage of the /f parameter is very important!
If the device is a SoftRAID/FakeRAID then first activate it and mount a different device under the /dev/mapper/ directory, (e.g. /dev/mapper/nvidia_eahaabcc1).
Please see the 'dmraid' documentation for more details.


You need to repair the filesystem as I stated above.

Quote:

Originally Posted by a_m0d (Post 3601538)
I did somehow manage to mount one of the partitions once, but I was unable to view anything below the first folder (which was /media/Laptop\ Backup/a_m0d).

Has anyone got any suggestions for me to try? I don't really want to reformat, because there is some data on there that is no longer on my laptop hard drive. Thanks in advance.

I would suggest that you backup any data if possible. I would perform the maintenance from the cli from a LiveCD.

PTrenholme 07-08-2009 07:12 PM

Well, you could try one of the Live CDs with data recovery software on them. (I like the SystemRescueCD, but there are lots of them out there.)

You might be able to pull you data from the drive using, e.g., foremost or a similar tool without needing to get it mounted.

Have you looked at the output of dmesg to see if there's something there that might explain your difficulties? (Try dmesg | less since it's a fairly long file. Or dmesg | grep -i ata to look at - mostly - the ATA library-related messages.)

If you do end up re-partitioning and reformatting, I'd suggest that you make your large partition an ext4 one instead of an ext3 one. The improved efficiency of the ext4 format is likely to be noticeable with a disk of that size.

a_m0d 07-08-2009 07:15 PM

Quote:

How did you umount the hdd? Cleanly?
The hard drive has always been unmounted cleanly.
Quote:

You are only going to see the devices in '/dev' not the partitions on the device. You should run your 'fsck' on a unmounted filesystem. Make sure that the filesystem on the device is not mounted then run 'fsck' which is the front-end. You should be able to run 'e2fsck' on the filesystem in each partition as long as no one else has access since it's not mounted. To insure this you could boot a install cd/dvd or a LiveCD. Then run the 'fsck'. After you run the repair then you should be able to mount.
Why shouldn't I see the partitions? When the hard drive works, I see /dev/sdb1 and /dev/sdb2 as well as /dev/sdb. Also, I haven't been able to mount the partitions, so fsck is not trying to run on mounted partitions. The error that fsck has is
Code:

[a_m0d@localhost ~]$ sudo !!
sudo e2fsck /dev/sdb1
[sudo] password for a_m0d:
e2fsck 1.41.4 (27-Jan-2009)
e2fsck: Attempt to read block from filesystem resulted in short read while trying to open /dev/sdb1
Could this be a zero-length partition?

However, the partition is there - parted shows
Code:

[a_m0d@localhost ~]$ sudo parted /dev/sdb print
Model: WD 10EAVS External (scsi)
Disk /dev/sdb: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End    Size  Type    File system  Flags
 1      32.3kB  837GB  837GB  primary  ext3             
 2      837GB  1000GB  163GB  primary  ntfs


onebuck 07-08-2009 07:44 PM

Hi,

First, I apologize for my error. I generally cut&paste from my editor. Why that sentence was clipped? I've corrected along with a edit statement.

I would perform the above suggested maintenance with a LiveCD as I mentioned before.

'UBCD (Ultimate Boot CD)' allows users to run floppy-based diagnostic tools from most CDROM drives on Intel-compatible machines, no operating system required. The bootable cd includes many diagnostic utilities. You could use the diagnostic/forensic cd to recover. I would perform the filesystem maintenance using 'fsck' then utilize other utilities.

The above link and others available from 'Slackware-Links'. More than just SlackwareŽ links!


All times are GMT -5. The time now is 02:07 PM.