[libvirt] [PATCH] vz: set mount point for container image-based disks
mnestratov at virtuozzo.com
Mon Sep 21 09:14:57 UTC 2015
21.09.2015 11:44, Daniel P. Berrange пишет:
> On Sun, Sep 20, 2015 at 10:17:51PM +0300, Maxim Nestratov wrote:
>> From: Maxim Nestratov <mnestratov at virtuozzo.com>
>> In order to support not only root disks with type=file for containers,
>> we need to specify mount points for them.
>> For instance, if a secondary disk is added by the following record in
>> <disk type='file' device='disk'>
>> <driver type='ploop' cache='writeback'/>
>> <source file='/vz/some_path_to_image_dir'/>
>> <target bus='sata' dev='sdb'/>
>> we are going to add it to container mounted to '/mnt/sdb' path.
> That's not what the <disk> element is for. <disk> is about exposing
> block device nodes to the container. It shouldn't try todo anything
> with this device nodes. They might be used as raw data storage by
> an application, so we can't assume they should be mounted.
> If you want to mount things then you should be using <filesystem>
Hm. It actually means that any disks with type file shouldn't work in
And working root disks like this is a mistake? But why?
In vz, any images plugged into containers are also treated as disks. The
difference between 'filesystem' and 'disk' is whether we should mount it
or not. That's
all. While from point of view of a container user it is just another
storage. Why not
just mount it automatically?
More information about the libvir-list