nova-compute fails to mount disk image when there is no partition table

Bug #929005 reported by Alvaro Lopez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Undecided
Unassigned

Bug Description

Hello there.

I have a disk image with no partitions inside. Instances can be launched from it perfectly, except that nova cannot mount it (I'm using loop and nbd as img_handlers) so as to inject files. From the logs it fails complaining that there are no available partitions. This is due to the fact that it "kpartx -a" doest not find any mapping from the disk image, although it will be possible to use the device directly (i.e. without any mappings).

I do not really know if this is a bug or this is the expected behavior (namely, that images *must* contain partitions).

Revision history for this message
Vish Ishaya (vishvananda) wrote : Re: [Bug 929005] [NEW] nova-compute fails to mount disk image when there is no partition table

For file injection, if you have a whole disk image it tries to inject into partition 1. If you have a separate kernel and ramdisk, it will try to inject without a partition. This means that you have to put your data in the first partition for a whole disk image. If you don't care about injected files, you can safely ignore the warning.

On Feb 8, 2012, at 9:31 AM, Alvaro Lopez wrote:

> Public bug reported:
>
> Hello there.
>
> I have a disk image with no partitions inside. Instances can be launched
> from it perfectly, except that nova cannot mount it (I'm using loop and
> nbd as img_handlers) so as to inject files. From the logs it fails
> complaining that there are no available partitions. This is due to the
> fact that it "kpartx -a" doest not find any mapping from the disk image,
> although it will be possible to use the device directly (i.e. without
> any mappings).
>
> I do not really know if this is a bug or this is the expected behavior
> (namely, that images *must* contain partitions).
>
> ** Affects: nova
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because you are subscribed to
> OpenStack Compute (nova).
> https://bugs.launchpad.net/bugs/929005
>
> Title:
> nova-compute fails to mount disk image when there is no partition
> table
>
> Status in OpenStack Compute (Nova):
> New
>
> Bug description:
> Hello there.
>
> I have a disk image with no partitions inside. Instances can be
> launched from it perfectly, except that nova cannot mount it (I'm
> using loop and nbd as img_handlers) so as to inject files. From the
> logs it fails complaining that there are no available partitions. This
> is due to the fact that it "kpartx -a" doest not find any mapping from
> the disk image, although it will be possible to use the device
> directly (i.e. without any mappings).
>
> I do not really know if this is a bug or this is the expected behavior
> (namely, that images *must* contain partitions).
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/nova/+bug/929005/+subscriptions

Revision history for this message
Alvaro Lopez (aloga) wrote :

Thank for your reply, Vish.

Now the behavior is clear:
    - Whole disk, injection with partition.
    - Separate kernel and ramdisk, injetion without partition.

Thanks!

Changed in nova:
status: New → Invalid
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.