LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-15-2010, 12:33 PM   #1
bskrakes
Member
 
Registered: Sep 2006
Location: Canada, Alberta
Distribution: RHEL 4 and up, CentOS 5.x, Fedora Core 5 and up, Ubuntu 8 and up
Posts: 251

Rep: Reputation: 32
Question Software RAID 5 - 3 SATA DISKS on CentOS 5.x


Hi there,

So the other day someone accidentally unplugged a PC which was running our subversion server. This server is running the latest version of CentOS x64, has 3 hard drives configured in software RAID 5. Due to the power going down while the machine was running on reboot the kernel warned of degraded raid array... blah blah blah - nothing good.

So here is some info:

Quote:
cat /etc/mdadm.conf
files does not exist
Quote:
cat /proc/partitions
major minor #blocks name
7 0 110572 loop0
8 0 244198584 sda
8 1 257008 sda1
8 2 243938992 sda2
8 16 244198584 sdb
8 17 244196001 sdb1
8 32 244198584 sdc
8 33 244196001 sdc1
Quote:
cat /proc/mdstat
Personalities: [raid0] [raid1] [raid10] [raid5] [raid6] [raid4]
unused devices: <none>
Quote:
mdadm --examine --scan /dev/sda2
ARRAY /dev/md0 level=raid5 num-devices=3 UUID=(a bunch of stuff here for UUID)
Quote:
mdadm --examine --scan /dev/sdb1
ARRAY /dev/md0 level=raid5 num-devices=3 UUID=(a bunch of stuff here for UUID)
Quote:
mdadm --examine --scan /dev/sdc1
ARRAY /dev/md0 level=raid5 num-devices=3 UUID=(a bunch of stuff here for UUID)
Because there is no mdadm.conf file I cannot start the raid array:

Quote:
mdadm -A -s
mdadm: /dev/md0 assembled from 2 drives - not enough to start the array while not clean - consider force
Quote:
mdadm --assemble --force /dev/sda2 /dev/sdb1 /dev/sdc1
mdadm: no devices found for /dev/sda2
Quote:
mdadm -E /dev/sda2
mdadm: No md superblock detected on /dev/sda2
At this point I am confused... looking for anyone who can help, please and thanks!
 
Old 12-15-2010, 12:40 PM   #2
bskrakes
Member
 
Registered: Sep 2006
Location: Canada, Alberta
Distribution: RHEL 4 and up, CentOS 5.x, Fedora Core 5 and up, Ubuntu 8 and up
Posts: 251

Original Poster
Rep: Reputation: 32
Sorry the thread title should be "HOW DO I REBUILD Software RAID 5 - 3 SATA DISKS on CentOS 5.x"
 
Old 12-15-2010, 09:15 PM   #3
ComputerErik
Member
 
Registered: Apr 2005
Location: NYC
Distribution: Debian, RHEL
Posts: 269

Rep: Reputation: 54
I hope you have backups, because if this were me I would be looking to do a restore and get things up and running ASAP. Trying to figure this out as an academic exercise might be interesting (and hopefully is possible) but in a production environment for a source control server I wouldn't want to kill the time trying things which might only make it worse.

My first advice would be to do a backup of everything as is now before playing around and possibly making the situation worse.
 
Old 12-15-2010, 11:08 PM   #4
chickenjoy
Member
 
Registered: Apr 2007
Distribution: centos,rhel, solaris
Posts: 239

Rep: Reputation: 30
have you tried this:
Code:
# > /etc/mdadm/mdadm.conf
# echo "DEVICE partitions" > /etc/mdadm/mdadm.conf
# mdadm --detail --scan >> mdadm.conf
then reboot and the raid setup should be back. make sure to backup your mdadm.conf if there is already one existing.
 
Old 12-20-2010, 11:20 PM   #5
bskrakes
Member
 
Registered: Sep 2006
Location: Canada, Alberta
Distribution: RHEL 4 and up, CentOS 5.x, Fedora Core 5 and up, Ubuntu 8 and up
Posts: 251

Original Poster
Rep: Reputation: 32
@ComputerErik - I couldn't agree more. I tested our backup and all it well. I also had a second machine up and running. After a couple of days I finally decided just to restore the original server and get SVN re-setup.

@chickenjoy - I did try that, there are several good guides out there but it seems like anything and everything I did would results in an array that didn't want to start. Basically I chased my problem around in circles. So I had no choice but to get the server back up and running. I plan on setting up a virtual machine and breaking it, when I have some down time to do more testing.

GLAD I HAD A GOOD BACKUP PLAN

Thank you for the replies!!! Happy Holidays and best wishes!

Last edited by bskrakes; 08-04-2011 at 10:21 AM.
 
Old 12-22-2010, 12:28 AM   #6
chickenjoy
Member
 
Registered: Apr 2007
Distribution: centos,rhel, solaris
Posts: 239

Rep: Reputation: 30
@bskrakes
thats great. Nothing beats a recent backup.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Software Raid 5 over 5 SATA disks hazmatt20 Linux - Hardware 2 01-24-2007 04:25 PM
moving disks with software raid and LVM mastrboy Linux - General 8 09-30-2006 10:33 AM
XFS + Raid and how to test SATA disks Krugger Linux - Software 0 05-10-2006 05:55 PM
CentOS 4.2 sees both disks in RAID array on IBM x346 server SupaDucta Linux - Hardware 0 02-06-2006 03:15 AM
software raid (linear) and moving disks TuxJay Linux - Software 0 08-27-2003 04:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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

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