From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050926 Firefox/1.0.7 Description of problem: When trying to run "oracleasm createdisk" against a partition that exists on a multipathed disk (dm-multipath), it complains with the message... Device "/dev/mapper/xxxxx1" is not a partition. The device in question is indeed a partition. After looking through the Oracle mailing lists I found a similar bug had been seen on another platform, it seems that oracleasm uses HDIO_GETGEO to decide if the device is a partition or not, and dm-multipath doesn't support this. I confirmed this by running strace against asmtool while running it. The thread for the other platform is on the Oracle lists at... http://oss.oracle.com/pipermail/oracleasm-users/2005-June/thread.html the key post is... http://oss.oracle.com/pipermail/oracleasm-users/2005-June/000036.html Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. Setup a multipathed disk with a single partition on it 2. Create the partition device nodes by running "kpartx -a" 3. Run "asmtool -l /dev/oracleasm -C -n VOLNAME -s /dev/multipath/xxxx" Additional info:
Device-mapper in general doesn't support this ioctl because it lets you set up arbitrary mappings of devices and so there's no way it can provide any meaningful geometry. Multipath is a special case because there's only one real device involved so it would be feasible to pass the ioctl through to the underlying device. [Duplicate of 168801.] Is the program actually *using* the result of the ioctl or does it need fixing to check the availability of the device (or whatever it wants to know) properly? *** This bug has been marked as a duplicate of 168801 ***
I believe oracleasm is only using this ioctl to find out if the device in question is a partition, since it will refuse to create it's volumes on a whole disk. In this case I modified the oracleasm wrapper script to pass the force option to asmtool, since the comments on the Oracle mailing list said that they only use that ioctl during volume creation stage, and not afterwards. This however means that if someone does pass oracleasm a whole disk it will still use it, which Oracle wanted to avoid.