[libvirt] RFC filesystem pool proposal description.

In this proposal description we would like to introduce a separate pool type:fspool. Fspool provides and manages filesystems. Below are listed possible examples of fspool, depending on source type: volume, directory or network. Volume fspool uses storage pool volume to reside upon. <fspool type = 'volume'> <name>fspool</name> <uuid>cb07b799-8e03-485c-aaa0-7c88f60b37b0</uuid> <allocation>0</allocation> <capacity>0<capacity> <source> <pool ='pool name'/> <volume='volume name'/> <format type = 'ext4'/> (ext4, zfs - depending on type of volume that is used as a backend). <source/> <target> <path>/path/to/fspool</path> <permissions> <mode>0777</mode> <owner>0</owner> <group>0</group> </permissions> </target> </fspool> Directory fspool represents a host directory: <fspool type = 'dir'> <name>fspool</name> <uuid>cb07b799-8e03-485c-aaa0-7c88f60b37b0</uuid> <target> <path>/path/to/fspool/root</path> <permissions> <mode>0777</mode> <owner>0</owner> <group>0</group> </permissions> </target> </fspool> Network fspool is similar to previous one, except it is remote: <fspool type='network'> <name>fspool</name> <uuid>b27a72b5-a92e-4e58-a172-a80ba73b30fe</uuid> <source> <host name='X.X.X.X'/> - if the pool is not on the host <dir path='some/directory/exposed/to/our/host'/> </source> <target> <path>/fspool</path> </target> </fspool> basic API for fspool management: fspool-define fspool-build fspool-start fspool-stop fspool-destroy fspool-undefine Fspools are divided into fs items. Single item is a directory inside the fspool root directory. Fs item example is listed below: <fs> <name>item</name> <allocation>0</allocation> <capacity>0<capacity> <source>fspool='name'</source> <target> <path>/fspool</path> </target> <permissions> <mode>0777</mode> <owner>0</owner> <group>0</group> <cgroups> Limits</cgroups> </permissions> </fs> - allocation/capacity - is omitted when fspools type is directory. - target path is a path to fs item from the fspool root. If it is not present then the content of item is placed directly in fspool root. - cgroups can be used in order to manipulate space usage politics. Fs items will be manipulated via fs API: fs-define fs-delete fs-list In addition to containers use-cases, fspools are also useful for libvirt itself - they will help store and easily manage some internal metadata, such as snapshots or internal connection driver information (logs, domain configurations, etc). Please, take a look and share your opinion. Olga

On Thu, Apr 28, 2016 at 07:57:14PM +0300, Olga Krishtal wrote:
In this proposal description we would like to introduce a separate pool type:fspool. Fspool provides and manages filesystems. Below are listed possible examples of fspool, depending on source type: volume, directory or network.
I'm struggling a little to understand what the overal purpose is here. Can you step back a level and describe the overall problem you're facing and what your use cases / goals are for this proposal. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

28.04.2016 20:29, Daniel P. Berrange пишет:
On Thu, Apr 28, 2016 at 07:57:14PM +0300, Olga Krishtal wrote:
In this proposal description we would like to introduce a separate pool type:fspool. Fspool provides and manages filesystems. Below are listed possible examples of fspool, depending on source type: volume, directory or network. I'm struggling a little to understand what the overal purpose is here. Can you step back a level and describe the overall problem you're facing and what your use cases / goals are for this proposal.
Regards, Daniel
The main purpose of this is to have a generic API to manage filesystems similar to storage API and be able to use these filesystems in domain XMLs defining containers. So ,it is a kind of abstraction of filesystem sources and backends. Also there can be some indirect benefits but they are not the aim. Maxim

28.04.2016 20:45, Maxim Nestratov пишет:
28.04.2016 20:29, Daniel P. Berrange пишет:
On Thu, Apr 28, 2016 at 07:57:14PM +0300, Olga Krishtal wrote:
In this proposal description we would like to introduce a separate pool type:fspool. Fspool provides and manages filesystems. Below are listed possible examples of fspool, depending on source type: volume, directory or network. I'm struggling a little to understand what the overal purpose is here. Can you step back a level and describe the overall problem you're facing and what your use cases / goals are for this proposal.
Regards, Daniel
The main purpose of this is to have a generic API to manage filesystems similar to storage API and be able to use these filesystems in domain XMLs defining containers. So ,it is a kind of abstraction of filesystem sources and backends. Also there can be some indirect benefits but they are not the aim.
Maxim
I wonder, if my reply clarify the original message or it's still unclear and it's better to step back more and describe the problem in more details?
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

