[fedora-virt] Directory Passthrough

Richard W.M. Jones rjones at redhat.com
Tue Mar 18 09:05:50 UTC 2014


On Mon, Mar 17, 2014 at 09:25:44PM -0400, Robert Locke wrote:
> Hmmmm... You know I need to take a closer look at all these libguestfs
> tools......
>
> virt-make-fs is interesting to me.

While I of course encourage you to look at these tools, in this case
virt-make-fs doesn't offer any particular advantages over
mkisofs/genisoimage/mksquashfs.  The advantage of virt-make-fs is it
can create a disk image containing a writable filesystem (eg. ext4),
which you don't need here.

> There is a Monday morning setup and the information in /content doesn't
> change after that setup.
> 
> I'm sure I can experiment myself, but I wonder how long virt-make-fs
> takes to create, say, a qcow2 copy of the tree of, say, 12GB?  This
> might be a way around my NFS problems....

It'll take roughly as long as it takes to copy 12 GB on your host
hardware.

The problem you're going to have is come Monday when you prepare a new
disk image, you won't simply be able to substitute the new disk image
for the old one.  The guests will see data corruption if you try that
because their kernels will be caching blocks from the old image.

There are two things to do: easiest is to reboot the guests.  Harder
is to coordinate the swap with the guest, so you hot plug a new block
device in the host, the guest sees a new block device, mounts it in a
new place, unmounts the old one, and then the host hot-unplugs the old
device.

I suspect it's going to be a lot easier to work out why NFS didn't
work and fix it.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/


More information about the virt mailing list