Can't mount disk--could be damaged?
I have (had) an ordinary IDE drive attached to an USB adapter that operates like an external hard drive. A little while back the thing stopped working :( I think the problem may be with the disk but I'm not entirely sure how to go about identifing the specific area/component that is broken. I took the drive out and attached it to my Ubuntu 6.06 server but was unable to mount it (I think that Ubuntu was unable to identify the file system type?). I think that the file system is ntfs... I tried using file to confirm the file system type but the terminal prompt freezes. When I restarted the server I got a bunch of I/O errors from the disk. I have some family pictures on the drive--I really, really don't want to loose any data--so I'm afraid to try anything else on my own. What steps should I take to identify the problem and save my data?
|
First good step is to make an image out of the disk; after this you can work on the image, leaving the original disk untouched, and not worry about wrecking it any more. Note that the image will be as large as the disk itself, so you'll need a (lot) bigger HD to place the image on. If the harddisk's (that you want to make the image from) device file was /dev/hda (primary [a] IDE [h] disk [d]), and you wanted the image to be put in /home/username/backup.imgage, you could use
Code:
dd if=/dev/hda of=/home/username/backup.image Code:
mount -o loop /home/username/backup.image /home/username/image_mountpoint Code:
umount /home/usernae/backup.image |
Make a back up image of the drive... that's probably the first thing I should have done. What a noodlehead I am. Thanks for the tip--I'll get working on that once I get home.
|
It's the weekend so I finally have time to work on this. A quick question: would dd_rescue be a better choice than dd?
|
Yes.
And ddrescue possibly even better again. Depends on requirements. A bare "dd" like that can be a bit limited if there are errors on the disk. |
Quote:
It used to be a Master Secondary HD but I'm going to remove the other HD and just have that HD on my machine and plan on booting up using a SuSE rescue CD. How would I back up the image to an external USB HD? How would I mount the USB Hard drive first? And then how I would back up the image onto the USB HD? The USB HD is FAT 32 with about 30 gigs available. The HD I'm trying to back up has 20 gigs. |
Okay, I've identified part of the problem. Partway through running ddrescue on the disk the server seems to always want to freeze. I wasn't sure if the freezing issue was related to the bad disk or something else, so I decided to investigate a little. It turns out that the problem is on the server-side (I was able to reproduce the freeze by making a copy of a multi-gig file already located on the server). I thought the problem might be raid related (the server has software mirrored raid configured). So I reinstalled linux--something I'd been wanting to do anyways--again with mirrored raid. Unfortunately, the same freezing issue still crops up. I noticed that when running ddrescue that it would work in short 'bursts.' Specifically, it would read from the target disk/file for about half a second, then pause for a little bit less than half a second, then continue again. I don't know if this is normal behavior--it does seem unusual. Could the latency be from the raid synching up the disks? I think that what I'm going to do next is disconnect the non-primary raid drive and try again with just one disk. If anybody has any better ideas, please pipe up!
|
Alright, clearly I've got server problems. The bad disk issue still exists, but the server keeps freezing on the file copy. I'm going to start a new thread for this because it has nothing to do with the original problem...
|
Quote:
FAT32 isn't going to be any good - the resultant image will be a file, and FAT32 is limited to 4 Gig. |
@grittyminder I've seen plenty of threads re RHEL servers slowing down like that on NFS transfers. Sounded like drivers were under suspicion - never saw an answer, but then I wasn't that interested either.
Might be worth doing some searching. |
I've pretty much come to the conclusion that my server is screwed up. I'm ordering a new external SATA hard disk enclosure, which is where I plan on copying bad disk image.
While I wait for the shipment to arrive, I guess I might as well ask a question. But first, I'll try to give a little more background information on the problem... I had't realized it before, but I guess that the bad disk first started misbehaving when I tried to make a multi-gig copy from the disk to the (screwed up) server and it froze partway through the operation (I've come to discover that this is "normal" behavior for this server). Fast forward to a few days ago--when I tried to mount the bad disk the server told me that it could not identify the file system type and could not mount (when I specified the NTFS as the file system type I got errors of a different type--maybe checksum and a few others...). But when I tried running ddrescue on the bad disk I noticed it wasn't finding any errors. So could it be that the disk isn't actually bad, but rather there is merely file corruption somewhere? Would fsck solve the problem? I should probably run fsck on a disk image, rather than the disk itself, just to be safe? |
Try using "file -s /dev/hda3" (whatever) - should give you an idea what it is.
To check the filesystem, try ntfsfix (ntfsprogs), Then boot into Windoze so it'll schedule a chkdsk for you |
It's the weekend so I have time to work on this again...
Thanks for the great tips. By running ddrescue and ntfsfix I've pretty much determined that while there are no disk errors, there is still file corruption. So, yeah, I need to run chkdsk or some equivalent on the disk. However, the disk is located inside an external usb ide disk enclosure and does not have windows installed, so I'm not sure how I would go about running chkdsk because: (1) while Windows detects that the drive exists it does not mount it (i.e. assign it a drive letter) due to the partition corruption, and (2) I don't have a windows boot CD or anything like that. I would prefer to fix thing from linux anyways. I don't suppose that there is a linux chkdsk equivalent, or some way to run chkdsk on the drive using some nice boot and/or partition utility? |
Quote:
Well, that didn't make a lot of sense .... :p Let me put it this way - even the ntfsprogs authors tell you to use Windoze for this. Even they don't have the smarts - and *every* utility out there for NTFS (in Linux) calls their code. Mount the drive internally - it needs to be found on boot. Hopefully that'll get you the chkdsk. |
Ah, I should have known there wasn't a chkdsk-ish utility that you can run in Linux--I feel like somewhat of a fool, but did it not hurt to ask? I would mount the drive internally if I could, but all I've got is a laptop :(
|
All times are GMT -5. The time now is 05:55 AM. |