LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-10-2013, 11:10 PM   #1
bcweis
LQ Newbie
 
Registered: Dec 2013
Posts: 2

Rep: Reputation: Disabled
Need help assembling RAID array that corrupted


I have an iomega nas. Well two of them; each 4 drives in RAID 5. One of them died, so I'm using SSH between the two to compare settings, etc. I'm a windows geek so don't bash! (no pun intended.)

Anyway, I've been reading and know that somehow the array got corrupted, but I don't think the data itself is gone.

As you can see below, there are four drives; two are in synch, two are marked as removed, and two marked as spare. In actuality, the two that are spare have data and should be part of the array. What mdadm commands can I issue, if any, to force those spares back into the array without wiping them?

root@san01:/etc# mdadm --detail /dev/md1
/dev/md1:
Version : 01.00
Creation Time : Thu Jul 30 16:54:11 2009
Raid Level : raid5
Used Dev Size : 974722176 (929.57 GiB 998.12 GB)
Raid Devices : 4
Total Devices : 4
Preferred Minor : 1
Persistence : Superblock is persistent

Update Time : Mon Dec 9 22:10:12 2013
State : active, degraded, Not Started
Active Devices : 2
Working Devices : 4
Failed Devices : 0
Spare Devices : 2

Layout : left-symmetric
Chunk Size : 64K

Name : storage:1
UUID : 2845dd39:0601db84:07a40aea:6bf143a7
Events : 266546

Number Major Minor RaidDevice State
0 0 0 0 removed
4 8 18 1 active sync /dev/sdb2
2 0 0 2 removed
5 8 50 3 active sync /dev/sdd2

2 8 34 - spare /dev/sdc2
6 8 2 - spare /dev/sda2
 
Old 12-11-2013, 01:41 AM   #2
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 1,102

Rep: Reputation: 181Reputation: 181
if it is RAID 5 configured, and 2 are down. I don't think you can still recover your data.

if i'm not wrong it's only 1% tolerance, means RAID 5 is up and running while 1 disk is offline or spoiled. If two or more goes down, the array or the RAID 5 data will be blown away.

check out this link for mdadm commands: http://www.ducea.com/2009/03/08/mdadm-cheat-sheet/
 
Old 12-11-2013, 02:03 AM   #3
bcweis
LQ Newbie
 
Registered: Dec 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
So yeah, I'm pretty confident that the array isn't hosed. (at least I'm telling myself that.) The drives are healthy, but mdadm sees two drives as spare but they should be part of the four disk array.

I made some progress since OP; I was able to run:
mdadm --create /dev/md1 --assume-clean --level=5 --verbose --raid-devices=4 /dev/sda2 /dev/sdb2 /dev/sdc2 /dev/sdd2

Then, all drives appeared healthy and in sync. (all Event IDs are/were the same). Next problem came with trying to mount. I wasn't sure of the file system, but it appeared to be xfs by comparing to the other NAS box. I had to edit mtab to get the mounts set because mount first complained that it wasn't set in the config. (which is weird, as I thought a manual mount should work, too.)

The mount failed, and the logs stated:
XFS: bad magic number
XFS: SB validate failed

So at this point, I'm running xfs_repair -n per this post: http://hardforum.com/showthread.php?t=1476237

This guy's scan ran a few hours... but found a candidate SB for secondary, then re-running xfs_repair without the -n switch fixed it for him. I'm crossing fingers here.

I didn't know a lick of this Linux stuff before today... took me too many google searches just to figure out how to use vi to f'n insert text! I don't know how you guys do it!
 
Old 12-11-2013, 02:38 AM   #4
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 1,102

Rep: Reputation: 181Reputation: 181
Good luck then.. hope you can fixed it..

yeah it took me sometime to get around vi, but the clue is just a shift semi-colon, plus the command.

shift-semi colon: press i to insert (and you can insert, edit or delete)

press "esc" key (to exit from insert mode)

shift-semi colon again: :wq (write and quit)

i also know only these very basic stuff also...
 
  


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
[SOLVED] Slackware startup scripts not assembling my raid (md) devices. deeelwy Slackware 4 01-13-2012 08:14 PM
Raid 10 not assembling mdadm assembled from 2 drives - not enough to start the array Nemus Linux - Server 1 02-21-2011 12:27 AM
[SOLVED] RAID 5 array not assembling all 3 devices on boot using MDADM, one is degraded. kirby9 Linux - Software 11 11-20-2010 11:32 AM
Problem Assembling RAID 0 arrays during bootup matrix007 Linux - Server 2 04-05-2009 09:39 AM
mdadm: re-assembling raid array on new installation hamish Linux - Server 3 06-10-2007 03:23 PM


All times are GMT -5. The time now is 03:13 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration