partprobe fails on /dev/mapper/353333330000007d0

Bug #1488688 reported by Loic Dachary
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
multipath-tools (Ubuntu)
Expired
Low
Unassigned

Bug Description

Steps to reproduce on Ubuntu 14.04 on a virtual machine with no /dev/sda device

# apt-get install linux-image-extra-3.13.0-61-generic
# modprobe scsi_debug vpd_use_hostno=0 add_host=1 dev_size_mb=200
# ls -l /dev/mapper
total 0
lrwxrwxrwx 1 root root 7 Aug 25 23:00 353333330000007d0 -> ../dm-0
crw------- 1 root root 10, 236 Aug 25 11:45 control
# /sbin/sgdisk --new=2:0:100M --change-name=2:'ceph journal' --partition-guid=2:a94ad65f-fadb-4178-851b-5261c06ee3b9 --typecode=2:45b0969e-8ae0-4982-bf9d-5a8d867af560 --mbrtogpt -- /dev/mapper/353333330000007d0
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot.
The operation has completed successfully.
# partprobe /dev/mapper/353333330000007d0
Device /dev/mapper/353333330000007d0p2 not found
device-mapper: table ioctl on failed: No such device or address
Device /dev/mapper/353333330000007d0p2 not found
device-mapper: table ioctl on failed: No such device or address
# ls -l /dev/mapper
total 0
lrwxrwxrwx 1 root root 7 Aug 25 23:00 353333330000007d0 -> ../dm-0
brw-rw---- 1 root disk 252, 2 Aug 25 23:00 353333330000007d0p2
crw------- 1 root root 10, 236 Aug 25 11:45 control
# partprobe /dev/mapper/353333330000007d0
# ls -l /dev/mapper
total 0
lrwxrwxrwx 1 root root 7 Aug 25 23:00 353333330000007d0 -> ../dm-0
brw-rw---- 1 root disk 252, 1 Aug 25 23:00 353333330000007d0-part2
brw-rw---- 1 root disk 252, 2 Aug 25 23:00 353333330000007d0p2
crw------- 1 root root 10, 236 Aug 25 11:45 control

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hi,
thanks for the nice setup with scsi_debug that helps.
I also ran it against some real FCP devices I had around.

I can confirm that this still applies to Xenial.
1. working without issue on the device itself e.g. /dev/sd*
2. when using on /dev/mapper devices reporting issues

ubuntu@s1lp5:~$ sudo partprobe /dev/mapper/36005076306ffd6b6000000000000240
36005076306ffd6b60000000000002402 36005076306ffd6b60000000000002402-part2 36005076306ffd6b60000000000002403
ubuntu@s1lp5:~$ sudo /sbin/sgdisk --new=2:0:100M --change-name=2:'ceph journal' --partition-guid=2:a94ad65f-fadb-4178-851b-5261c06ee3b9 --typecode=2:45b0969e-8ae0-4982-bf9d-5a8d867af560 --mbrtogpt -- /dev/mapper/36005076306ffd6b60000000000002403
Creating new GPT entries.
Setting name!
partNum is 1
REALLY setting name!
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot or after you
run partprobe(8) or kpartx(8)
The operation has completed successfully.
ubuntu@s1lp5:~$ sudo partprobe /dev/mapper/36005076306ffd6b60000000000002403
device-mapper: create ioctl on 36005076306ffd6b60000000000002403p2part2-mpath-36005076306ffd6b60000000000002403 failed: Device or resource busy
ubuntu@s1lp5:~$ echo $?
0
ubuntu@s1lp5:~$ ll /dev/mapper/36005076306ffd6b60000000000002403*
lrwxrwxrwx 1 root root 7 Apr 20 10:53 /dev/mapper/36005076306ffd6b60000000000002403 -> ../dm-1
lrwxrwxrwx 1 root root 7 Apr 20 10:53 /dev/mapper/36005076306ffd6b60000000000002403-part2 -> ../dm-3

But then as you have shown as well, it is just a message about the ioctl that likely isn't handled/forwarded correctly by the device mapper.

It doesn't even have a bad return code - so it might just be about making more clear that this is a warning, but not an error at all right?

Changed in multipath-tools (Ubuntu):
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Loic Dachary (dachary) wrote :

Hi,

Thanks for investigating this issue. It fails the multipath implementation for Ceph. In the case of multipath the partition must be created on /dev/mapper/XXX otherwise it's kind of pointless ;-)

When you write "I can confirm that this still applies to Xenial." do you mean that repeating the steps in the description leads to

lrwxrwxrwx 1 root root 7 Aug 25 23:00 353333330000007d0 -> ../dm-0
brw-rw---- 1 root disk 252, 1 Aug 25 23:00 353333330000007d0-part2
brw-rw---- 1 root disk 252, 2 Aug 25 23:00 353333330000007d0p2
crw------- 1 root root 10, 236 Aug 25 11:45 control

as well ?

Thanks again :-)

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Sorry, I forgot to subscribe back then.

I used Xenial (to check if it is an issue in newer code) and used real devices (to check if scsi_debug might be the issue).

Following your commands exactly doesn't give me a /dev/mapper entry - only a /dev/sd* device.
But I haven't checked what might be needed to get there as I had real HW around.

With that it ended up as:
1. throwing the error
2. the following links in /dev/mapper
lrwxrwxrwx 1 root root 7 Apr 20 10:53 /dev/mapper/36005076306ffd6b60000000000002403 -> ../dm-1
lrwxrwxrwx 1 root root 7 Apr 20 10:53 /dev/mapper/36005076306ffd6b60000000000002403-part2 -> ../dm-3

Is the issue you want to point out not the (just a message) warning of:
"device-mapper: create ioctl on 36005076306ffd6b60000000000002403p2part2-mpath-36005076306ffd6b60000000000002403 failed: Device or resource busy"

Or is the main issue you point out that you have a ...p2 AND a ...-part2?

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hi,
I try to come back to bugs dormant for too long.
It was rather unclear (to me at least) if that was about the message or an actual functional issue.
No response yet on that.

Also these days one should try to check if the latest release is any better and might have a fix to backport already.
Setting incomplete to reflect that for now.

Changed in multipath-tools (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for multipath-tools (Ubuntu) because there has been no activity for 60 days.]

Changed in multipath-tools (Ubuntu):
status: Incomplete → Expired
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.