LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   RAID mdadm cant add disks to array (https://www.linuxquestions.org/questions/linux-software-2/raid-mdadm-cant-add-disks-to-array-831428/)

vockleya 09-10-2010 01:18 PM

RAID mdadm cant add disks to array
 
I have a 7-drive RAID array on my computer. Recently, my SATA PCI card died, and after going through multiple cards to find another one that worked with linux, I now can't assemble the array. The drives are no longer in the order they were in previously, and mdadm can't seem to reassemble the array. It says there are 2 drives and one spare, even though there were 7 drives and no spares. I know for a fact that none of the drives are corrupted, because one of the non-working RAID cards was still able to mount the array for a short period, but would loose the drives during resyncing (I later found out that the chipset on the card was had extremely limited linux support). I have tried running "mdadm --assemble --scan" and after the drive is partially assembled, I add the other drives with "mdadm --add /dev/md0 /dev/sdc1". These both return errors and will not complete on the new raid card.


Code:

aaron-desktop:~ aaron$ sudo mdadm --assemble /dev/md0
mdadm: /dev/md0 assembled from 2 drives and 1 spare - not enough to start the array.
/dev/md0: File exists
mdadm: SET_ARRAY_INFO failed for /dev/md/0: Device or resource busy
aaron-desktop:~ aaron$ sudo mdadm --add /dev/md0 /dev/sdc1
mdadm: cannot get array info for /dev/md0

Any help would be greatly appreciated.

MensaWater 09-10-2010 01:49 PM

This seems a bit confused. mdadm is "software" RAID whereas a "raid card" would be "hardware" RAID. Typically hardware RAID controllers are configured to provided RAID sets (LUNs) to the OS which then sees the sets as individual disks.

For example if you had a RAID card that allowed for multiple RAID sets and you had 7 disks you might build 1 RAID1 of 2 disks and a separate RAID5 of 5 disks. The OS would see the RAID1 LUN as a single disk (say /dev/sda) and the RAID5 LUN as a separate single disk (say /dev/sdb) even though you actually had 7 drives total. (You COULD then put these 2 LUNs into a single software RAID (mdadm) metadisk just as you could if they had been individual disks not presented by a RAID card.)

I'm wondering if your old RAID card wasn't presenting LUNs that the new one doesn't understand. Typically you can replace failing RAID cards and recover the hardware RAID configuration from the drives to the new card but these have to be usually have to be the same model (or at least same manufacturer). From the way you wrote your comments it sounds like you replaced the RAID card with one from a different manufacturer that was more Linux friendly.

vockleya 09-10-2010 02:18 PM

Sorry for the confusion. The raid card I keep referring to is actually just a PCI SATA card. I ran out of SATA ports on the motherboard and am using the PCI card to get extra ports. The OS sees every drive separately. No RAID is being done in hardware. The array is being run by mdadm from within the system.

vockleya 09-10-2010 06:13 PM

Well I think I'm getting somewhere. Now I run an assemble and it finds the drives, but it says they are all busy and have the wrong uuid. It also says something about missing superblocks.

The raid drives are sdb1, sdc1, sdd, sde1, sdf1, sdg, and sdh.


Code:

aaron-desktop:~ aaron$ sudo mdadm --assemble /dev/md0 --update=summaries --verbose
[sudo] password for aaron:
mdadm: looking for devices for /dev/md0
mdadm: cannot open device /dev/sdh: Device or resource busy
mdadm: /dev/sdh has wrong uuid.
mdadm: cannot open device /dev/sdg: Device or resource busy
mdadm: /dev/sdg has wrong uuid.
mdadm: cannot open device /dev/sdf1: Device or resource busy
mdadm: /dev/sdf1 has wrong uuid.
mdadm: cannot open device /dev/sdf: Device or resource busy
mdadm: /dev/sdf has wrong uuid.
mdadm: /dev/sdb1 has wrong uuid.
mdadm: no recogniseable superblock on /dev/sdb
mdadm: /dev/sdb has wrong uuid.
mdadm: cannot open device /dev/sde1: Device or resource busy
mdadm: /dev/sde1 has wrong uuid.
mdadm: cannot open device /dev/sde: Device or resource busy
mdadm: /dev/sde has wrong uuid.
mdadm: /dev/sdd has wrong uuid.
mdadm: /dev/sdc1 has wrong uuid.
mdadm: no recogniseable superblock on /dev/sdc
mdadm: /dev/sdc has wrong uuid.
mdadm: cannot open device /dev/sda7: Device or resource busy
mdadm: /dev/sda7 has wrong uuid.
mdadm: cannot open device /dev/sda6: Device or resource busy
mdadm: /dev/sda6 has wrong uuid.
mdadm: cannot open device /dev/sda5: Device or resource busy
mdadm: /dev/sda5 has wrong uuid.
mdadm: no recogniseable superblock on /dev/sda2
mdadm: /dev/sda2 has wrong uuid.
mdadm: cannot open device /dev/sda1: Device or resource busy
mdadm: /dev/sda1 has wrong uuid.
mdadm: cannot open device /dev/sda: Device or resource busy
mdadm: /dev/sda has wrong uuid.
mdadm: no devices found for /dev/md0

Is the still a chance of saving this array?

vockleya 09-13-2010 05:37 PM

Any ideas? Anything at all?


All times are GMT -5. The time now is 05:53 PM.