NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-xen/47899: xen block script does not create vnd devices when needed.

On Thu, Jun 06, 2013 at 02:05:00AM +0000, Pierre Pronchery wrote:
> The following reply was made to PR port-xen/47899; it has been noted by GNATS.
> From: Pierre Pronchery <>
> To:
> Cc: 
> Subject: Re: port-xen/47899: xen block script does not create vnd devices
>  when needed.
> Date: Thu, 06 Jun 2013 04:00:34 +0200
>  This is a multi-part message in MIME format.
>  --------------040700010609060508010203
>  Content-Type: text/plain; charset=ISO-8859-1
>  Content-Transfer-Encoding: 7bit
>                       Hi 7heo,
>  On 05/06/2013 22:30, wrote:
>  > [...]
>  > By default, NetBSD has 4 (four) vnd devices, /dev/vnd0, /dev/vnd1,
>  > /dev/vnd2 and /dev/vnd3.
>  > 
>  > When one creates a virtual machine with a disk from a file, the
>  > block script uses vnconfig to "mount" the image on a vnd loopback device.
>  > 
>  > When the Xen toolstack (xm) needs to mount more than 4 images at the
>  > same time, it fails, instead of increasing the number of vnd devices to
>  > a suited quantity.
>  Good catch.
>  Can you try the patch attached? It should attempt to create the missing
>  nodes automatically.

I'm not sure it's the right thing to do. If things go wrong (e.g.
a domU being repeteadly restarted without the previous one being
properly destroyed, as with on_crash = rename-restart)
you can fill up /dev, and probably more bad things will happen.

I think it's up to the admin to make sure he has enough vnd devices

The real problem may be that 'xm create' doens't report the real
reason for the failure; the real reason is in xenbackendd.log.
I'm not sure if this can easily be fixed.

>  For some reason "vnconfig -l" seems to only ever lists the four first
>  vnd devices, regardless of the existence of the corresponding device
>  nodes, but that's a separate issue.

vnconfig -l works fine for me:
ragga:/domains#vnconfig -l
vnd0: not in use
vnd1: /domains (/dev/raid1f) inode 4
vnd2: /domains (/dev/raid1f) inode 11
vnd3: /domains (/dev/raid1f) inode 12
vnd4: not in use
vnd5: not in use
vnd6: not in use
vnd29: not in use
vnd30: not in use
vnd31: not in use

Manuel Bouyer <>
     NetBSD: 26 ans d'experience feront toujours la difference

Home | Main Index | Thread Index | Old Index