DMRAID stopped to work in kernels > 2.6.15

Bug #54246 reported by Christian Diefenbach
40
Affects Status Importance Assigned to Milestone
dmraid (Ubuntu)
Fix Released
Medium
Richard Bailey

Bug Description

DMRAID is broken due to a newly added sanity check in Kernels newer than 2.6.15.

Error message during boot: "device-mapper: dm-stripe: Target length not divisible by chunk size"
The device mapper does not activate the raid, so booting is not possible anymore.

DMRAID 1.0.0rc11 should fix this problem.

For further info see redhat bugzilla
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=186842
https://listman.redhat.com/archives/ataraid-list/2006-April/msg00000.html

Revision history for this message
Olaf Piesche (opiesche) wrote :

Same problem here (dual Opteron 246 on Asus K8N-DL with 2 120gig SATA in RAID0 configuration). It looks like this breaks any raid configuration depending on dmraid - not only to boot from RAID, but also to simply mount and access existing arrays. I'd think the latest version of dmraid should probably be included in repositories as soon as possible.

Revision history for this message
Jeremy Vies (jeremy.vies) wrote :

I build the latest dmraid (1.0.0-rc11), and tried it with my configuration without any success.
(By the way, dmraid 1.0.0-rc11 does not build on gcc-4.1, but on gcc-4.0 it does.)

Revision history for this message
Christian Diefenbach (christiand59) wrote :

I've removed the sanity check in drivers/kernel/dm/dm-stripe.c and built my own kernel. I've not tested it recently with a new dmraid version, but if you do it, don't forget to rebuild your initramfs!

I would appreciate to get this fixed soon, since many of my friends have such a setup und therefore I can't get them to use GNU/linux even when some of them really wan't to switch away from Windows.

Revision history for this message
Jeremy Vies (jeremy.vies) wrote :

Does it work with this sanity check removed ?
I'll try it asap on my machine. Is this check easy to find ? or maybe you can post a patch file on this bug so I will not have to look for this check.

Revision history for this message
Christian Diefenbach (christiand59) wrote :

I've just ifdef'd out the sanity check. It does work this way but remember, this check is a feature, not a bug ;-) It detects broken raid bioses which assign an erroneous number of blocks (not divisible). So, if you fill up a filesystem up to a non existing block, you will get an I/O error and data is lost on that sector. My nvidia raid bios is broken in such away, but I have not encountered any problems with the below fix, for many months running with it. In the long run, dmraid should truncate the target length, so that it will be divisible by the chunk size, to work around broken bioses. rc11 should do this allready, at least from what I've hard. Some people who report problems with rc11 may have forgotten to rebuild their initramfs. So I'm unshure if rc11 is still broken or not. In any case the below fix will make it usable.

Locate <kernel-source-dir>drivers/md/dm-stripe.c and surround the sanity check starting at line 108 with

#if 0
#endif

Save and recompile your kernel and maybe update your initramfs.

It should look like this:

#if 0
        if (ti->len & (chunk_size - 1)) {
                ti->error = "Target length not divisible by "
                    "chunk size";
        /* return -EINVAL;*/
        }

        width = ti->len;
        if (sector_div(width, stripes)) {
                ti->error = "Target length not divisible by "
                    "number of stripes";
        /* return -EINVAL;*/
        }
#endif

Revision history for this message
Richard Bailey (rmjb) wrote :

Since there's a repo freeze soon on edgy, will edgy not have fakeraid support?

Revision history for this message
Olaf Piesche (opiesche) wrote :

I've built a .deb of dmraid 1.0.0rc11 that works for me on 2.6.17. Maybe someone else could give this one a shot and see if it fixes the problem.
Please be gentle, this is my first time to build a .deb. :P Apologies if this isn't properly packaged.

Revision history for this message
Christian Diefenbach (christiand59) wrote :

So we can confirm that the bug is fixed in rc11 of dmraid! It would be really bad if dmraid rc11 would not bee included in edgy. Since this is a bugfix for the otherwise not working dmraid in the current repo, I guess there will be an exception made for that package to go into edgy!?

Revision history for this message
Jeremy Vies (jeremy.vies) wrote :

I also confirm that dmraid 1.0.0-rc11 makes it work !!

As it is a regression since Dapper, I hope we can expect to have it uploaded for Edgy.

Revision history for this message
Jeremy Vies (jeremy.vies) wrote :

Well... I'm not so sure it is ok.
It worked only once. I upgrade some packages, and it didn't worked anymore then.
Does it work correctly for someone ? I'll try some other tests. Maybe I've got another problem on my installation.

Revision history for this message
Richard Bailey (rmjb) wrote :

The attached package works for me, but the dmraid is not set up on boot. When I rebooted I had to run sudo dmraid -ay manually to get the proper entries in /dev/mapper

Revision history for this message
Jeremy Vies (jeremy.vies) wrote :

Ok. I guess we are at the same point we were last spring on this bug : https://launchpad.net/distros/ubuntu/+source/initramfs-tools/+bug/22107

I'll try to add again /usr/share/initramfs-tools/scripts/local-top/dmraid and test it again so we can improve the 1.0.0-rc11 package.

Revision history for this message
Richard Bailey (rmjb) wrote :

Just booted without splash for another bug and saw this in the boot screen:

device-mapper: dm-stripe: Target length not divisible by chunk size

This line came up after the following:
/dev/sda: "via" and "nvidia" formats discovered (using nvidia)!
/dev/sdb: "via" and "nvidia" formats discovered (using nvidia)!

Which is what usually comes up when you run dmraid.

However, after I boot if I run sudo dmraid -ay it works properly so I'm not sure what's being executed at boot.

Revision history for this message
Christian Diefenbach (christiand59) wrote :

Did you rebuild your initramfs after installing dmraid rc11?

:~$ sudo update-initramfs -k `uname -r` -u

Revision history for this message
Richard Bailey (rmjb) wrote :

I didn't do that before now, if it needs to be done on install the package should do it though.

I just did it and now I don't get the messages when I boot, but there are still no entries in /dev/mapper when I boot and if I run sudo dmraid -ay when I'm running the entries come up in /dev/mapper.

- rmjb

Revision history for this message
Christian Diefenbach (christiand59) wrote :

The dmraid package in edgy places update-initramfs hooks and rebuilds the initrd correctly. You should see

/usr/share/initramfs-tools/hooks/dmraid
/usr/share/initramfs-tools/scripts/local-top/dmraid

in the output of "locate dmraid"

Revision history for this message
Christian Diefenbach (christiand59) wrote :
Revision history for this message
Christian Diefenbach (christiand59) wrote :
Revision history for this message
Jeremy Vies (jeremy.vies) wrote :

I'm trying to have it working right now...
It seems that the dmraid_1.0.0.rc11-1_i386.deb Olaf built have dmraid in /usr/sbin and not in /sbin as it should be... that's (probably) why the /usr/share/initramfs-tools/hooks/dmraid script does not work..
and that's why /dev/mapper devices are not set on boot...

So to improve this package, it should be rebuild with dmraid in /sbin and with both scripts in /usr/share/initramfs-tools.

Revision history for this message
Jeremy Vies (jeremy.vies) wrote :

Even with the corrected scripts (that considers dmraid in /usr/sbin), the /dev/mapper devices are not correctly set at startup.

As my / is on a such device, I can't have Edgy working correctly. I'll get back to Dapper in a while if no correction is provided soon...

Revision history for this message
Richard Bailey (rmjb) wrote :

Can you post your new package? Even if it's not working? I'd like to try it and take a look at it.

Revision history for this message
Jeremy Vies (jeremy.vies) wrote :

Well... I didn't package the modifications... I directly added the scripts and modified them to use the right paths.
The worth is that I didn't noted the errors reported during boot... I'll try to post more information lately.

Revision history for this message
Jeremy Vies (jeremy.vies) wrote :

I tried to package latest dmraid from RedHat (i.e 1.0.0.rc13) with additional Ubuntu scripts for initramfs.
May someone try it ?

Revision history for this message
Jeremy Vies (jeremy.vies) wrote :

I've tested my package.
A new error appeared during boot:
After / is mounted (or seems so), it is written:
"Target filesystem doesn't have /sbin/init"

Then it starts BusyBox, but I don't have the hand on it. Probably because of this other problem:
"/bin/sh: can't access tty; job control turned off"

Revision history for this message
Richard Bailey (rmjb) wrote :

Could there be a problem with dmraid's init scripts and new the new init system in edgy? (upstart)

Just speculating.

Revision history for this message
Jeremy Vies (jeremy.vies) wrote :

I'm not sure as I really don't know a lot about upstart, but it doesn't seem linked to.
I'll try to have a tty under busybox so I can check what's going wrong.

Does the package (rc13) solve the problem for people that don't boot on dmraid ?

Revision history for this message
Tormod Volden (tormodvolden) wrote :

A hint for those trying to package newer upstream versions:
Get the new upstream tar-ball, then try applying the most recent ubuntu-diff that you can find here: http://packages.ubuntu.com/edgy/admin/dmraid
This way you don't have to reinvent the wheel :)

Revision history for this message
Jeremy Vies (jeremy.vies) wrote : Re: [Bug 54246] Re: DMRAID stopped to work in kernels > 2.6.15

"apt-get source dmraid" does the same and download the needed -dev package
for the build.

2006/10/20, Tormod Volden <email address hidden>:
>
> A hint for those trying to package newer upstream versions:
> Get the new upstream tar-ball, then try applying the most recent
> ubuntu-diff that you can find here:
> http://packages.ubuntu.com/edgy/admin/dmraid
> This way you don't have to reinvent the wheel :)
>
> --
> DMRAID stopped to work in kernels > 2.6.15
> https://launchpad.net/bugs/54246
>

Revision history for this message
Tormod Volden (tormodvolden) wrote :

"apt-get source dmraid" will only download the old, original tar-ball that was used for the old package. And to get all needed extra packages, do "sudo apt-get build-dep dmraid" first. Once you have applied the ubuntu diff on the upstream tar-ball, you can try building with "debuild -b -i -us -uc". See https://wiki.ubuntu.com/MOTU/School for more information on merging and packaging.

Now more on-topic: the standard (universe) dmraid works fine in Ubuntu Edgy RC on my Intel fakeraid.

Richard Bailey (rmjb)
Changed in dmraid:
assignee: nobody → rmjb
status: Confirmed → In Progress
Revision history for this message
Richard Bailey (rmjb) wrote :

I've packaged version 1.0.0.rc13, which I've attached. I'm working on getting this into the repos, but you all can test it out.

DISCLAIMER - The Ubuntu team has not certified this package yet so you will be doing this at your own risk.

However, it works for me.

Revision history for this message
WattoDaToydarian (dannycan) wrote :

Hey Mr. Bailey, I tried your new dmraid package and I still cant get my PC to boot from the 2.6.17-10-generic kernel. It just displays the splash screen (witch is different from the RC live cd) and the hdd light blinks a few times then it goes to a black screen with a blinking cursor.
I think either my system might be generating initrd.img-2.6.17-10-generic improperly or your new package doesn't work. Could you upload your initrd.img-2.6.17-10-generic so I can see if it's my system?

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

This is due to a bug in dmraid with the via metadata. It was trying to create a stripe using the ENTIRE disk, including the last few unused sectors that don't make up a full stripe. This patch fixes it to round down to the nearest stripe size:

--- dmraid-0.9.9+1.0.0.rc12.orig/1.0.0.rc12-pre1/lib/format/ataraid/via.c
+++ dmraid-0.9.9+1.0.0.rc12/1.0.0.rc12-pre1/lib/format/ataraid/via.c
@@ -406,7 +406,8 @@
        rd->type = type(via);

        rd->offset = VIA_DATAOFFSET;
- rd->sectors = rd->meta_areas->offset;
+ /* round down disk length to a hole stripe */
+ rd->sectors = (~(VIA_STRIDE(via)-1)) & rd->meta_areas->offset;

         return (rd->name = name(lc, rd, 1)) ? 1 : 0;
 }

Patch has been sent upstream.

Revision history for this message
Richard Bailey (rmjb) wrote :

This updated source package fixes the issue.

Note: package is based on a new upstream version, 1.0.0.rc13

Revision history for this message
William Grant (wgrant) wrote :

The updates source package looks sane, except for debian/changelog which has more spacing than is standard.

Revision history for this message
Richard Bailey (rmjb) wrote :

Source package with proper spacing in debian/changelog

Revision history for this message
Jeremy Vies (jeremy.vies) wrote :

1.0.0.rc13 still doesn't work for me. By the way, I've a Silicon Image 3112
controller with 2 disks.

Even with "single" option, so without usplash, I can't get enough traces
about my root that is not mounted. I only have a "waiting for filesystem" or
something like that.
Is there is any option I can try to have more traces about my missing
filesystem ?

Revision history for this message
Tormod Volden (tormodvolden) wrote :

> Is there is any option I can try to have more traces about my missing
filesystem ?

For instance, you can boot with "break=mount" which gives you a shell inside the initramfs before it tries to mount the root partition, or "break=bottom" which is after. See /usr/share/initramfs-tools/init for alternatives.

For those making and posting their own packages, please add for instance your initials or name to the package version to avoid clashes and general confusion if an official package comes up.

Revision history for this message
Richard Bailey (rmjb) wrote :

To Jeremy and others trying the new rc13 package, when you install it it will update the initrd for the currently running kernel. If you need to update an initrd for a kernel that's not currently running, but that you intent to boot to issue a command like this:

update-initramfs -k <kernel version>

Then try.

Revision history for this message
Jeremy Vies (jeremy.vies) wrote :

I've tried the break=mount option. I got a busybox shell, but no keyboard to type in... so I can't get more information this way...

Revision history for this message
risidoro (risidoro-gmail) wrote :

Hi, Edgy official release is imminent, will the updated dmraid 1.0.0_rc13 find its way into the repos? Maybe, if it's too late for official approval, you should add a comment in the release note (or somewhere users can easily find) to warn the users against the uncompatible rc9 and point them to the package posted here. Or dapper users who dist-upgrade will have a horrible surprise.

Revision history for this message
risidoro (risidoro-gmail) wrote :

Mr Bailey,
your package dmraid_0.9.9-1.0.0.rc13-0ubuntu1_i386.deb works beautifully on my vt8237 via sata fakeraid controller.
I'm writing this post from my freshly installed kubuntu edgy!
I hope it'll be included in the official repository ASAP. (also, it'd be great if it were included in 'main' instead of 'universe'). Thanks, bye.

Revision history for this message
Eleazar (caster-mail2song) wrote :

I can't get dmraid_0.9.9-1.0.0.rc13-0ubuntu1_i386.deb to function correctly. In dev/mapper I am only getting the Volumes and not the RAID device. It looks like this:
isw_cigbaiabcj_RAID_Volume0 I am guessing this is /boot
isw_cigbaiabcj_RAID_Volume01 NTFS partition 1 (WindowsXP)
isw_cigbaiabcj_RAID_Volume05 NTFS partition 2 (WindowsXP)

Also I had to use the .deb file because I couldn't get the source package rc13 with the corrected spacing in the changelog to "make". I believe the errors I am getting are due to not having all the libraries needed. Could you possibly list the ones prerequisites I need to "make" the dmraid source package; yes, even the extremely obvious ones? I am very very new to linux, but I have been reading up on it. If necessary I could post the log of "make".

Revision history for this message
Richard Bailey (rmjb) wrote :

Just to note, after assisting WattoDaToydarian and Eleazar they now have their raid working in Edgy.

Revision history for this message
Jeremy Vies (jeremy.vies) wrote :

So I'm the last one for who it doesn't work ?
Can we list on wich fakeraid chipset it works ?

Revision history for this message
Oded Ben Ozer (odead) wrote :

I compiled this package from the source package and it worked for me on Nvidia nforce4 chipset

This is my first package (I just unpacked the source and used " sudo pbuilder build dmraid_0.9.9+1.0.0.rc13-0ubuntu1.dsc") so its probboly not perfect but it works
If someone can direct me to the "offical" procedure of building a package i will post here a more upload-worthy one

Revision history for this message
James Broberg (jbroberg) wrote :

I had the same issue - no raid after upgrading to edgy. Note I don't boot from the RAID drive - rather it is a seperate striped fakeraid (nforce4) RAID disk set.

Installing Richard's package binary package listed above fixes it for me - many thanks!

Revision history for this message
André Pérez (andrepf) wrote :

After install the new version of dmraid (rc13), I can boot with the new kernel (2.6.17), but now I have a new problem:

In the boot process, the system hangs during 2-3 minutes and then continues booting normally. Anybody with the same problem? I need Help!

Revision history for this message
John (jc453) wrote :

I have this problem as well, after a while the messages: "Buffer I/O error on device sda3, logical block ..." start to scroll down the screen, and then it continues booting normally.

Revision history for this message
Richard Bailey (rmjb) wrote :

If you want to get more information during boot, to troubleshoot why it hangs for a few minutes or any other issue, when grub comes up edit the grub command and remove the quiet and splash options from the end.

In fact, remove the splash option first and see if you can see your error message, removing quiet floods the screen with boot messages and the error might get lost.

Revision history for this message
André Pérez (andrepf) wrote :

My problem is the same as described by WattoDaToydarian, but if I wait in the blank screen for 2-3 minutes, the system continues the boot process normally.

I have booted the system without "quiet splash", and the problem appears after the message:

[17179575.812000] device-mapper: 4.6.0-ioctl (2006-02-17) initialised: <email address hidden>

A few minutes after this message, the system continues booting.

Richard Bailey, what solution do you give to WattoDaToydarian?

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

The 3 min delay at boot is due to a change that was made to the lvm package since dapper. It's script in the initramfs now checks to see if the boot path starts with /dev/mapper and if so, assumes it is an LVM volume and attempts to dissect the remaining part of the path into volume group and volume name components, then spins in a loop for up to 3 minutes waiting for the volume group to appear in /dev, which never happens since we are using dmraid, not lvm.

If you do not use LVM, you can remove /usr/share/initramfs-tools/scripts/local-top/lvm and then run update-initramfs. That should rebuild your initramfs without the lvm script.

Revision history for this message
Richard Bailey (rmjb) wrote :

Good find, this sounds like a bug that should be filed against LVM.

Revision history for this message
stefab (bluefuture) wrote :

I also got this LVM bug anybody have open a new bug report on LVM?

Revision history for this message
Jeremy Vies (jeremy.vies) wrote :

I finally succeeded in booting my edgy on dmraid.
(My problem was due to the missing lvm package on this install...)

So I confirm that this rc13 package is enough to solve the bug.

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

I believe I patched dmraid to not create the dev nodes in /dev/mapper, but just in /dev instead. This should fix the problem with the lvm boot script. I also have been working with a user trying to install edgy using this package and it sounds like the installer thinks they are lvm volumes and chokes, so hopefully this will fix that as well.

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

And the binary build...

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

Ok, that one didn't work... found and fixed the bug I think, give this one a try.

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

And the binary build...

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

Third time's the charm right? Made a typeo and found a second instance of the same bug.

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

And the binary...

Revision history for this message
Kemotaha (kemotaha) wrote :

Phillip, It doesn't seem to create the /dev nodes for me. I am running on AMD64 and maybe that is why. I booted up with the AMD64 desktop installer.

I downloaded the rc13-0ubuntu1 source from above and your diffs (the 3rd one). Compile it with "sudo pbuilder build dmraid_0.9.9+1.0.0.rc13-0ubuntu1.dsc" like ben did above. I then installed the package. Dmraid seems to see the raid but is not listed anywhere in /dev.

Revision history for this message
Enrico Sardi (enricoss) wrote :

I'have the same problem with a Nvidia sata raid controller (I installed dmraid_0.9.9+1.0.0.rc13-0ubuntu2_i386.deb)...

Bye

Enrico

Revision history for this message
Richard Bruce (doc-bruce-family) wrote :

I've tried Richard Bailey's package and my RAID partitions show up under /dev/mapper, but the install fails while trying to format the swap partition.

The latest package from Phillip Susi loads but no RAID partitions show up in /dev when I attempt an install from the Live CD (running install after downloading and installing Phillip's package, of course).

Incidentally, I am running a dual Opteron based on an nVidia nForce Pro 2200 MCP. Any suggestions?

Revision history for this message
Richard Bailey (rmjb) wrote :

To install edgy on dmraid is tricky at best. I put together a HOWTO that's worked for me and a couple others here:

http://ubuntuforums.org/showpost.php?p=1708724&postcount=11

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

Disregard my modified packages. It seems that it is not as simple as I thought to move the devices out of /dev/mapper. I spent a few hours trying to debug it last night and I concluded that it will take a lot more work to make this happen, so I won't bother.

Based on my IRC discussions with Richard Bailey, it sounds like in addition to the boot time lvm script, the installer incorrectly recognizes the dmraid evices as LVM volumes, and takes inappropriate action with them that prevents installation from continuing. I think a bug should be filed against the installer for this reason.

Revision history for this message
Tor Bendiksen (tor-tblab) wrote :

I have tried both rc13-0ubuntu1 and rc13-0ubuntu2 and neither seems to be populating /dev/mapper for me on my SI 3112 fakeraid adapter. If I boot with break=mount (or wait until I'm dumped into a busybox shell), I can see that dmraid is picking up my raid set with dmraid -tay, but dmraid -ay does not populate /dev/mapper, hence I can't boot.

Revision history for this message
Tor Bendiksen (tor-tblab) wrote :

Scratch that. rc13-0ubuntu1 DOES populate /dev/mapper, but does not activate dmraid. Need to look into this more.. If I boot with break=mount, and manually activate the raid set I can continue the boot.
Apologies for the noise.

Revision history for this message
Tor Bendiksen (tor-tblab) wrote :

I found out what *my* problem was. I am trying to boot from this raidset, and the script that runs dmraid -ay to activate the raidset was in /usr/share/initramfs-tools/scripts/local-top/dmraid.
I needed to copy this into local-premount and regenerate my initrd. After that my machine would boot without issues.

Thanks to all for info and help from this page. Edgy running perfectly on SI3112 raid0 for me.

Revision history for this message
Christian Diefenbach (christiand59) wrote :

The new package in Feisty does not work for me. I boot from a NVIDIA two disk stripe set. To get my system to boot I have to append break=mount on the grub commandline and then do something like:

modprobe sata_nv
modprobe dm-mod
dmraid -ay

exit busybox and then it boots correctly.

It seems that the sata_nv module is not loaded at the point when dmraid -ay gets executed by init, and therefore no raid is recognized.

Revision history for this message
Tor Bendiksen (tor-tblab) wrote :

After a bit more investigation it turned out to be more related to the order things were started on my system. Renaming the dmraid script to zdmraid (so it's last in the sort order) seems to have helped on my system.

If I did break=mount I could manually run dmraid -ay, and everything would be fine, but a normal boot did not work. It seems to be related to either time (something had not fully loaded yet), or order (a pre-req was not loaded yet). I don't know for certain yet, but I have a system now that boots perfectly on a striped raid set (Silicon Image 3112).

PS. I did so many changes to the configuraton while trying to get the system to boot, that I am no longer certain what has fixed it for me. YMMV.

Revision history for this message
Richard Bailey (rmjb) wrote :

@Christian D. the "new" package in Feisty is the same broken package that's in Edgy. I'm *trying* to get someone to get an updated version into Feisty.

Trent Lloyd (lathiat)
Changed in dmraid:
importance: Undecided → Medium
Revision history for this message
Sarah Kowalik (hobbsee-deactivatedaccount) wrote :
Changed in dmraid:
status: In Progress → Fix Released
Revision history for this message
Richard Bailey (rmjb) wrote :

Progress! dmraid in the Feisty archives is finally rc13. I've already tested dmraid in feisty from the archives, can a couple of you test it and post your (hopeful) success here?

Once we get two more successes the request to backport this working dmraid to edgy will go through.

Revision history for this message
Enrico Sardi (enricoss) wrote :

Richard Bailey pronuncio' le seguenti parole il 16/12/2006 20:38:
> Progress! dmraid in the Feisty archives is finally rc13. I've already
> tested dmraid in feisty from the archives, can a couple of you test it
> and post your (hopeful) success here?
>
> Once we get two more successes the request to backport this working
> dmraid to edgy will go through.
>

Hi!

I have tried it with a nvidia raid controller and it works!

Bye

Enrico

Revision history for this message
namos (vetasana) wrote :

Asus P5B Deluxe: /dev/mapper not available, dmraid -ay does _not_ help

Hardware:

Asus P5B Deluxe BIOS 0804
[with
 Intel P965+ICH8R
 JMicron JMB363
 Marvell 88E8056 PCIe Gigabit Ethernet
 Marvell 88E8001 PCI Gigabit Ethernet
 SoundMAX ADI1988
]
Intel Core2Duo E6700 (standard FSB 266 MHz)
Terratec DMX 6fire 24/96
2 GB DDR2-SDRAM (SPD setting)
2x Samsung SP2504C 250GB HDD @ P965 SATA port 1+2
Samsung SH-D163A DVD-ROM SATA @ P965 SATA port 3
BenQ DW-1640 DVD+-RW PATA, PATA-to-SATA adapter @ JMicron internal SATA port
 (BenQ @ P965 SATA port 4 does not work:
  XP setup delays, Vista setup freezes, a DVD cannot be read)
USB Stick (USB Mass Storage)

BIOS Setting:

P965 Raid 0: 2x250 = 500 GB (eff. about 465 GB) capacity
JMicron PATA/SATA: IDE (compatibility) mode
  (needs JMicron compatible IDE driver under XP,
   does not work with standard XP IDE driver)

Working OS: Windows XP Prof. 32 Bit, WXPPro 64 Bit, Windows Vista 32 Bit
            (with 32 Bit and 64 Bit Intel RAID driver disks)

WinXPPro 32 Bit: Blue screen with ADI1988 sound driver, device disabled.

OS Distribution to install: Ubuntu Edgy i386 DVD

Marvell network adapter is not recognized.
My USB Stick is recognized.

I put the most recent Ubuntu Feisty dmraid packages and
dependencies onto the USB stick (details see below).

Steps:

- Boot from DVD, select text mode install
- Network error: Continue
- Partition disks: two separate disks shown => Go Back, into a shell
- Connected USB stick, waited > 10 s
- dmesg | more:
  sdc: sdc1
# mount /dev/sdc1 /mnt
# cd root
# tar xvf /mnt/data/dmraid.tar
dmraid-udeb_1.0.0.rc13-2ubuntu1_i386.udeb
dmraid_1.0.0.rc13-2ubuntu1_i386.deb
libc6-udeb_2.5-0ubuntu5_i386.udeb
libc6_2.5-0ubuntu5_i386.deb
libdevmapper1.02-udeb_1.02.08-1ubuntu1_i386.udeb
libdevmapper1.02_1.02.08-1ubuntu1_i386.deb
libselinux1_1.32-3_i386.deb
libsepol1_1.14-2_i386.deb
# umount /mnt
# udpkg -i libc6-udeb_2.5-0ubuntu5_i386.udeb
(Reading database...)
(Updating database...)
# udpkg -i libdevmapper1.02-udeb_1.02.08-1ubuntu1_i386.udeb
(Reading database...)
(Updating database...)
# udpkg -i dmraid-udeb_1.0.0.rc13-2ubuntu1_i386.udeb
(Reading database...)
(Updating database...)
# dmraid -r
/dev/sda: isw, "isw_ddeheebhbf", GROUP, ok, 488397166 sectors, data@ 0
/dev/sdb: isw, "isw_ddeheebhbf", GROUP, ok, 488397166 sectors, data@ 0
# ls /dev/mapper
ls: /dev/mapper: No such file or directory
# dmraid -ay
# ls /dev/mapper
ls: /dev/mapper: No such file or directory

I am stuck with not seeing the mapper device. What can I do now?

Revision history for this message
namos (vetasana) wrote :
Download full text (4.2 KiB)

Ok, I have tried harder:

I have found out how the /dev/mapper directory can be created.
I cannot create an ext3 partition with the partition manager.
I am verbose as always, hopefully this is ok.

# modprobe dm-mod
# ls /dev/mapper
control
# dmraid -ay
# ls /dev/mapper
control
isw_ddeheebhbf_Volume01
isw_ddeheebhbf_Volume06
isw_ddeheebhbf_Volume0
isw_ddeheebhbf_Volume05

I wondered which device I had to use.
Someone suggested to use dmraid -s:
# dmraid -s
*** Group superset isw_ddeheebhbf
--> Active Subset
name : isw_ddeheebhbf_Volume0
size : 976783872
stride : 256
type : stripe
status : 0
subsets: 0
devs : 2
spares : 0

I have given a stripe size of 128 kB (default for RAID 0).
Another suggestion was to use fdisk -l:
# fdisk -l /dev/mapper/isw_ddeheebhbf_Volume0

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

d System Device Boot Start End Blocks Id System
/dev/mapper/isw_ddeheebhbf_Volume0p1 * 1 19122 153597433+ 7 HPFS/NTFS
/dev/mapper/isw_ddeheebhbf_Volume0p2 * 19123 60800 334778535 f W95 Ext'd (LBA)
/dev/mapper/isw_ddeheebhbf_Volume0p5 * 19123 21672 20482843+ 7 HPFS/NTFS
/dev/mapper/isw_ddeheebhbf_Volume0p6 * 21673 25497 30720000+ 7 HPFS/NTFS

I double check that with parted to reduce the risk of data loss:
# parted /dev/mapper/isw_ddeheebhbf_Volume0
GNU Parted 1.7.1
Using /dev/mapper/isw_ddeheebhbf_Volume0
...
(parted) print

Disk /dev/mapper/isw_ddeheebhbf_Volume0: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 32.3kB 157GB 157GB primary ntfs boot
2 157GB 500GB 343GB extended lba
5 157GB 178GB 21.0GB logical ntfs
6 178GB 210GB 31.5GB logical ntfs

The stride size is wrong, but fdisk and parted show correct partition sizes.
I move on.

# exit
Partition manager: manually
create partitions on /dev/mapper/isw_ddeheebhbf_Volume0:
logical swap 2 GB
logical ext3 157.3 GB (mount option: noatime, "linux", reserved 0%)
Partition disks:
swap partition: ok
ext3 partition: Failed to create a file system
The ext3 file system creation in partition #8 of LVM VG isw_ddeheebhbf_Volume0, LV isw_ddeheebhbf_Volume0 failed.
-> Shell
# parted /dev/mapper/isw_ddeheebhbf_Volume0
...
7 210GB 212GB 1999MB logical linux-swap
8 212GB 369GB 157GB logical ext2
The new partitions are there, but not mapped:
# ls /dev/mapper
control
isw_ddeheebhbf_Volume01
isw_ddeheebhbf_Volume06
isw_ddeheebhbf_Volume0
isw_ddeheebhbf_Volume05

I had to
# dmraid -an
# dmraid -ay

# ls /dev/mapper
control
isw_ddeheebhbf_Volume0
isw_ddeheebhbf_Volume01
isw_ddeheebhbf_Volume05
isw_ddeheebhbf_Volume06
isw_ddeheebhbf_Volume07
isw_ddeheebhbf_Volume08

# exit

Now I try again to use the partition manager:

Creating ext3 file system for / in partition #8 of LVM VG isw_ddeheebhbf_Volume0, LV isw_ddeheebhbf_Volume0...

Failed to create a file system
The ext3 file system creation in partition #8 of LVM VG isw_ddeheebhbf_Volume0, LV isw_ddeheebhbf_Volume0 failed.

But a filesystem has been created (mo...

Read more...

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

What do you mean the stride is wrong? Is the set not using a 128 kb stride?

Parted and the text installer do not support dmraid devices properly yet. To install you will have to follow the howto at https://wiki.ubuntu.com/FakeRaidHowto

Revision history for this message
namos (vetasana) wrote :

dmraid -s shows "stride: 256"

In the BIOS (Intel Matrix Storage Manager Option ROM Utility) a Strip Size of 128 KB is default for RAID 0. In the manual, "stripe size" is mentioned as well.

I am confused about the definitions. Is a stride the sum of all the strips shared across the harddisk (2 HDD: 2x128 strip = 256 stride)?

I'll try to follow the FakeRaidHowto.

Revision history for this message
namos (vetasana) wrote :
Download full text (4.5 KiB)

I managed to activate apt-get with DVD repository, but am stuck with Feisty glibc conflict at the moment. See the end of my post for some ways to finish the installation. Any suggestions?

Steps: install dmraid udebs as above, dmraid -ay, partition with manager

Execute shell

{{{
# parted /dev/mapper/isw_ddeheebhbf_Volume0
(parted) print
(parted) resize 2 157GB 500GB
(parted) mkpartfs logical linux-swap 210GB 212GB
(parted) mkpart logical 212GB 369GB
(parted) quit
# mkfs.ext3 -c -j -L "ubuntu32" -m 0.1 -O dir_index,resize_inode /dev/mapper/isw_ddeheebhbf_Volume08
...
This filesystem will be automatically checked every 29 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override.
}}}

Only check after a period of time (180 days), disable mount check:

{{{
# tune2fs -c 0 /dev/mapper/isw_ddeheebhbf_Volume08
Setting maximal mount count to -1
# mkdir /target
# mount -t ext3 /dev/mapper/isw_ddeheebhbf_Volume08 /target -o errors=remount-ro,data=writeback,noatime,commit=30
# mkdir /target/boot
# mkdir /target/dev
# mount --bind /dev /target/dev
# mkdir /target/proc
# mount -t proc proc /target/proc
mount: Mounting proc on /target/proc failed: No such file or directory
# mkdir /target/sys
# mount -t sysfs sysfs /target/sys
}}}

Installing base system:

{{{
# cd /target
# apt-get install debootstrap
/bin/sh: apt-get: not found
}}}

debootstrap is already available, so error can be ignored

Network: Marvell Yukon (88E8056), no Internet access!
Let debootstrap use the Ubuntu Edgy DVD.

{{{
# debootstrap edgy /target file:/cdrom/ubuntu
I: Configuring...
...
I: Base system installed successfully.
}}}

I do not find /etc/apt/sources.list which is mentioned in the FakeRaidHowto for copying. I create one with the following content, making up the name of the DVD (is it mentioned somewhere?):

{{{
#deb http://archive.ubuntu.com/ubuntu edgy main
deb cdrom:[Ubuntu 6.10 _Edgy Eft_ - Release i386 (20061025.1)]/ edgy main restricted
}}}

{{{
# cp -a /root/*deb /target/root
# chroot /target
# bash
# cd /root
# dpkg -i libc6_2.5-0ubuntu5_i386.deb
...
Preparing to replace libc6 2.4-1ubuntu12 (using ...) ...
...
Setting up...
Installing new version of config file /etc/init.d/glibc.sh ...
# dpkg -i libdevmapper1.02_1.02.08-1ubuntu1_i386.deb
Preparing to replace libdevmapper1.02 2:1.02.07-1ubuntu2...
# dpkg -i libsepol1_1.14-2_i386.deb
Replacing 1.12-1
# dpkg -i libselinux1_1.32-3_i386.deb
Replacing 1.30-1ubuntu1
# dpkg -i dmraid_1.0.0.rc13-2ubuntu1_i386.deb
invoke-rc.d: initscript dmraid, action "start" failed.
dpkg: error processing dmraid (--install):
 subprocess post-installation script returned error exit status 1
}}}

leave chroot env now

{{{
# <CTRL-d>
# <CTRL-d>
}}}

Mount/remount some devices...

{{{
# mount --bind /dev /target/dev -o remount
# mount -t sysfs sysfs /target/sys
# mount -t proc proc /target/proc
}}}

I can install dmraid now:

{{{
# chroot /target
# dpkg -i root/dmraid_1.0.0.rc13-2ubuntu1_i386.deb
...
 * Shutting down DMRAID devices...
   ...done.
Unpacking replacement dmraid ...
Setting up dmraid (1.0.0.rc13-2ubuntu1) ...
 * Setting up DMRAID devices...
   ...done.
# apt-get install grub
  libc6-i686: PreDepends: libc6 (= 2.4-1...

Read more...

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

dmraid lists the stripe factor in sectors, not kb, so those values are correct. 256 sectors is 128 KB.

The stripe factor is the number of sectors written to each disk before moving to the next disk in the stripe.

Revision history for this message
Christian Diefenbach (christiand59) wrote :

I can confirm that the version in feisty works for me! I've tested it with a vanilla kernel and the 2.6.20 in the feisty repository. The boot though does still not work without adding break=mount on the grub commandline. The symptom is that the boot process simply hangs while polling the hardddisks every second or so. If I press ctrl+d at the busiybox shell the boot continues as it should. This problem is unrelated to dmraid, I suppose.

Revision history for this message
TJ (tj) wrote :

'dmraid_0.9.9+1.0.0.rc9-2ubuntu1_i386.deb'

package works for a Promise FastTrak TX2000 RAID 1+0 (Mirror + Stripe) but

'dmraid_0.9.9+1.0.0.rc13-0ubuntu2_i386.deb'

fails to activate the set when doing dmraid -ay.

Revision history for this message
Tormod Volden (tormodvolden) wrote :
Revision history for this message
risidoro (risidoro-gmail) wrote :

I have the same behaviour reported by TJ with my Via VT8237 chipset:

- dmraid_0.9.9+1.0.0.rc9-2ubuntu1_i386.deb WORKS
- dmraid_0.9.9+1.0.0.rc13-0ubuntu2_i386.deb DO NOT WORK

Dmraid from Feisty is working ok.

Revision history for this message
risidoro (risidoro-gmail) wrote :

Sorry, in my previous post i meant:

dmraid_0.9.9+1.0.0.rc13-0ubuntu1_i386.deb WORKS and

dmraid_0.9.9+1.0.0.rc13-0ubuntu2_i386.deb DOES NOT WORK

sorry for the confusion!

To post a comment you must log in.