Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
12-15-2010, 12:33 PM
|
#1
|
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:
|
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!
|
|
|
12-15-2010, 12:40 PM
|
#2
|
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:
|
Sorry the thread title should be "HOW DO I REBUILD Software RAID 5 - 3 SATA DISKS on CentOS 5.x"
|
|
|
12-15-2010, 09:15 PM
|
#3
|
Member
Registered: Apr 2005
Location: NYC
Distribution: Debian, RHEL
Posts: 269
Rep:
|
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.
|
|
|
12-15-2010, 11:08 PM
|
#4
|
Member
Registered: Apr 2007
Distribution: centos,rhel, solaris
Posts: 239
Rep:
|
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.
|
|
|
12-20-2010, 11:20 PM
|
#5
|
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:
|
@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.
|
|
|
12-22-2010, 12:28 AM
|
#6
|
Member
Registered: Apr 2007
Distribution: centos,rhel, solaris
Posts: 239
Rep:
|
@bskrakes
thats great. Nothing beats a recent backup.
|
|
|
All times are GMT -5. The time now is 02:46 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|