2004-01-15 17:48:13

by Carlos Velasco

[permalink] [raw]
Subject: iswraid calling modprobe when scsi statically compiled?

Hello,

I'm trying to use Intel Software Raid provided patch in:
http://marc.theaimsgroup.com/?l=linux-kernel&m=106972332715043&w=2

However, it seems to be calling modprobe although SCSI support is
statically configured in the kernel:

modules.conf:
alias block-major-8 sd_mod

.config (kernel):
CONFIG_SCSI=y
CONFIG_BLK_DEV_SD=y
CONFIG_SD_EXTRA_DEVS=40

Booting:

<6>iswraid: Intel(tm) Software RAID driver Version 0.0.6
<3>kmod: failed to exec /sbin/modprobe -s -k block-major-8, errno = 2
<-- ***
<7>iswraid: No raid array found
<6>SCSI subsystem driver Revision: 1.00
<7>libdata version 0.81 loaded.
<7>ata_piix version 0.95
<7>PCI: Setting latency timer of device 00:1f.2 to 64
<6>ata1: SATA max UDMA/133 cmd 0xC000 ctl 0xC402 bmdma 0xD000 irq 18
<6>ata2: SATA max UDMA/133 cmd 0xC800 ctl 0xC402 bmdma 0xD000 irq 18
<7>ata1: dev 0 cfg 49:2f00 82:7c69 83:7f09 84:4003 85:7c69 86:3e01
87:4003 88:407f
<6>ata1: dev 0 ATA, max UDMA/133, 160086528 sectors (lba48)
<6>ata1: dev 0 configured for UDMA/133
<7>ata2: dev 0 cfg 49:2f00 82:7c69 83:7f09 84:4003 85:7c69 86:3e01
87:4003 88:407f
<6>ata2: dev 0 ATA, max UDMA/133, 160086528 sectors (lba48)
<6>ata2: dev 0 configured for UDMA/133
<6>scsi0 : ata_piix
<6>scsi1 : ata_piix
...

It can't succed because I'm booting without modprobe at all (Intel RAID
card is the only one controller).
Any help would be apreciated.

Regards,
Carlos Velasco



2004-01-15 18:09:55

by Sergey Vlasov

[permalink] [raw]
Subject: Re: iswraid calling modprobe when scsi statically compiled?

On Thu, 15 Jan 2004 18:47:57 +0100 Carlos Velasco wrote:

> I'm trying to use Intel Software Raid provided patch in:
> http://marc.theaimsgroup.com/?l=linux-kernel&m=106972332715043&w=2
>
> However, it seems to be calling modprobe although SCSI support is
> statically configured in the kernel:
>
> modules.conf:
> alias block-major-8 sd_mod
>
> .config (kernel):
> CONFIG_SCSI=y
> CONFIG_BLK_DEV_SD=y
> CONFIG_SD_EXTRA_DEVS=40
>
> Booting:
>
> <6>iswraid: Intel(tm) Software RAID driver Version 0.0.6
> <3>kmod: failed to exec /sbin/modprobe -s -k block-major-8, errno = 2
> <-- ***
> <7>iswraid: No raid array found
> <6>SCSI subsystem driver Revision: 1.00
> <7>libdata version 0.81 loaded.
> <7>ata_piix version 0.95
> <7>PCI: Setting latency timer of device 00:1f.2 to 64
> <6>ata1: SATA max UDMA/133 cmd 0xC000 ctl 0xC402 bmdma 0xD000 irq 18
> <6>ata2: SATA max UDMA/133 cmd 0xC800 ctl 0xC402 bmdma 0xD000 irq 18
> <7>ata1: dev 0 cfg 49:2f00 82:7c69 83:7f09 84:4003 85:7c69 86:3e01
> 87:4003 88:407f
> <6>ata1: dev 0 ATA, max UDMA/133, 160086528 sectors (lba48)
> <6>ata1: dev 0 configured for UDMA/133
> <7>ata2: dev 0 cfg 49:2f00 82:7c69 83:7f09 84:4003 85:7c69 86:3e01
> 87:4003 88:407f
> <6>ata2: dev 0 ATA, max UDMA/133, 160086528 sectors (lba48)
> <6>ata2: dev 0 configured for UDMA/133
> <6>scsi0 : ata_piix
> <6>scsi1 : ata_piix
> ...
>
> It can't succed because I'm booting without modprobe at all (Intel RAID
> card is the only one controller).
> Any help would be apreciated.

The problem is in the initialization ordering. iswraid must initialize
after SCSI, but it is located in the IDE drivers directory, and
therefore is initialized before SCSI. So it won't work when built into
the kernel.

If you build iswraid as module and load it from initrd (after the SCSI
subsystem is initialized and raw drives are detected), it should work.

2004-01-15 19:06:07

by Kannanthanam, Boji T

[permalink] [raw]
Subject: RE: iswraid calling modprobe when scsi statically compiled?

>
> The problem is in the initialization ordering. iswraid must initialize
> after SCSI, but it is located in the IDE drivers directory, and
> therefore is initialized before SCSI. So it won't work when built into
> the kernel.
>
> If you build iswraid as module and load it from initrd (after the SCSI
> subsystem is initialized and raw drives are detected), it should work.
>

As pointed this in an unfortunate side effect of the nature of driver
dependency: iswraid (in ataraid/IDE subsystem) depending on ata_piix (in
SCSI). The above solution will solve the issue.

But can anyone shed some light on resolving this issue other than
compiling the driver as kernel module ?
i.e is there a way I can change the order of driver initialization in
the kernel ? Load SCSI subsystem before IDE ?

Thanks,
boji

2004-01-19 21:49:23

by Beratco Matei jr.

[permalink] [raw]
Subject: RE: iswraid calling modprobe when scsi statically compiled?

In the top Makefile look for the following lines:
DRIVERS-$(CONFIG_IDE) += drivers/ide/idedriver.o
DRIVERS-$(CONFIG_FC4) += drivers/fc4/fc4.a
DRIVERS-$(CONFIG_SCSI) += drivers/scsi/scsidrv.o
These are taken from 2.4.23 patched with libata and iswraid.
You can move the line with SCSI before the one with
IDE (the rest does not matter) and recompile.

It worked for me, and i'm booting from 2 Seagate 80Gb
HDD's in RAID0 (so no modules allowed for SATA/SCSI/RAID).



2004-01-20 10:32:02

by Carlos Velasco

[permalink] [raw]
Subject: Re[2]: iswraid calling modprobe when scsi statically compiled?

On 19/01/2004 at 23:49 Beratco Matei jr. wrote:

>You can move the line with SCSI before the one with
>IDE (the rest does not matter) and recompile.

It worked perfectly. Thanks.

>It worked for me, and i'm booting from 2 Seagate 80Gb
>HDD's in RAID0 (so no modules allowed for SATA/SCSI/RAID).

* Sorry by the off-topic *
However I have problems when booting. I'm using GRUB trying to boot
directly over ICH5R RAID without any success. It doesn't see any known
filesystem in (hd0).
Are you booting directly to RAID disks? I'm using RAID1, it may be a
bit different.
What boot loader are you using?

Regards,
Carlos Velasco


2004-01-22 15:19:11

by Beratco Matei jr.

[permalink] [raw]
Subject: Re: iswraid calling modprobe when scsi statically compiled?


>* Sorry by the off-topic *
>However I have problems when booting. I'm using GRUB trying to boot
>directly over ICH5R RAID without any success. It doesn't see any known
>filesystem in (hd0).
>Are you booting directly to RAID disks? I'm using RAID1, it may be a
>bit different.
>What boot loader are you using?
>
>
I'm using grub from RedHat 9. I did have redhat installed on my 3rd disk
and moved it to my
raid array (a lot later). When I installed it, i had to install grub on
floppy,
boot from floppy, enter command-line and install to HDD from floppy.
This is because
the grub from redhat (i mean after you booted) doesn't detect the RAID
correctly, and still sees
hd0 as the primary master disk (hda, my 3rd disk).

Anyway, this is what i've done, and it works. I actually installed it on
the ext3 partition (from my
raid) , and the MBR is the "standard" one from windows, with the ext3 as
primary (so I can
reinstall the other OS anytime without reinstalling grub).