Marvell Sata mv61xx 'RAID' on CENTOS 5.5 - No drive?

Hi,

I am trying to get a 'raid' controller working under Linux. It is a Marvell M88SE6145 based Sata raid.

I have been able to compile the driver and insmod it. But now I am stuck as nothing appears to have happened. I can't see anything in /dev that I could format or mount.

I readup on MDADM but that doesn't seem to find anything either.

Can anyone point me in the right direction?

The motherboard in question is http://linitx.com/viewproduct.php?prodid=12295
The raid card is http://linitx.com/viewproduct.php?prodid=12427 

I am running 2.6.18-194.17.1.el5 #1 SMP Wed Sep 29 12:51:33 EDT 2010 i686 i686 i386 GNU/Linux version of CENTOS 5.5 with the driver compiled against this version.
excelsupportAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

DavidPresidentCommented:
The specs show that this is a low, low-end controller.  It really brings nothing to the table.  Personally, I would not even use it, and go with the native md driver to perform RAID.  It is very likely that using the md controller will outperform the marvell board anyway.

excelsupportAuthor Commented:
It brings 4 sata ports to the table as opposed to the 2 that are on the motherboard.

This is being used as a small NAS box with 4 drive bays (plus the current OS drive).
excelsupportAuthor Commented:
It also keeps the one and only PCI slot free for other things...

Plus it is replacing an old NAS box running on a Via C3 @ 600MHz with a Sil Pata 'raid' - so however you cut it, it is still faster than the system it is replacing. The ultimate goal is to have a linux machine with plenty of storage that sits in a quiet corner looking after my photos etc and with an (intended design) power consumption of 40Watts or less.

Anyhoo - I have been looking through DMESG with a fine tooth comb and I can't see response from the 'raid' card when the drivers are installed. So I suspect that the driver (or the card) aren't playing nicely.

I'm not being naive am I? I mean, insmod the driver and I should see something about finding a card and preferably about the volumes attached to it right?
Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

excelsupportAuthor Commented:
Basically this thing isn't working as a 'raid' or as a bunch of Sata ports under Linux.

The driver doesn't appear to enable communication with the ports or disks.

Anyone have any suggestions before I add it to the pile of hardware that nearly worked with Linux?
DavidPresidentCommented:
Make sure the disks and controller agree on whether you should use SATA-1 or SATA-2.   Not all controllers support both speeds, same is true for disks.   Many drives have a jumper to specify interface speed, so check the manuals and make sure that everything is wired consistently, for a supported speed.
excelsupportAuthor Commented:
The drives and controller (though the controller documentation is a bit thin on the ground) both support SATAII.

I can restrict the disks to 1.5GB/s with jumpers but the controller doesn't have any configurable settings.

The controller detects the disks while in the BIOS (of the controller) and you can set up a 'raid' volume, but after Centos boots and I insmod the driver I don't see the disks anywhere.

lspci shows the controller is there...

00:00.0 Host bridge: Intel Corporation 82945G/GZ/P/PL Memory Controller Hub (rev 02)
00:02.0 VGA compatible controller: Intel Corporation 82945G/GZ Integrated Graphics Controller (rev 02)
00:1b.0 Audio device: Intel Corporation N10/ICH 7 Family High Definition Audio Controller (rev 01)
00:1c.0 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 1 (rev 01)
00:1d.0 USB Controller: Intel Corporation N10/ICH7 Family USB UHCI Controller #1 (rev 01)
00:1d.1 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #2 (rev 01)
00:1d.2 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #3 (rev 01)
00:1d.3 USB Controller: Intel Corporation N10/ICH 7 Family USB UHCI Controller #4 (rev 01)
00:1d.7 USB Controller: Intel Corporation N10/ICH 7 Family USB2 EHCI Controller (rev 01)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev e1)
00:1f.0 ISA bridge: Intel Corporation 82801GB/GR (ICH7 Family) LPC Interface Bridge (rev 01)
00:1f.2 IDE interface: Intel Corporation N10/ICH7 Family SATA IDE Controller (rev 01)
00:1f.3 SMBus: Intel Corporation N10/ICH 7 Family SMBus Controller (rev 01)
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 02)
02:07.0 PCI bridge: Marvell Technology Group Ltd. 88SB2211 PCI Express to PCI Bridge (rev 01)
03:00.0 RAID bus controller: Marvell Technology Group Ltd. 88SE6145 SATA II PCI-E controller (rev a1)


Kerem ERSOYPresidentCommented:
Hi,

