LinuxQuestions.org

LinuxQuestions.org (http://www.linuxquestions.org/questions/index.php)
-   Linux - Hardware (http://www.linuxquestions.org/questions/forumdisplay.php?f=18)
-   -   Cannot Access HDD (http://www.linuxquestions.org/questions/showthread.php?t=4175437712)

AllanB 11-18-2012 03:33 PM

Cannot Access HDD
 
I have a P4 running Ubuntu 10.04LTS. It has 2 HDD's; 160 GB SATA2 for Windows and a 300 GB SATA2 for Ubuntu. The PC refused to start yesterday so I booted it with 10.04LTS on a live CD. The system sees both drives and the 160GB one is accessable, but the 300GB is seen, but not accessable.
Am I able to recover data form this drive; I only want one Thunderbird mailbox and one directory of correspondence.
Yes, I know I should have backed it up a week ago! Any help will be very much appreciated.

Here are the messages:

Unable to mount 294 GB Filesystem
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.

When an attempt is made to access the drive this is the message:
Unable to mount 294 GB Filesystem
DBus error org.gtk.Private.RemoteVolumeMonitor.Failed: An operation is already pending

GParted reports this:
/dev/sdc2 ext4 273.70 GiB size 187.01 GiB used

Disk Utility
Error checking filesystem on volume
An error occurred while performing an operation on "294 GB Filesystem" (Partition 1 of ATA ST3300622AS): The device is busy There is already a job running

It also reports 24 bad sectors.

jv2112 11-18-2012 05:59 PM

:twocents:

After you back up your data. I would suggest a couple of steps.

I would suggest boot via parted majic and run diagnostic to determine if it is a hardware problem.

If not the next step I would try is boot again from the live Ubuntu disk and reinstall grub.

onebuck 11-19-2012 04:41 AM

Member Response
 
Hi,

You should boot 'single' user mode then run 'fsck' on the filesystem or use the LiveCD to run 'fsck' on the file system in question. This will insure no conflicts.
Excerpt from 'man fsck';
Quote:

NAME
fsck - check and repair a Linux filesystem

SYNOPSIS
fsck [-lsAVRTMNP] [-C [fd]] [-t fstype] [filesys...] [--] [fs-specific-options]

DESCRIPTION
fsck is used to check and optionally repair one or more Linux filesystems. filesys can be a device name (e.g. /dev/hdc1,
/dev/sdb2), a mount point (e.g. /, /usr, /home), or an ext2 label or UUID specifier (e.g.
UUID=8868abf6-88c5-4a83-98b8-bfc24057f7bd or LABEL=root). Normally, the fsck program will try to handle filesystems on
different physical disk drives in parallel to reduce the total amount of time needed to check all of them.

If no filesystems are specified on the command line, and the -A option is not specified, fsck will default to checking
filesystems in /etc/fstab serially. This is equivalent to the -As options.

The exit code returned by fsck is the sum of the following conditions:

0 No errors
1 Filesystem errors corrected
2 System should be rebooted
4 Filesystem errors left uncorrected
8 Operational error
16 Usage or syntax error
32 Fsck canceled by user request
128 Shared-library error

The exit code returned when multiple filesystems are checked is the bit-wise OR of the exit codes for each filesystem that
is checked.

In actuality, fsck is simply a front-end for the various filesystem checkers (fsck.fstype) available under Linux. The
filesystem-specific checker is searched for in /sbin first, then in /etc/fs and /etc, and finally in the directories
listed in the PATH environment variable. Please see the filesystem-specific checker manual pages for further details.


AllanB 11-20-2012 03:27 PM

Gary,
Many thanks for your suggestions, as a consequence I used e2fsck, not fsck, as the drive in question has an ext4 filesystem.

Here is the command and the message:

ubuntu@ubuntu:~$ sudo e2fsck -p /dev/sdc2
e2fsck: Attempt to read block from filesystem resulted in short read while trying to open /dev/sdc2
Could this be a zero-length partition?
ubuntu@ubuntu:~$

I will now look at your suggested guides, and also read up on the other command options. I hope that the record of the file structure was not contained in the reported 24 bad sectors.

Regards Allan

onebuck 11-20-2012 04:58 PM

Member Response
 
Hi,
Quote:

Originally Posted by AllanB (Post 4833549)
Gary,
Many thanks for your suggestions, as a consequence I used e2fsck, not fsck, as the drive in question has an ext4 filesystem.

Here is the command and the message:

ubuntu@ubuntu:~$ sudo e2fsck -p /dev/sdc2
e2fsck: Attempt to read block from filesystem resulted in short read while trying to open /dev/sdc2
Could this be a zero-length partition?
ubuntu@ubuntu:~$

I will now look at your suggested guides, and also read up on the other command options. I hope that the record of the file structure was not contained in the reported 24 bad sectors.

Regards Allan

'fsck' is the front end for filesystem checks.
Quote:

In actuality, fsck is simply a front-end for the various filesystem checkers (fsck.fstype) available under Linux. The filesystem-specific checker is
searched for in /sbin first, then in /etc/fs and /etc, and finally in the directories listed in the PATH environment variable. Please see the filesys-
tem-specific checker manual pages for further details.
If you do a 'man fsck' you will get;
Quote:

Normally, the fsck program
will try to handle filesystems on different physical disk drives in parallel to reduce the total amount of time needed to check all of them.

If no filesystems are specified on the command line, and the -A option is not specified, fsck will default to checking filesystems in /etc/fstab seri-
ally. This is equivalent to the -As options.
.
.
.
SEE ALSO
fstab(5), mkfs(8), fsck.ext2(8) or fsck.ext3(8) or e2fsck(8), cramfsck(8), fsck.minix(8), fsck.msdos(8), fsck.jfs(8), fsck.nfs(8), fsck.vfat(8),
fsck.xfs(8), fsck.xiafs(8), reiserfsck(8).

Plus be sure to either insure no access to the filesystem by others by using 'single' user mode or boot using a LiveCD.

You might test the hdd with the manufactures diagnostic set.
HTH!

H_TeXMeX_H 11-21-2012 11:28 AM

If fsck fails, it's not good. You can try using ddrescue to image the partition to a good drive and then carve data from the image using testdisk or foremost.

AllanB 11-22-2012 07:11 PM

After startup from live CD, ubuntu 10.04LTS, single user. The drive appears to be busy, even though I haven't mounted it.

ubuntu@ubuntu:~$ sudo e2fsck -f /dev/sdc1
e2fsck 1.41.11 (14-Mar-2010)
e2fsck: Device or resource busy while trying to open /dev/sdc1
Filesystem mounted or opened exclusively by another program?

ubuntu@ubuntu:~$ umount /dev/sdc1
umount: /dev/sdc1 is not mounted (according to mtab)

Output from Disk Utility
File system check on "294 GB Filesystem" (Partition 1 of ATA ST3300622AS) completed
File system is NOT clean.

Then tried mounting /sdc, the message:

Error mounting volume
An error occurred while performing an operation on "294 GB Filesystem" (Partition 1 of ATA ST3300622AS): The device is busy
Details
A job is pending on /dev/sdc1

I have also run dumpe2fs, and then taken the second superblock, as below:

ubuntu@ubuntu:~$ sudo dumpe2fs /dev/sdc1 | grep -i superblock > sblock.txt
dumpe2fs 1.41.11 (14-Mar-2010)
ubuntu@ubuntu:~$ sudo e2fsck -f -b32768 /dev/sdc1
e2fsck 1.41.11 (14-Mar-2010)
e2fsck: Device or resource busy while trying to open /dev/sdc1
Filesystem mounted or opened exclusively by another program?
ubuntu@ubuntu:~$

I have, as H_TexMex_H taken a copy of a rescue CD but not used it yet.

Many thanks and regards

printf("goodbye, Dennis");
The Economist's Headline for Dennis Ritchie's Obituary

onebuck 11-23-2012 06:51 AM

Member Response
 
Hi,

Try one of these LiveCD;
Quote:

UBCD Ultimate Boot CD <- 'UBCD allows users to run floppy-based diagnostic tools from most CDROM drives on Intel-compatible machines, no operating system required. The cd includes many diagnostic utilities.'

SystemRescueCd <- 'is a Linux system on a bootable CD-ROM for repairing your system and recovering your data after a crash. It aims to provide an easy way to carry out admin tasks on your computer, such as creating and editing the partitions of the hard disk. It contains a lot of system utilities (parted, partimage, fstools, ...) and basic tools (editors, midnight commander, network tools).' + 'Online-Manual
If you do not pass 'single' to the *buntu install CD the HD device may be used. Above diagnostic LIveCD should boot as 'single'.

AllanB 11-25-2012 07:44 PM

The Ultimate Boot CD has given me access to the HDD and I have been able to retrieve all of the files I wanted, plus some. It is a far easier job with the right tools.
Many thanks for your help, I really appreciate it.
Regards Allan

onebuck 11-25-2012 08:11 PM

Member Response
 
Your Welcome!


All times are GMT -5. The time now is 02:56 AM.