How to fix problem with ASM not recognizing multipathed disks after a reboot

After installing ASM 11g on Red Hat 5.5 using the Linux multipath software the disk permissions are not set properly by ASMLib when the system is rebooted. This results in the following error in /var/log/oracleasm:

oracleasm-read-label: Unable to open device "/dev/dm-0": No such file or directory

ASM will not mount the disks and of course the database will not start.

I tried the following:
- I checked that all the correct versions of the ASM RPMs were installed.
- I performed the oracleasm configure, which is supposed to properly set the permissions on reboot.
- I tried setting the ORACLEASM_SCANORDER per the documentation about setting up ASM on Linux Multipath disks [Document Id 602952.1].

None of these things worked.

Finally I added these lines to the top of the script /etc/init.d/oracleasm and the problem is solved:

chown grid:oinstall /dev/dm*
chmod 775 /dev/dm*