Re: starting second md device at boot time
On Wednesday 28 July 2004 02:17, Richard Marshall wrote:
> >Hi Rich,
> >
> >Just a few basic questions, since you always try the easy way first.
> > Are your partitions that make up /dev/md1 marked as linux raid
> > autodetect (FD)? Is your second raid device present in fstab?
>
> The partitions are marked as fd, and the array creates sucessfully. I
> also have an appropriate entry in /etc/fstab.
>
Out of curiosity, what does the line look like?
> Also, if I run 'mdadm --assemble /dev/md1 /dev/sda5 /dev/sdb5' after the
> reboot, the the array appears again, and I can mount it without any
> problems.
>
> >Once those two things are verified, post the boot up output related to
> > the second raid array, and maybe we can help more. Also, post the
> > output of /proc/mdstat after the boot.
>
> The output of /proc/mdstat before a reboot is:
>
> Personalities : [raid1]
> md1 : active raid1 sda5[0] sdb5[1]
> 60934400 blocks [2/2] [UU]
>
> md0 : active raid1 sda3[0] sdb3[1]
> 8787456 blocks [2/2] [UU]
>
> unused devices: <none>
>
> After reboot it is:
>
> Personalities : [raid1]
> md0 : active raid1 sda3[0] sdb3[1]
> 8787456 blocks [2/2] [UU]
>
> unused devices: <none>
>
>
> I have also run dpkg-reconfigure mdadm after creating the new array, and
> I can't help feeling it something to do with this. I have tried putting
> an appropriate entry into /etc/mdadm/mdadm.conf, but don't know what the
> exact format should be. But here's what I have so far:
>
> DEVICE /dev/sda* /dev/sdb*
> ARRAY /dev/md1 UUID=263f5308:d2877768:142f22b5:c434a317
> devices=/dev/sda5,/dev/sdb5
>
Since you've got your raid going (after the manual start), you can create
your config file automatically. Just issue the command "mdadm --detail
--scan" and redirect the output to /etc/mdadm.conf. You'll then have to
manually add the device line, and even though you can, I wouldn't use
wildcards, I'd spell out each device involved in the raid. In your case,
I'm guessing the file could end up looking like this (at least for md1):
device /dev/sda5 /dev/sdb5 /dev/sda3 /dev/sdb3
array /dev/md1 UUID=263f5308:d2877768:142f22b5:c434a317
devices=/dev/sda5,/dev/sdb5
Of course, the last two lines are actually one line in the config file.
Note that while you don't need a config file, without one "you'd need to
specify more detailed information about an array on the command in order to
activate it." [1] Also note that you only need one device line for the
config file. You don't need one per array.
>
> I presume you mean the dmesg output, so relevant bits are below, but
> there is no mention of the md device in there (part of the problem I
> guess). The problem md device has xfs format on it and you can see that
> failing to find the superblock(?) on the last line I've included:
>
>
> Attached scsi disk sdb at scsi0, channel 0, id 1, lun 0
> md: md0 stopped.
> md: bind<sdb3>
> md: bind<sda3>
> raid1: raid set md0 active with 2 out of 2 mirrors
> kjournald starting. Commit interval 5 seconds
> EXT3-fs: mounted filesystem with ordered data mode.
> kjournald starting. Commit interval 5 seconds
> EXT3-fs: mounted filesystem with ordered data mode.
> Adding 979956k swap on /dev/sda2. Priority:-1 extents:1
> Adding 979956k swap on /dev/sdb2. Priority:-2 extents:1
> EXT3 FS on md0, internal journal
> Real Time Clock Driver v1.12
> Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
> ide: Assuming 33MHz system bus speed for PIO modes; override with
> idebus=xx hdc: GCR-8483B, ATAPI CD/DVD-ROM drive
> ide1 at 0x170-0x177,0x376 on irq 15
> hdc: ATAPI 48X CD-ROM drive, 128kB Cache
> Uniform CD-ROM driver Revision: 3.20
> Capability LSM initialized
> device-mapper: 4.1.0-ioctl (2003-12-10) initialised: dm@uk.sistina.com
> kjournald starting. Commit interval 5 seconds
> EXT3 FS on sda1, internal journal
> EXT3-fs: mounted filesystem with ordered data mode.
> kjournald starting. Commit interval 5 seconds
> EXT3 FS on sdb1, internal journal
> EXT3-fs: mounted filesystem with ordered data mode.
> SGI XFS with ACLs, security attributes, realtime, large block numbers, no
> debug enabled
> SGI XFS Quota Management subsystem
> XFS: SB read failed
>
> Other information: Kernel is sarge 2.6.7-1-686,
> Lilo does the boot honours, and I'm sure that md is a module, not
> compiled into the kernel (but how do I confirm?)
>
> Thanks again,
>
> Rich
You can confirm that md is a module by either looking
at /boot/config-2.6.7-1-686 or by looking at the output of lsmod. Either
way, the raid capability is there, as your first raid array is built and
mounted correctly upon boot.
While you're searching for the md module, you might also check the xfs
module. I'm pretty sure it's loaded, as the last three lines of dmesg seem
to indicate, but you should probably check just to be sure.
If setting up your config file fails, post the output of "mdadm
-E /dev/sda5" and "mdadm -E /dev/sdb5".
HTH
Justin Guerin
[1]
http://www.networknewz.com/networknewz-10-20030113mdadm-A-New-Tool-For-Linux-Software-RAID-Management.html
p.s. I'm copying the list, as someone may know more than I do. Also, people
searching the list may benefit from your experience.
Reply to: