LinuxQuestions.org
Register a domain and help support LQ
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 03-18-2013, 01:42 AM   #1
sagar666
Member
 
Registered: Feb 2013
Posts: 113

Rep: Reputation: Disabled
raid 5 failure


hi,

I configured raid 5 with 4 drives (Sata Drives) one of our drive got failure.Is it require to reconstruct the data? if yes how to reconstruct.
 
Old 03-18-2013, 02:26 AM   #2
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,261

Rep: Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028
How did you set it up? Min num of (active) disks for RAID5 is 3 https://en.wikipedia.org/wiki/RAID#RAID_5, see also https://en.wikipedia.org/wiki/Standard_RAID_levels.
With 4 drives, ideally you'd set 3 active and 1 hot-spare, so it automatically uses it, then you manually replace the dead one and that becomes the hot spare.
If you set all 4 as active (see mdadm --detail and cat /proc/mdstat), then you need to mark it failed, then mark it removed, then replace and add it back.
See http://linux.die.net/man/8/mdadm
 
Old 03-18-2013, 03:04 AM   #3
sagar666
Member
 
Registered: Feb 2013
Posts: 113

Original Poster
Rep: Reputation: Disabled
I am not configured hot spare and i configured software raid using mdadm .when i execute command mdadm --detail /dev/md3 it showing one device is failure and even i removed that drive and checked in other computer but it is not detecting.Now i have one more new 500gb hard disk .Now i need to be replace new drive in the place of faulty drive. Give me procedure to replace faulty with new and Recover data
 
Old 03-18-2013, 12:18 PM   #4
Basher52
Member
 
Registered: Mar 2004
Location: .SE
Distribution: Fedora
Posts: 231

Rep: Reputation: 8
You might need to initialize the disk for it to be usable for the RAID, at least I have to do that.
Then you need to add it back to the RAID setup as chrism01 says so it can rebuild the contents.
 
Old 03-22-2013, 01:06 AM   #5
sagar666
Member
 
Registered: Feb 2013
Posts: 113

Original Poster
Rep: Reputation: Disabled
how to initialize the new disk in the place of faulty one in the existing setup only. And finally i need to know whether data can be recovered or no.
 
Old 03-22-2013, 01:57 AM   #6
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
If you are able to read and write to the raid device, then you will be able to rebuild a new drive in place of the faulty one. The parity segments are being used to recover the original data were needed in the mean time.

Look at post #5 in this LQ thread: http://www.linuxquestions.org/questi...ailure-644325/

Last edited by jschiwal; 03-22-2013 at 02:00 AM.
 
Old 03-23-2013, 01:48 AM   #7
sagar666
Member
 
Registered: Feb 2013
Posts: 113

Original Poster
Rep: Reputation: Disabled
Thanks the above link solves my problem .one more thing is we can retrieve data in only 2 disks ???
 
Old 03-23-2013, 11:15 AM   #8
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,093

Rep: Reputation: 300Reputation: 300Reputation: 300Reputation: 300
If you have a 4 disk RAID-5, and you lose two disks, leaving only two remaining, you will generally not be able to recover the data from it. RAID-5 protects againsts single disk failure, but you would need to have RAID-6 to protect against double disk failure (basically there are two parity blocks written instead of one, so you lose two disks worth of capacity instead of one).
 
Old 03-24-2013, 08:30 AM   #9
sagar666
Member
 
Registered: Feb 2013
Posts: 113

Original Poster
Rep: Reputation: Disabled
thanks btmiller, but my question is if i confiured raid 5 using 3 drives in that 1 drive got failure .In that time i can access,modify files in two drives only know for time beging ??? Later i can add New drive with the place of faulty drive is it possible know???
 
Old 03-26-2013, 11:21 PM   #10
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
Yes, using raid 5, the array is usable with two disks. RAID-5 works by storing the XOR of the data of two disks on the third. Each of the disks has areas used for xor parity. You don't have a single disk reserved for parity.

If disk 3 is bad, and the disk 2 has a parity bit, the device will xor the byte from disk 1 with the parity byte from disk 2 to recover the data that was in disk 3.

If you used 4 disks, the remaining disks are xor'ed as well.

While one disk is absent, you are in danger because if another disk goes ofline, you are in trouble. One problem with RAID-5 is if there is an area on one of the remaining disk that has undetected read errors. Maybe that file hasn't been read for years. The area will be read when you try rebuilding the array.
 
  


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
Raid failure - Need help ravand Linux - Newbie 17 03-08-2013 06:53 AM
[SOLVED] Software RAID (mdadm) - RAID 0 returns incorrect status for disk failure/disk removed Marjonel Montejo Linux - General 4 10-04-2009 06:15 PM
Dual drive failure in RAID 5 (also, RAID 1, and LVM) ABL Linux - Server 6 05-27-2009 08:01 PM
RAID mdadm - Sending E-Mails on RAID Failure? rootking Linux - General 1 12-25-2007 03:59 AM
Raid Failure karan101 Linux - General 1 04-14-2005 08:14 PM


All times are GMT -5. The time now is 09:25 AM.

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