Some quick operational notes for users of loop and nbd devices

    A quick note for OpenStack operators -- if you are using loop or nbd devices to mount disk images in nova-compute, then you would be well served to have plenty of device files hanging around to reduce contention. For loop devices, that seems as simple as making more of them with MAKEDEV. With nbd, you'll also need to increase the value of the max_nbd_devices flag to nova-compute. The latter is improved in grizzly, where we will autodetect nbd devices.

posted at: 16:28 | path: /openstack | permanent link to this entry

    ### George

    Hi,

    Can you please explain the order (and conditions) in which the three methods are used?

    In my Essex installation, the "img_handlers" is not defined in nova.conf, so it takes the default value "loop,nbd,guestfs".

    The "libvirt_inject_password" is also not set so it defaults to "false".

    My ssh keys are obtained by cloud-init, and still whenever I start a new instance I see in the nova-compute.logs this sequence of events:

    qemu-nbd -c /dev/nbd15 /var/lib/nova/instances/instance-0000076d/disk
    kpartx -a /dev/nbd15
    mount /dev/mapper/nbd15p1 /tmp/tmpxGBdT0
    umount /dev/mapper/nbd15p1
    kpartx -d /dev/nbd15
    qemu-nbd -d /dev/nbd15

    Basically, I don't understand why the mount of the first partition is necessary and what it happens when the partition is mounted. Also, why nbd is the chosen method?

    Thank you,
    George


    Add a comment to this post:

    Your name:

    Your email: Email me new comments on this post
      (Your email will not be published on this site, and will only be used to contact you directly with a reply to your comment if needed. Oh, and we'll use it to send you new comments on this post it you selected that checkbox.)


    Your website:

    Comments: