Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Having a major problem with a hard drive failure. My set is as follows:
2 x Intel P4 Xeon 2.6
4 gig Samsung ecc ddr 266
Intel 82546EB gigabit NIC (on board)
2 x 500 gig ide in raid 0 on a 3ware 7410-4 controller
1 x 500 gig sata
CentOS 5.2
I originally set up the hard drives as a JBOD. The SATA drive has failed. When I try to boot, CentOS starts a file system check and the fails. Running fsck does nothing.
Is there any way to rebuild the data on another drive to recover the data on the original drive I have space on the ?
That is the problem with Raid0, there is no backup. The data is stripped across both drives, so part of a file is on one drive and part is on the other. More than likely you are SOL.
You can try booting to a live CD and check if it can "see" the bad drive and data.
French must be your first language, because your English sucks.
I have a couple questions...
Which drive(s) is Centos installed on?
What is the file system type on the failed drive?
First thing:
You should try booting a Linux Live CD such as Knoppix, or Centos 4 Live CD, at least it won't automatically run the file system check. If you cannot mount the drive with a live CD, you can use dd to make an image of it and attempt to recover data after you've made the image. This way if you screw up the drive to the point it can't ever be mounted, you can get your data off the backup image.
Also, once you have a Linux live session going, run command: fdisk -l to see if the drive shows up. If it shows up and it is /dev/sdb (example), run command: sfdisk -luS /dev/sdb. By running the sfdisk command you can find which sector is the starting sector of the partition you want to mount. Normally the first partition is at offset 63. If this is the start position of the partition you want to mount, make a directory in the Linux file system to mount it to with command: mkdir /sdb, then mount the partition with command: mount -oloop,offset=32256 /dev/sdb /sdb.
Offset=32256...this is 63 x 512...sixty three sectors at five hundred & twelve bytes each.
Based on the information you provided, I'm guessing the SATA drive is not part of the raid arrangement.
Unfortinuatly, I have Cent installed across all drives. I was just getting ready to rebuild the server with CentOS on an 8 gig CF chip mounted on an IDE adapter, and have 4 x 500 gig IDE in a RAID 5 setup, when this drive fried. The file system on all drives is LVM, (minus the boot sector).
Knoppix can see the drives, the output of fdisk -l is as follows:
root@Knoppix:/mnt# fdisk -l
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 60801 488384001 8e Linux LVM
Disk /dev/sdb: 1000.2 GB, 1000213577728 bytes
255 heads, 63 sectors/track, 121602 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 13 104391 83 Linux
/dev/sdb2 14 121602 976663642+ 8e Linux LVM
sda1 is the SATA drive. However, when I enter sfdisk -luS /dev/sda1, I get the following:
root@Knoppix:/mnt# sfdisk -luS /dev/sda1
Warning: start=63 - this looks like a partition rather than
the entire disk. Using fdisk on it is probably meaningless.
[Use the --force option if you really want this]
Any other suggestions?
btw, Sorry about my apparent lack of language skills. Believe it or not, English is my mother tongue, was born and raised in the US. Unfortuatly, I dropped a computer case on my wrist a few weeks ago and compressed my superficial radial nerve. They are giving me Tramadol, (synthetic morphine), and it seems to affect my language skills, (you should hear me speak in French when I'm on it!).
Well, all is not lost, the sata drive may have developed some bad sectors, or it's just CentOS that has some problems. Because the drive is not fried if the fdisk -l command sees the drive.
Although I have lots of data recovery experience, none with raid or LVM, that wouldn't stop me if there was money involved, I stand by that old cliche, "where there's a will, there's a way".
First, I like to advertise "Forensically safe data recovery". What this means is that I don't do anything till I have images as backup, then I work with the images to preserve the state of the drives for liability reasons. Seeing how you have four more 500GB drives, I would clone those three older ones to three of the new ones using dd, ddrescue, or Encase, something that does byte for byte images. If you had drives slightly larger, you could make an image file of each and store it on a larger formatted drive. Some forensics applications can also make images in smaller pieces that can fit on smaller storage mediums like CDs, DVDs or smaller drives than the ones you are acquiring the image off of, then reconstruct them to recover data. There is software that can reconstruct and mount Raid arrays from images/reconstructed images, but I'm not sure if they are limited to proprietary file systems, I doubt it.
Then I would look into mounting RAID 0 from a live CD, a quick Google search yielded a link using Knoppix to mount RAID 1.
Another thing I would look into if I suspected the sata drive just had bad sectors. After backing up with images, I would run SpinRite against the sata drive to see if it can remap those bad sectors. SpinRite has quite a reputation for reviving seemingly fried drives. But most of what I've read about it's miracles involve Windows proprietary file systems. Some investigating may be required in this area first also. But even if you screwed it up good, you have one more new 500GB drive to load the image onto to try another angle, most computers can accomodate four IDE devices. Images can prove to be valuable.
One thing for sure, it is highly likely all data can be recovered if you have backup images, there are countless angles one can try, if one approach does not work, reload the image(s) and try something else. This is going to require lots of reading that I'm not offering at this moment. And with your slight impairment, it might be a little tough for you also.
I gotta get some tar around the chimney before the night chills set in, I'm outta here.
French must be your first language, because your English sucks.
Let's put this in perspective.....OP's English is better than that of many of our native speakers. And, if you look at the "ESL + texting" shorthand from some parts of the world, then OP starts to look REALLY good...
I took it as "Is there any way to rebuild the data on another drive, to recover the data on the original drive, I have space on?". Even if that is not exactly what he meant, the rest of his post made it pretty clear where he was headed.
Typos and half formed ideas are not at all unusual, in life or on a forum. Personally I have a far more difficult time understanding the individuals who slip in and out of "leet".
Edit: I guess the seven minutes between Jr.'s posts is a lot of time to find out about a response and actually reply.
Junior Hacker, you pretty well know what was meant. You are not in the position to question other peoples motives, nor is retalliating or making derogatory comments going to help your case. I remind you it is not the first time you have been pointed at the way you express yourself. If you want to discuss things you're invited to email me or any other moderator but you will understand this CFB: this stops here and now. Do not use this or any other thread for more OT comments, playing antagonistic games, creating animosity or making disagreeable remarks in the widest possible sense. You may consider this a warning.
I contacted Seagate and got a hot-swap for the defective drive, (it cost me a whole $22.00 USD and was delivered the next day, go Seagate!!!). I did a sectro-by-sector copy form the defective drive to the new drive using ddrescue. I then put the new drive into the existing JBOD array and booted the machine. Got a kernel panic on boot, rebooted with a CentOS install CD in "linux rescue" mode with network support. I then mounted the sysimage and used scp to dump the data to another machine. Since it was "only" my mp3 collection that was not backed up to DVD, (total of 109 gig!), it is questionable if it was worth all of the trouble. However, I had a great learning experience, so in the end I think it was worth it.
I would like to thank everyone for their suggestion and help.
btw, an interesting side note. I had posted this topic here, http://www.linuxquestions.org/questi...0/#post3508869 , about slow data transfer speeds. I was getting on average 21 MBit/s, however when I did the data transfer under linux rescue, I was getting an average of 75 MBit/s. Anyone have any clues as to what happened?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.