New IT forum
11 August 2022, 05:28:40 pm *
Welcome, %1$s. Please login or register.

: CubieBoard 2 and Cubietruck both now in stock.
 
Pages: [1]

Author Topic: Autodetecting a RAID array  (Read 5411 times)

fdaniel

  • Guest
Autodetecting a RAID array
« on: 19 October 2010, 08:24:09 am »

Hello,

I've got a problem with my setup : I've plugged an eSATA rack (Lian-Li EX-50) on my Sheevaplug, it's currently housing 3 disks. I'm able to create a RAID-5 array on them, the partition types are adjusted to FD (Linux RAID autodetect), I've also added the needed infos to /etc/mdmadm/mdadm.conf :

Code: [Select]
# mdadm.conf
#
# Please refer to mdadm.conf(5) for information about this file.
#

# by default, scan all partitions (/proc/partitions) for MD superblocks.
# alternatively, specify devices to scan, using wildcards if desired.
DEVICE partitions

# auto-create devices with Debian standard permissions
CREATE owner=root group=disk mode=0660 auto=yes

# automatically tag new arrays as belonging to the local system
HOMEHOST <system>

# instruct the monitoring daemon where to send mail alerts
MAILADDR ***@***

# definitions of existing MD arrays
ARRAY /dev/md0 auto=yes level=raid5 num-devices=3 UUID=47f8f83d:6f618a0f:88bd8d66:62182904

Alas when the system boots it doesn't activate the array, instead only one of the disks appears :

Code: [Select]
# cat /proc/mdstat
Personalities :
md0 : inactive sda1[1](S)
      1465135936 blocks

unused devices: <none>

If I launch a mdadm -As the array is correctly activated (currently under resync) :

Code: [Select]
# mdadm -As
mdadm: /dev/md0 has been started with 2 drives (out of 3) and 1 spare.
[email protected]:~# cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4]
md0 : active raid5 sdc1[0] sdb1[3] sda1[1]
      2930271872 blocks level 5, 64k chunk, algorithm 2 [3/2] [UU_]
      [>....................]  recovery =  0.0% (14208/1465135936) finish=5150.1min speed=4736K/sec

unused devices: <none>

I've added a rootdelay to bootargs, so I'm sure that the disks are detected correctly before the boot continues :

Code: [Select]
bootargs_root_nand=ubi.mtd=1 root=ubi0:rootfs rootfstype=ubifs rootdelay=10
Indeed dmesg shows :

Code: [Select]
Waiting 10sec before mounting root device...
ata2.01: hard resetting link
ata2.02: hard resetting link
ata2.03: hard resetting link
ata2.04: hard resetting link
ata2.05: hard resetting link
ata2.06: hard resetting link
ata2.07: hard resetting link
ata2.08: hard resetting link
ata2.09: hard resetting link
ata2.10: hard resetting link
ata2.11: hard resetting link
ata2.12: hard resetting link
ata2.13: hard resetting link
ata2.14: hard resetting link
ata2.00: ATA-7: WDC WD15EARS-00Z5B1, 0955, max UDMA/133
ata2.00: 2930277168 sectors, multi 1: LBA48
ata2.00: configured for UDMA/133
ata2.01: ATA-8: WDC WD15EARS-00S8B1, 80.00A80, max UDMA/133
ata2.01: 2930277168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata2.01: configured for UDMA/133
ata2.02: ATA-8: WDC WD15EARS-22Z5B1, 80.00A80, max UDMA/133
ata2.02: 2930277168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata2.02: configured for UDMA/133
ata2: EH complete
scsi 1:0:0:0: Direct-Access     ATA      WDC WD15EARS-00Z 0955 PQ: 0 ANSI: 5
sd 1:0:0:0: [sda] 2930277168 512-byte logical blocks: (1.50 TB/1.36 TiB)
sd 1:0:0:0: Attached scsi generic sg0 type 0
scsi 1:1:0:0: Direct-Access     ATA      WDC WD15EARS-00S 80.0 PQ: 0 ANSI: 5
sd 1:0:0:0: [sda] Write Protect is off
sd 1:0:0:0: [sda] Mode Sense: 00 3a 00 00
sd 1:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
sd 1:1:0:0: [sdb] 2930277168 512-byte logical blocks: (1.50 TB/1.36 TiB)
sd 1:1:0:0: Attached scsi generic sg1 type 0
scsi 1:2:0:0: Direct-Access     ATA      WDC WD15EARS-22Z 80.0 PQ: 0 ANSI: 5
 sda:
sd 1:1:0:0: [sdb] Write Protect is off
sd 1:1:0:0: [sdb] Mode Sense: 00 3a 00 00
sd 1:1:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sd 1:2:0:0: [sdc] 2930277168 512-byte logical blocks: (1.50 TB/1.36 TiB)
 sda1
sd 1:2:0:0: Attached scsi generic sg2 type 0
sd 1:0:0:0: [sda] Attached SCSI disk
 sdb:
sd 1:2:0:0: [sdc] 4096-byte physical blocks
sd 1:2:0:0: [sdc] Write Protect is off
sd 1:2:0:0: [sdc] Mode Sense: 00 3a 00 00
sd 1:2:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
 sdb1
 sdc:
sd 1:1:0:0: [sdb] Attached SCSI disk
 sdc1
sd 1:2:0:0: [sdc] Attached SCSI disk

I've also tried with a RAID-1 array on only 2 disks, but it isn't better detected :( I'm probably missing an option somewhere in Ubuntu, but I don't see which one. So if somebody has a suggestion, I'll be pleased to try it.
Logged
Pages: [1]
 
 

Powered by MySQL Powered by PHP SMF 2.0.10 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!