[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Libvir] PATCH: 0/16: Storage management APIs

On Tue, Feb 12, 2008 at 10:50:35AM -0800, Dan Smith wrote:
> DB> The patch series that follows provides storage management APIs for dealing
> DB> with local directories, local filesystems, remote filesystems, logical
> DB> volumes (LVM), disk partitioning, and iSCSI. It will also soon support
> DB> SCSI host adapters (including NPIV).
> What about a directory of directories?  For something like containers,
> you want to bind-mount a directory on the host system into the
> container's space.  It seems reasonable to have a directory of, for
> example, copies of var for each of your container.  For example:
>   /var/lib/containers/var/{mycontA,mycontB}/{lib,spool,cache,...}
>                       ^^^  ^^^^^^^ ^^^^^^^
>                        |      |       |
>   Pool ----------------+      |       |
>   Volume ---------------------+       |
>   Volume -----------------------------+
> I haven't read anything in my skimming that leads me to believe that
> anything in the infrastructure you're adding would prevent such an
> implementation down the road, but I just thought I'd bring it up.

Well there's a couple of ways to approach this. 

 * Have a general purpose file/directory manipulation API
 * Treat a directory as just another type of file 'format'

The 2nd would be easy to do - in the volume XML format we could have
support like this:

         <format type="dir"/>

Which would result in   $pool-target-dir/$vol-name. This works fine if
you only need to be able to create the top level directory for the container

The question is how you end up populating the filesystem for the container.
I don't have any answer for that,  but I really rather want to avoid turning
libvirt into a general file management API. If we want that it would be 
separate from the storage management APIs anyway.

Perhaps simply the ability to 'clone' an existing directory (populated from
source external soure, or off NFS) would be sufficient for populating 
containers ?

|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]