LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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
 
LinkBack Search this Thread
Old 03-25-2013, 12:16 AM   #1
jimjxr
LQ Newbie
 
Registered: Jun 2010
Posts: 5

Rep: Reputation: 0
Help with degraded RAID1


First, my setup:
-- CentOS 6.4 with latest updates
-- Two 3GB SATA drives sda and sdb
-- Created 3 RAID1 partitions:
---- md0: /root, with GRUB setup on both drives per http://wiki.centos.org/HowTos/SoftwareRAIDonCentOS5
---- md1: /, swap, /tmp partitions using LVM
---- md2: Encrypted LVM volume using LUKS

After the setup is done, I tested the RAID by pulling one drive and boot with the other, it works. Then I followed steps in http://forums.fedoraforum.org/showpo...10&postcount=6 to prevent the OS from asking me about passphrase during boot and wrote two scripts to open and close luks, the script works too.

Now the problem: yesterday, I proceed to setup samba on the server, and share the encrypted mount, this works too. I also run hdparm, vgdisplay, etc to collect some information on the final system, and I think I forget to run the close luks script (which umount and run cryptsetup luksClose) before powering off.

Today when I started the machine, all hell has broken loose, the RAID1 will only start in degraded mode, and it randomly pick one of the RAID partition from sda or sdb, here's an example result of "cat /proc/mdstat":
Code:
Personalities : [raid1]
md0 : active raid1 sda1[0]
      262132 blocks super 1.0 [2/1] [U_]

md2 : active raid1 sda3[0]
      2896447356 blocks super 1.1 [2/1] [U_]
      bitmap: 2/22 pages [8KB], 65536KB chunk

md1 : active raid1 sdb2[1]
      33553340 blocks super 1.1 [2/1] [_U]
      bitmap: 1/1 pages [4KB], 65536KB chunk

unused devices: <none>
Run smartctl against the two drives seems to show they're healthy, and there're no obvious errors in /var/log/messages. I also tried reversing the changes made for luks (basically uncomment the two lines in /etc/crypttab and /etc/fstab), but it didn't work. So the questions are:
1. What is the reason for this issue? Is it caused by not umount and running cryptsetup luksClose on the encrypted LVM volume?
2. How do I fix it?

Thanks
 
Old 03-25-2013, 12:10 PM   #2
vishesh
Member
 
Registered: Feb 2008
Distribution: Fedora,RHEL,Ubuntu
Posts: 647

Rep: Reputation: 66
This does not seems encryption issue ? Does the problem only with RAID1 or with anything else ?

Thanks
 
Old 03-25-2013, 02:28 PM   #3
whizje
Member
 
Registered: Sep 2008
Location: The Netherlands
Distribution: Slackware64 current
Posts: 582

Rep: Reputation: 129Reputation: 129
Code:
mdadm --add /dev/md0 /dev/sdb1
Should fix the issue and likewise for md1 and md2.
 
Old 03-26-2013, 11:44 AM   #4
jimjxr
LQ Newbie
 
Registered: Jun 2010
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by whizje View Post
Code:
mdadm --add /dev/md0 /dev/sdb1
Should fix the issue and likewise for md1 and md2.
Ok, thanks, this did fix the issue, although I'm still confused as to why this happened in the first place. The array shouldn't just degrade without reason, so what could be the reason for this?
 
  


Reply

Tags
raid1


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Raid1 degraded after reboot crazy4nix Linux - Software 1 12-01-2011 12:06 PM
Install CentOS V5.6 onto pre-degraded RAID1 + LVM? goony1 Linux - Software 0 06-11-2011 01:06 AM
RAID1 issue related to Degraded mode management, md: md0 still in use. anuragccsu Linux - Kernel 0 01-18-2010 11:25 AM
raid1 degraded after every boot personalsoft_fabiano Linux - Server 4 01-17-2009 04:19 AM
Degraded raid1 array problem on slack 12.0.0 / mdadm slack-12.0.0 Slackware 5 10-12-2007 06:36 AM


All times are GMT -5. The time now is 04:31 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration