LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-08-2007, 12:06 AM   #1
g7ibby
LQ Newbie
 
Registered: Mar 2007
Posts: 2

Rep: Reputation: 0
Reading CentOS file system


I have a centOS w/ BlueQuartz server that had mirrored raid running. This morning it took a crap on me and would not reboot for anything. I installed the operating system on another machine and I would like to try and retrieve all of my data from the busted drive and rebuild my sites or hold the file as backup until I can fix the OS on the real server. I tried to install the old drive on the new machine and it hits a panic when attempting to boot. My two questions are, how can I get my data off the old drive? And two is, are there any programs that will allow my XP to read the data from the busted OS. Ive seen some old linux file readers that run on XP but they don,t seem to work with this version of linux.

Any assistance is appreciated.
Linux is my best friend but I've not learned all the nuts and bolts.

Thanks
Gibby
 
Old 03-08-2007, 01:34 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
This Linux Journal article on raid and lvm volume recovery might help:
http://www.linuxjournal.com/article/8874

I think the first step would be to boot up with a rescue disk to see what the partitions look like.
Are both drives bad? Maybe you could try making the other drive your active drive and see if it boots up. I'm thinking that if the kernel could be loaded, the system could run on the other drive.

If you have a rescue disk or live distro with raid support, you may be able to use mdadm to determine which drive went bad, replace it and then rebuild the array.

As I understand it, /etc/mdadm.conf or /etc/mdadm/mdadm.conf is normally read to assemble an array, but if it can't be, the kernel has support to read the superblock (raid metadata), and this information is provided in /proc/mdstat and hopefully can be used to rebuild an array. The kernel has support to read
You may need to modprobe some modules first, such as md and md_raid1.

Also, look in your install disk. I bet there is an Administrator's manual in pdf form that may have a raid chapter.


Good Luck.
 
Old 03-08-2007, 09:49 AM   #3
g7ibby
LQ Newbie
 
Registered: Mar 2007
Posts: 2

Original Poster
Rep: Reputation: 0
At this point I believe that a file in the centOS was corrupted and mirrored onto both disks preventing the server from booting at all. The link you posted looks like it may help IF i can pull user settings, sites, mysql databases and DNS information off the old drives. The plan is to use a box running centOS w/o raid then mount the disk containing the corrupt OS pull my data. Then I would like to reinstall the OS onto the server then import all of the settings and files. To add insult to all of this, the company charged with doing my backup has failed me. Thank you for your reply, any further suggestions would be appreciated.

~G
 
Old 03-08-2007, 03:07 PM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
If it is a corrupted file and not a bad drive, then you should be able to manually assemble the array and mount it using a live distro ( if it has the needed kernel modules ).
There is a Linux Raid Howto at the www.tldp.org Web site which might also help. You wouldn't be able to mount a member of a striped set. Maybe you can for a mirrored set member. I think that article I referred to before did that after placing one of a pair of drives in an external enclosure. They sell NetDisk NDAS/USB2.0 enclosures at Radio Shack for a reasonable price, if that makes it convenient. (Assuming you don't live in Timbuktu*)

Does the installation program have a repair option? It may be able to assemble the array and replace a damaged system file. If a superblock exists, there may be information with will allow it to recover even if one drive is bad. I'm betting that an enterprise grade distro like CentOS has tools that deal with raid recovery as well. I don't have CentOS or RH Enterprise however, so I am guessing.

I think it would be best to
  1. Try assembling and mounting the raid array if it is healthy. Then back up the data.
  2. If the array is bad, analyse which drive is damaged, replace it and recreate it using your disto's raid tools or raid tools from a live distro.
  3. Prepare for disaster next time. Learn what you can about raid on CentOS servers. I you don't have a hot swap bay, physically label the drives so you know which one corresponds with which array member. Keep a notebook with notes on how to recover. If you need a live distro or centos boot disk, include it in a sleave in the notebook or 3-ring binder.

Something you might consider in the future, if the server has room, is install a small IDE drive, and install a minimal CentOS system on it. Then disable the drive in BIOS. In the future if there is a problem with raid, you can enable the drive in BIOS and boot up to it so you have your tools handy.
A windows NT server at work I used to use was set up that way.
----

* Now I'm impressed. My Firefox spell checker had Timbuktu in it.

Last edited by jschiwal; 03-08-2007 at 03:15 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CentOS System Requirements Question dsschanze Linux - Enterprise 8 08-10-2008 08:20 PM
LXer: How To Monitor A System With Sysstat On Centos 4.3 LXer Syndicated Linux News 0 08-20-2006 08:21 PM
Reading text file-writting binary file cdog Programming 5 06-13-2006 11:56 AM
awk: fatal:cannot open file for reading (no such file or Directory) in Linux sangati vishwanath Linux - Software 4 07-06-2005 12:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration