LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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-05-2015, 03:28 PM   #1
tlagren
LQ Newbie
 
Registered: Jun 2004
Distribution: RHEL
Posts: 11

Rep: Reputation: 0
Cannot recover software RAID5


Hi, I'm having big problem with a RAID5 recovery on my home server.

I was running CentOS 6, latest patchlevel and had a mdadm created RAID5 for data storage with three disks.

After a failure of the boot disk which wasn't part of any raid configuration I'm not able to assemble the old raid again.

Here is what I found so far.

The disks used in the array is /dev/sdc, /dev/sdd and /dev/sde and they all contains one raid partition.
Code:
[root@tor ~]# fdisk -l /dev/sdc

Disk /dev/sdc: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1       38913   312568641   fd  Linux raid autodetect
When I try to assemble the array with scan it doesn't find anything.
Code:
[root@tor ~]# mdadm --assemble --verbose --scan
mdadm: looking for devices for further assembly
mdadm: no recogniseable superblock on /dev/dm-1
mdadm: Cannot assemble mbr metadata on /dev/dm-0
mdadm: Cannot assemble mbr metadata on /dev/sde
mdadm: Cannot assemble mbr metadata on /dev/sdd
mdadm: Cannot assemble mbr metadata on /dev/sdc
mdadm: Cannot assemble mbr metadata on /dev/sdb
mdadm: Cannot assemble mbr metadata on /dev/sda
mdadm: No arrays found in config file or automatically
When executed mdadm --examine I noticed strange things.
It looks like mdadm cannot see the partition sdc1 and it's the same thing with sdd and sde drives.
Code:
[root@tor ~]# mdadm --examine /dev/sdc
/dev/sdc:
   MBR Magic : aa55
Partition[0] :    625137282 sectors at           63 (type fd)
[root@tor ~]# 
[root@tor ~]# 
[root@tor ~]# mdadm --examine /dev/sdc1
mdadm: cannot open /dev/sdc1: No such file or directory
If I execute the blkid command I noticed that the TYPE of all my three raid member drives has the TYPE="hpt45x_raid_member". I think this have something to do with that the disk are connected to an old Rocket Raid controller, but due to the lack of good Linux drivers for the raid usage I don't use the hardware raid features and used the software raid instead. So the rocket card are just used an extended SATA controller.
Do you think that the disk TYPE can cause my problems?
Code:
[root@tor ~]# blkid /dev/sdc
/dev/sdc: TYPE="hpt45x_raid_member"

One thing I was thinking about but haven't tried it yet because I'm not sure if it's safe to do. Some people mention that mdadm is smart when creating a new array so if I would create a new raid5 array with my disk mdadm will find that the disk already have a raid signature and don't wipe the disks. Perhaps it would be safe if I'm using the assume-clean arument? What do you think?

Do you have any ideas what I can do to recreate my raid array and get the data back again? I don't have any copy of the old /etc/mdadm.conf file left.

/Tomas
 
Old 03-05-2015, 03:50 PM   #2
tlagren
LQ Newbie
 
Registered: Jun 2004
Distribution: RHEL
Posts: 11

Original Poster
Rep: Reputation: 0
Some more information
Code:
[root@tor ~]# mdadm --assemble --verbose /dev/md0 /dev/sdc1 /dev/sdd1 /dev/sde1
mdadm: looking for devices for /dev/md0
mdadm: cannot open device /dev/sdc1: No such file or directory
mdadm: /dev/sdc1 has no superblock - assembly aborted
 
Old 03-05-2015, 03:58 PM   #3
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,140

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
RocketRaid uses the Highpoint RAID controller chip, which does have a Linux driver. Are you sure you didn't have that enabled? Before modifying the drives check with dmraid to make sure they weren't using the controller RAID. It's very suspicious that you lost your partitions. That sounds like whole-drive RAID was enabled.
 
Old 03-05-2015, 04:37 PM   #4
tlagren
LQ Newbie
 
Registered: Jun 2004
Distribution: RHEL
Posts: 11

Original Poster
Rep: Reputation: 0
I see I've got the driver loaded
Code:
[root@tor ~]# lsmod | grep hpt
hptiop                 13838  0 
pata_hpt37x            12778  0
I also see the disks with dmraid -r but I'm not still sure I've used the hpt features. I almost 100% sure that i used md raid, but can there have been some mix with the hpt driver or similar, I don't really understand this.
The sda/sdb devices below my current boot disk and are not included in the old array.
Code:
[root@tor ~]# dmraid -r
/dev/sde: hpt45x, "hpt45x_SPARE", spare, ok, 625142437 sectors, data@ 0
/dev/sdd: hpt45x, "hpt45x_SPARE", spare, ok, 625142437 sectors, data@ 0
/dev/sdc: hpt45x, "hpt45x_SPARE", spare, ok, 625142437 sectors, data@ 0
/dev/sdb: nvidia, "nvidia_adadfdhf", mirror, ok, 488397166 sectors, data@ 0
/dev/sda: nvidia, "nvidia_adadfdhf", mirror, ok, 488397166 sectors, data@ 0
/Tomas
 
Old 03-05-2015, 05:14 PM   #5
tlagren
LQ Newbie
 
Registered: Jun 2004
Distribution: RHEL
Posts: 11

Original Poster
Rep: Reputation: 0
Now I found something interesting. I unloaded the hptiop and pata_hpt37x module and loaded them again and then the array was available.
Code:
[root@tor ~]# mdadm --detail --scan
ARRAY /dev/md/2 metadata=1.2 name=tor.lagren.com:2 UUID=1e183967:b225b24d:0e4381ad:ac1a3fbf

[root@tor ~]# mdadm --detail /dev/md2
/dev/md2:
        Version : 1.2
  Creation Time : Sun Oct 30 14:47:31 2011
     Raid Level : raid5
     Array Size : 625134592 (596.17 GiB 640.14 GB)
  Used Dev Size : 312567296 (298.09 GiB 320.07 GB)
   Raid Devices : 3
  Total Devices : 3
    Persistence : Superblock is persistent

    Update Time : Fri Mar  6 00:47:49 2015
          State : clean 
 Active Devices : 3
Working Devices : 3
 Failed Devices : 0
  Spare Devices : 0

         Layout : left-symmetric
     Chunk Size : 512K

           Name : tor.lagren.com:2  (local to host tor.lagren.com)
           UUID : 1e183967:b225b24d:0e4381ad:ac1a3fbf
         Events : 1535

    Number   Major   Minor   RaidDevice State
       0       8       33        0      active sync   /dev/sdc1
       1       8       49        1      active sync   /dev/sdd1
       3       8       65        2      active sync   /dev/sde1
I created a new mdadm.conf and activated the LVM volume group and now all my logical volumes are in perfect condition.

After reboot it's the same problem again, reload the hpt modules and everything is Ok...

/Tomas
 
Old 03-05-2015, 05:37 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Quote:
Originally Posted by tlagren View Post
I was running CentOS 6, latest patchlevel and had a mdadm created RAID5 for data storage with three disks.

After a failure of the boot disk which wasn't part of any raid configuration I'm not able to assemble the old raid again.
What distro/version are you using when attempting the recovery ?.
 
Old 03-05-2015, 05:50 PM   #7
tlagren
LQ Newbie
 
Registered: Jun 2004
Distribution: RHEL
Posts: 11

Original Poster
Rep: Reputation: 0
I'm using CentOS 6.6 and all updates are installed.

It feels like the modules are loaded in the wrong order or so. I can't remember I did something special with this the last time I installed the server. Everything works, but when booted I need to reload the hpt module and when I do that the array loads directly.

/Tomas
 
Old 03-05-2015, 06:00 PM   #8
tlagren
LQ Newbie
 
Registered: Jun 2004
Distribution: RHEL
Posts: 11

Original Poster
Rep: Reputation: 0
Here is the complete process I do to make the array running after a reboot.

Code:
[root@tor ~]# cat /proc/mdstat 
Personalities : 
unused devices: <none>


[root@tor ~]# lsmod | grep hpt
hptiop                 13838  0 
pata_hpt37x            12778  0 


[root@tor ~]# service mdmonitor stop
Killing mdmonitor:                                         [  OK  ]


[root@tor ~]# modprobe -r hptiop ; modprobe -r pata_hpt37x ; modprobe pata_hpt37x ; modprobe hptiop


[root@tor ~]# cat /proc/mdstat 
Personalities : [raid6] [raid5] [raid4] 
md2 : active raid5 sde1[3] sdd1[1] sdc1[0]
      625134592 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/3] [UUU]
      
unused devices: <none>


[root@tor ~]# service mdmonitor start
Starting mdmon:                                            [  OK  ]
Starting mdmonitor:                                        [  OK  ]
/Tomas
 
Old 03-05-2015, 06:10 PM   #9
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
I missed your post #5 before I posted.
Have you tried just unloading the modules (not reloading them again) ?
If that works, just blacklist the htp.
 
Old 03-06-2015, 01:09 AM   #10
tlagren
LQ Newbie
 
Registered: Jun 2004
Distribution: RHEL
Posts: 11

Original Poster
Rep: Reputation: 0
If i unload the modules without loading them again the drives completely disappear so I think I need to have the driver loaded.
I just got back my /etc catalog from the old server installation and I checked /etc/mdadm.conf and also /etc/modprobe.d/blacklist.conf and there was no special configuration in mdadm.conf and no blacklists. I copied back the mdadm.conf but are stuck in the same situation.

/Tomas
 
Old 03-06-2015, 01:41 AM   #11
tlagren
LQ Newbie
 
Registered: Jun 2004
Distribution: RHEL
Posts: 11

Original Poster
Rep: Reputation: 0
I'm replying to my self again :-) Now I got it working!
I added the nodmraid option to the grub configuration and now the drives shows up correctly at boot and the array is autostarting.

So why did I need to add that option? The old server was installed with CentOS 6.0 and upgraded whenever new releases was available. The restored server was installed with CentOS 6.2 (that was the image I had available and then upgraded to latest version with yum update).

I don't have the old /boot partition left so I can't very that I didn't put the nodmraid option in the old installation but I don't think so.

/Tomas
 
Old 03-06-2015, 02:49 AM   #12
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
I'm guessing old format meta-data - nope, maybe not.

Last edited by syg00; 03-06-2015 at 03:48 AM.
 
  


Reply



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
recover encrypted raid5 DeepB Linux - Software 11 08-16-2014 04:10 AM
Please help me to recover my mdadm RAID5 array Slingky Linux - Server 1 05-12-2012 08:22 PM
Raid5 Failure on WD Sharespace, How to recover Volume Data? jonerikswyse Linux - Newbie 1 02-06-2012 06:37 AM
Recover mdadm Raid5 felix2k Linux - General 1 05-12-2011 07:02 AM
Recover mdadm RAID5 gorankav Linux - Server 2 02-04-2010 11:45 PM

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

All times are GMT -5. The time now is 08:52 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
Open Source Consulting | Domain Registration