As you've told you need this adapter for supporting 5 disks on board. You've also mentioned that you don't have a special drive under dev and mdadm does not detect anything.
Well in such a case I'll suggest you to stick with software raid instead of custom software RAID driver. Since the adapter you have is not a high end battery backup RAID adapter it won't do you no good.. But additionally it would give you a pain in the neck if it is out of order and needs to get replace. So I'll suggest you to go for generic Software RAID. This is being said it is normal that you don't see anything under MDADM. MDADM driver is the software RAID driver and is only there if you2ve created one or more software RAID partitions and it would contain nothing before you do so.


Will you post your fdisk -l output and and dmesg output alongwith lspci output.

Cheers,
K.
excelsupportAuthor Commented:
I'm happy to setup the disks as linux native software raid, after all that is just what the card (bios) and driver are doing...

Before I list fdisk I should explain that I disconnected the two 500GB SATA disks from the raid controller and connected them to the two on board SATA ports just to check they were ok, and to have a go at configuring a software raid.

I am only working with two disks until I have the controller working, then I will tear down and reconfigure the disk array, once I am happy.

I am accessing the box remotely at present so I can't physically reconfigure the drives right now but I will do that tonight and post another fdisk -l

fdisk -l shows

===================================

Disk /dev/hdd: 81.9 GB, 81964302336 bytes
255 heads, 63 sectors/track, 9964 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdd1   *           1          13      104391   83  Linux
/dev/hdd2              14        9964    79931407+  8e  Linux LVM

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1       60802   488383488    7  HPFS/NTFS

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       60802   488383488    7  HPFS/NTFS

Disk /dev/md0: 500.1 GB, 500104626176 bytes
2 heads, 4 sectors/track, 122095856 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md0 doesn't contain a valid partition table

========================================
Dmesg file attached

lspci hasn't changed so the above output is still valid


dmesg.txt
Kerem ERSOYPresidentCommented:
scsi0 : pata_marvell
scsi1 : pata_marvell
scsi2 : ata_piix
scsi3 : ata_piix
ata1: PATA max UDMA/100 cmd 0xef00 ctl 0xee00 bmdma 0xeb00 irq 169
ata2: PATA max UDMA/133 cmd 0xed00 ctl 0xec00 bmdma 0xeb08 irq 169
.
ata_piix 0000:00:1f.2: MAP [ P0 P2 IDE IDE ]
ata_piix 0000:00:1f.2: 0x170 IDE port busy

It says port busy. The marvell adapter tries to map your SATA drives to IDE port !!! But thanks god you have your physical IDA ports and it can!t..

Isn't it possible to configure your marvell card and configure it to use natve SATA / EHCI drive instead of back porting to IDE ??

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
excelsupportAuthor Commented:
I can't see anyway of configuring the card. There are no jumpers on the card and nothing in the cards bios other than the menus needed to create a raid array.

So the pata_marvell driver is the thing trying to enable the 4 sata ports on the daughter board?

Isn't ata_piix an intel chip and isn't this the 2 on-board sata controllers?

Perhaps they are conflicting with the daughter board sata ports. Think I will try disabling them when I have physical access to the box.
Kerem ERSOYPresidentCommented:
> Perhaps they are conflicting with the daughter board sata ports. Think I will try disabling them when I
> have physical access to the box.

It seems that the adapter supports SATA drives in PATA emulation only (not EHCI native SATA mode). Int this case it seems that on board ports are conflicting with extension board ports..

I think this is somehow unacceptable. I'll suggest you to return this entire hardware and buy a desktop board with 4 SATA porta with EHCI support and then go for OpenFiler as a NAS OS. Just my 5 cents :))

Cheers,
K.
Kerem ERSOYPresidentCommented:
Do you have a copy of the BIOS screesn and manual in pdf format ? Jsut post here and let me chck it.
excelsupportAuthor Commented:
You can download the 'manual' here (For what its worth). It covers all the daughter boards for these mini-itx motherboards. You will need to go to page 20.

http://download.jetway.com.tw/download/manual/IPC%20Daughter%20Card%20Manua1.rar

It has some screenshots.

I assume you were looking for a JBOD setting - there isn't one.

As for replacing it with a desktop board - yes it would be easier, but it wouldn't fit into the small NAS case that I am using and it would take considerably more power than the 8Watts or so this board consumes.

You mentioned AHCI - that reminded me of this, which I tried a while back, but didn't seem to help.

http://old.nabble.com/How-to-get-a-Marvell-88SE6145-(and-probably-6121)-sata-controller%09working-on-new-kernels-td20079927.html


excelsupportAuthor Commented:
With the drives back on the Marvell controller fdisk -l show this:

[root@localhost dev]# fdisk -l

Disk /dev/hdd: 81.9 GB, 81964302336 bytes
255 heads, 63 sectors/track, 9964 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdd1   *           1          13      104391   83  Linux
/dev/hdd2              14        9964    79931407+  8e  Linux LVM

=======================================

Dmesg attached

=======================================

I tried the ahci marvell_enable=1 option in /etc/modules.conf but I just see this

ahci: Unknown parameter `marvell_enable'

Also I found a reference to this problem in the kernel - http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=5b66c829bf5c65663b2f68ee6b42f6e834cd39cd

Not sure how to proceed

dmesg.txt
Kerem ERSOYPresidentCommented:
I'll suggest you to disable the onboard ide and use the add-on board on RAID mode only.. But it is strange it seems to me that the board still can't detect the raid volume

Why don't you connect all four drives to the RAID board, create a RAID volume and retry ??

Cheers,
K.
excelsupportAuthor Commented:
I forgot to say I tried disabling the on board sata ports, but they seem to be part and parcel of the IDE controller. That is to say, I can disable the IDE controller which seems to disable the sata ports and the IDE ports (meaning I have no boot drive). Though rather oddly, after I attached a USB DVD drive and booted the Centos DVD which appeared to detect the IDE hard drive. It made no difference to the Marvell controller.

I will connect 4 drives and see if that makes any difference and if that fails I will install Windows and see if that can detect all the on board ports and the array.

As an aside, I tried a PCI 4 port sata 'raid' that is based on a SIL chip (much like my old IDE raid controller) and centos saw the drives (though it didn't see it as a raid volume). The down side is this controller is Sata I/1.5GB rather than Sata II/3GB, and it takes up the PCI slot which I wanted to keep free for something else.
excelsupportAuthor Commented:
At this moment in time, the add in card is working and I can see the two attached drives.

What I did was:

Remove the line from /etc/modprobe.conf that said 'options marvell_enable=1'
---Try to 'insmod ahci' which worked with the above line removed
Then try 'insmod ahci marvell_enable=1' which worked
Checked 'dmesg' but no change
Did 'rmmod marvell_pata' - to remove the broken(?) driver.
Checked 'dmesg' but no change
Did 'insmod mv61xx.ko' (which is the driver for this card that I complied)
Checked 'dmesg' and saw this:

=====================================
PCI: Enabling device 0000:03:00.0 (0000 -> 0003)
ACPI: PCI Interrupt 0000:03:00.0[A] -> GSI 16 (level, low) -> IRQ 169
PCI: Setting latency timer of device 0000:03:00.0 to 64
Marvell (S)ATA Controller is found, using IRQ 169.
Assert at File /root/Marvell_M88SE6145_Linux/1.0.0.9/code/linux/hba_exp.c: Line 69.
success to init chip
scsi4 : Marvell 88SE61xx Storage Controller
  Vendor: Seagate   Model: ST3500410AS       Rev: CC34
  Type:   Direct-Access                      ANSI SCSI revision: 05
SCSI device sda: 976773168 512-byte hdwr sectors (500108 MB)
sda: Write Protect is off
sda: Mode Sense: 17 00 10 00
SCSI device sda: drive cache: write back w/ FUA
SCSI device sda: 976773168 512-byte hdwr sectors (500108 MB)
sda: Write Protect is off
sda: Mode Sense: 17 00 10 00
SCSI device sda: drive cache: write back w/ FUA
 sda: sda1
sd 4:0:0:0: Attached scsi disk sda
  Vendor: Seagate   Model: ST3500410AS       Rev: CC34
  Type:   Direct-Access                      ANSI SCSI revision: 05
SCSI device sdb: 976773168 512-byte hdwr sectors (500108 MB)
sdb: Write Protect is off
sdb: Mode Sense: 17 00 10 00
SCSI device sdb: drive cache: write back w/ FUA
SCSI device sdb: 976773168 512-byte hdwr sectors (500108 MB)
sdb: Write Protect is off
sdb: Mode Sense: 17 00 10 00
SCSI device sdb: drive cache: write back w/ FUA
 sdb: sdb1
sd 4:0:5:0: Attached scsi disk sdb
sd 4:0:0:0: Attached scsi generic sg0 type 0
sd 4:0:5:0: Attached scsi generic sg1 type 0
================================================

And have been able to recreate the linux software raid that I created earlier...

Now to figure out how to make the changes permanent.

By the way - anyone trying to figure out why the driver won't compile from the 'Source Code' as extracted from the zip file, its because of the space in the directory name. Very annoying - took a couple of days to track that one down as the compile error message 'no rule to make target code' isn't exactly helpful. Just move the source or rename the directory and it should compile.
Kerem ERSOYPresidentCommented:
The way yo make them permanent is :
- put the broken driver to /etc/modprobe.d/balcklist to prevent it from loading
- put the drivers with the same order as you did manually to the /etc/modprobe.conf

Use install and remove commands you might use the file /etc/modprobe.d/modprobe.conf.dist as a template.

This should do.

In fact yeah unfortunately RedHAT does detection on its own and does not rely on BIOS for that.

Cheers,
K
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.