dmraid fails to properly recognise VIA VT6420 SATA RAID Controller (rev 80)

Bug #118956 reported by Cesare Tirabassi
2
Affects Status Importance Assigned to Milestone
dmraid (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: dmraid

On my motherboard (ASUS A8V-deluxe) the SATA RAID Controller [VIA VT6420 (rev 80)] is not properly recognised by dmraid.
This utility discovers both an nvidia (which doesn't exist) and via controller and defaults to the nvidia one -> ergo no fakeRAID.

To properly use the via controller, dmraid must be used with the -f or --format option, like:

dmraid -ay -f via

Since dmraid is used in initrd.img, to make this workaround work at boot the following two files need to be changed:

/etc/init.d/dmraid (adding --format via to the standard and verbose dmraid calls)
/usr/share/initramfs-tools/scripts/local-top/dmraid (adding -f via to the dmraid call)

After which a new initrd.img must be generated with:

sudo update-initramfs -u

It is then possible to automount the raid set adding an entry to /etc/fstab (for example mine is: /dev/mapper/via_ceecdjfcj1 /media/viaraid ntfs umask=222,utf8 0 0).

Thank you.

Revision history for this message
Phillip Susi (psusi) wrote :

What makes you think it recognizes both formats? Please post the output of dmraid -n -v /dev/sda

Revision history for this message
Cesare Tirabassi (norsetto) wrote :

cesare@desktop:~$ sudo dmraid -n -v /dev/sda
Password:
INFO: via: version 2; format handler specified for version 0+1 only
/dev/sda: "via" and "nvidia" formats discovered (using nvidia)!
INFO: RAID device discovered:

/dev/sda (nvidia):
0x000 NVIDIA
0x008 size: 30
0x00c chksum: 559297054
0x010 version: 100
0x012 unitNumber: 1
0x013 reserved: 134
0x014 capacity: 290451968
0x018 sectorSize: 512
0x01c productID: STRIPE 138.49G
0x02c productRevision: 100
0x030 unitFlags: 0
0x034 array->version: 6553668
0x038 array->signature[0]: 1380598462
0x03c array->signature[1]: 157544999
0x040 array->signature[2]: 11461442
0x044 array->signature[3]: 1506411111
0x048 array->raidJobCode: 0
0x049 array->stripeWidth: 2
0x04a array->totalVolumes: 2
0x04b array->originalWidth: 2
0x04c array->raidLevel: 128
0x050 array->stripeBlockSize: 128
0x054 array->stripeBlockByteSize: 65536
0x058 array->stripeBlockPower: 7
0x05c array->stripeMask: 127
0x060 array->stripeSize: 256
0x064 array->stripeByteSize: 131072
0x068 array->raidJobMark 0
0x06c array->originalLevel 128
0x070 array->originalCapacity 290451968
0x074 array->flags 0x0

Revision history for this message
Phillip Susi (psusi) wrote :

It would appear that this particular disk has previously been used on an nvidia controller and the metadata remains on the disk. Try this to delete the nvidia metadata:

sudo dmraid -E -f nvidia /dev/sda

You may need to repeat for /dev/sdb.

Revision history for this message
Cesare Tirabassi (norsetto) wrote :

Thats hardly believable. The two disk have been bought new, still packaged within their static envelope in the orginal sealed box.
They have been used since then and from the very beginning with this motherboard as a raid array.

Revision history for this message
Cesare Tirabassi (norsetto) wrote :

I also think that this will not work:

sudo dmraid -E -f nvidia /dev/sda

Shouldn't a -r be added?

Revision history for this message
Phillip Susi (psusi) wrote :

No, -r requests a list of raid information found on the disk. -E requests that the raid information be deleted, and -f specifies that only nvidia should be deleted.

Revision history for this message
Cesare Tirabassi (norsetto) wrote :

From man dmraid:

 {-r|--raid_devices} [device-path...]
              List all discovered RAID devices with format, RAID level, sec‐
              tors used and data offset into the device. In case a metadata
              format handler is chosen with -f , only RAID devices with such
              format can be discovered. Useful if devices have multiple meta‐
              data signatures....
              If -E is added to -r the RAID metadata on the devices gets con‐
              ditionally erased. Useful to erase old metadata after new one
              of different type has been stored on a device in order to avoid
              discovering both.

Infact:

cesare@desktop:~$ sudo dmraid -E -f nvidia /dev/sda
Password:
ERROR: option missing/invalid option combination with -f

In any case, thanks for the tip; I deleted the wrong metadata adding the -r.
Still doesn't get automounted and I'm really puzzled how and what wrote that metadata. Any idea?

Revision history for this message
Phillip Susi (psusi) wrote :

What do you mean you deleted the wrong metadata? Does dmraid -n -v still show the nvidia metadata?

Revision history for this message
Cesare Tirabassi (norsetto) wrote :

wrong=nvidia

Revision history for this message
Phillip Susi (psusi) wrote :

So dmraid -n -v no longer shows the nvidia metadata? But it still will not activate unless you add the -f via?

Revision history for this message
Cesare Tirabassi (norsetto) wrote :

No no, the raid is activated, its just not automounted. I didn't spend much time to investigate it, I just added an appropriate entry to fstab and left the ghost drive alone.
I'm really banging my head against the wall to understand what could have caused that metadata to be written. Unless the drives were sold as new and they weren't , could they have been written in any other way with that!?

Revision history for this message
Phillip Susi (psusi) wrote :

That's the only way I can think of...

So to make sure now, dmraid is working fine for you and this bug can be closed? I'm not quite sure what you mean when you say it isn't auto mounted though... if dmraid now automatically activates the volume correctly, you should be able to boot the system now without intervention provided you specify the correct root= device on the kernel command line.

Revision history for this message
Cesare Tirabassi (norsetto) wrote :

Well, it doesn't, but it doesn't bother me. One day if I have some time I'll fix it. Thank you very much for your help, yes, you can close the bug.

Phillip Susi (psusi)
Changed in dmraid:
status: Unconfirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.