2016-04-29 19:12 GMT+03:00 Maxim Nestratov <mnestratov@virtuozzo.com>:
I wonder, if my reply clarify the original message or it's still unclear and it's better to step back more and describe the problem in more details?
Yes, may be i'm interesting in this feature too, but i can miss something. Does you want to allow format and mount needed paths/devs via libvirt to allow to use it as pools? Now i need some cookbooks for chef to format needed devices and mount it before define pools.... -- Vasiliy Tolstov, e-mail: v.tolstov@selfip.ru

On 02/05/16 22:12, Vasiliy Tolstov wrote:
2016-04-29 19:12 GMT+03:00 Maxim Nestratov <mnestratov@virtuozzo.com>:
I wonder, if my reply clarify the original message or it's still unclear and it's better to step back more and describe the problem in more details?
Yes, may be i'm interesting in this feature too, but i can miss something. Does you want to allow format and mount needed paths/devs via libvirt to allow to use it as pools? yes, it will be called fspool-build. Now i need some cookbooks for chef to format needed devices and mount it before define pools....

On Thu, Apr 28, 2016 at 08:45:11PM +0300, Maxim Nestratov wrote:
28.04.2016 20:29, Daniel P. Berrange пишет:
On Thu, Apr 28, 2016 at 07:57:14PM +0300, Olga Krishtal wrote:
In this proposal description we would like to introduce a separate pool type:fspool. Fspool provides and manages filesystems. Below are listed possible examples of fspool, depending on source type: volume, directory or network. I'm struggling a little to understand what the overal purpose is here. Can you step back a level and describe the overall problem you're facing and what your use cases / goals are for this proposal.
The main purpose of this is to have a generic API to manage filesystems similar to storage API and be able to use these filesystems in domain XMLs defining containers. So ,it is a kind of abstraction of filesystem sources and backends. Also there can be some indirect benefits but they are not the aim.
Ok, I think i see the point now. You'd have a filesystem pool as a object which manages a bunch of filesystem instances, each one of which can be used as the backing store for a container filesystem, or for machine virt filesystem passthrough. One might think of bolting this onto the directory based storage pool to let it deal with volumes which are trees instead of flat files, but I agree that it'd be nicer to have a dedicate set of APIs for filesystem mgmt. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|

04.05.2016 13:09, Daniel P. Berrange пишет:
On Thu, Apr 28, 2016 at 08:45:11PM +0300, Maxim Nestratov wrote:
28.04.2016 20:29, Daniel P. Berrange пишет:
In this proposal description we would like to introduce a separate pool type:fspool. Fspool provides and manages filesystems. Below are listed possible examples of fspool, depending on source type: volume, directory or network. I'm struggling a little to understand what the overal purpose is here. Can you step back a level and describe the overall problem you're facing and what your use cases / goals are for this proposal. The main purpose of this is to have a generic API to manage filesystems similar to storage API and be able to use these filesystems in domain XMLs defining containers. So ,it is a kind of abstraction of filesystem sources and backends. Also
On Thu, Apr 28, 2016 at 07:57:14PM +0300, Olga Krishtal wrote: there can be some indirect benefits but they are not the aim. Ok, I think i see the point now. You'd have a filesystem pool as a object which manages a bunch of filesystem instances, each one of which can be used as the backing store for a container filesystem, or for machine virt filesystem passthrough.
Exactly.
One might think of bolting this onto the directory based storage pool to let it deal with volumes which are trees instead of flat files, but I agree that it'd be nicer to have a dedicate set of APIs for filesystem mgmt.
We thought about this option and came to the same conclusion. I hope Olga will get back to the mailing list with the first RFC version of fs pool API shortly. Thanks for your opinion Daniel. Maxim
Regards, Daniel
participants (4)
-
Daniel P. Berrange
-
Maxim Nestratov
-
Olga Krishtal
-
Vasiliy Tolstov