disk-image-create fails with "mount: /dev/mapper is not a block device"

Solution In Progress - Updated -

Issue

  • disk-image-create fails at mount: /dev/mapper is not a block device:
2019-11-13 15:04:55.700 | + qemu-img convert -f qcow2 -O raw /home/bcharahr/rhel-server-7.6-x86_64-kvm.qcow2 /tmp/tmp.uXYbFbRVyF/pwYgka.raw
2019-11-13 15:04:55.700 | ++ sudo kpartx -l /tmp/tmp.uXYbFbRVyF/pwYgka.raw
2019-11-13 15:04:55.700 | ++ awk '/loop[0-9]+p/'
2019-11-13 15:04:55.700 | ++ wc -l
2019-11-13 15:04:55.700 | + ROOT_PARTITION=p0
2019-11-13 15:04:55.700 | + sudo udevadm settle
2019-11-13 15:04:55.700 | + sudo losetup -f
2019-11-13 15:04:55.700 | /dev/loop8
2019-11-13 15:04:55.700 | ++ sudo kpartx -av /tmp/tmp.uXYbFbRVyF/pwYgka.raw
2019-11-13 15:04:55.700 | ++ awk '/loop[0-9]+p0/ {print $3}'
2019-11-13 15:04:55.700 | + ROOT_LOOPDEV=
2019-11-13 15:04:55.700 | + '[' -f /.dockerenv ']'
2019-11-13 15:04:55.700 | + timeout 5 sh -c 'while ! [ -e /dev/mapper/ ]; do sleep 1; done'
2019-11-13 15:04:55.700 | + EACTION='sudo kpartx -d /tmp/tmp.uXYbFbRVyF/pwYgka.raw ; rm -r /tmp/tmp.uXYbFbRVyF'
2019-11-13 15:04:55.700 | + trap 'sudo kpartx -d /tmp/tmp.uXYbFbRVyF/pwYgka.raw ; rm -r /tmp/tmp.uXYbFbRVyF' EXIT
2019-11-13 15:04:55.700 | + mkdir /tmp/tmp.uXYbFbRVyF/mnt
2019-11-13 15:04:55.700 | ++ sudo blkid -o value -s TYPE /dev/mapper/
2019-11-13 15:04:55.701 | + '[' xfs = '' ']'
2019-11-13 15:04:55.701 | + MOUNTOPTS=
2019-11-13 15:04:55.701 | + sudo mount /dev/mapper/ /tmp/tmp.uXYbFbRVyF/mnt
2019-11-13 15:04:55.701 | mount:  /dev/mapper is not a block device
2019-11-13 15:04:55.701 | ++ sudo kpartx -d /tmp/tmp.uXYbFbRVyF/pwYgka.raw
2019-11-13 15:04:55.701 | ++ rm -r /tmp/tmp.uXYbFbRVyF

Environment

  • Red Hat OpenStack Platform 13.0 (RHOSP)

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content