Port-xen archive

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

Re: Setting up vnd devices for disks



Louis Guillaume <louis%zabrico.com@localhost> writes:

> I'm setting up my dom0 and would like to organize all the disk space
> for the hosted domains in one place (/srv/xen). And I want to do it in
> the most flexible and/or efficient way.

To me, that means files for the virtual disks, accessed via vnd.

> o What benefits do we gain from using vnd devices in our xen
>   configurations over regular files?

It works.  Basically, on a NetBSD dom0, to provide a disk to a domU
requires a block device on the dom0.  This can be done with an actual
block device (partition of a disk), or a file-backed vnd.

> o What's the correct practice for managing vnd devices? Other than
>   having a script to vnconfig them each time we boot, how should
>   these be tracked?

In your xen config,

  disk = [ 'file:/n0/xen/foo-wd0,0x1,w']

makes that file be the contents of xbd0.

> Any help clarifying this would be great. I'm using netbsd-5/amd64 for
> dom0 with a recent xenkernel33 and xentools33.

When you start up a domU, the scripts create a vnd and attach it to the
file.


The advantage of the file/vnd appraoch is that you can resize disks with
dump/restore on the dom0 and new files, and they live in a big fs.  With
partitions it is messier.  But with partitions you skip dom0 fs
overhead, which is perhaps 10%.

When you create the first disk, so so by dd'ing zeros onto the entire
planned size.  vnd/xen does not play well with sparse files, and you
want it all pre-allocated for good locality anyway.

I am unaware of how to make xen virtual disks work with a file without
vnd.


If you are hvaing trouble, please post your config file.

Attachment: pgp2T7ncXoBUs.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index