Thies C. Arntzen
2017-Apr-14 11:45 UTC
[libvirt-users] ZFS: creating a pool in a created zfs does not work, only when using the whole zfs-pool.
Hi, I’m new here so apologies if this has been answered before. I have a box that uses ZFS for everything (ubuntu 17.04) and I want to create a libvirt pool on that. My ZFS pool is named „big" So i do:> zfs create big/zpool > virsh pool-define-as --name zpool --source-name big/zpool --type zfs > virsh pool-start zpool > virsh pool-autostart zpool > virsh pool-list > virsh vol-create-as --pool zpool --name test1 --capacity 1G > virsh vol-list zpoolEverything seems to work (no error message, vol-list shows the created volume, I can see the volume via zfs list -t all). -BUT- I cannot use that volume via virt-manager and after a short while it’s no longer listed via virsh vol-list zpool. The very same thing works as expected if I create a new zfs pool which I hand into libvirt. So instead of creating a pool from "big/zpool“ I create a pool names „somepool“ on a free device and -voila- everything works. Hope I did make myself clear? Best regards, thies
Roman Bogorodskiy
2017-Apr-23 13:14 UTC
Re: [libvirt-users] ZFS: creating a pool in a created zfs does not work, only when using the whole zfs-pool.
Thies C. Arntzen wrote:> Hi, > > I’m new here so apologies if this has been answered before. > > I have a box that uses ZFS for everything (ubuntu 17.04) and I want to > create a libvirt pool on that. My ZFS pool is named „big" > > So i do: > > > zfs create big/zpool > > virsh pool-define-as --name zpool --source-name big/zpool --type zfs > > virsh pool-start zpool > > virsh pool-autostart zpool > > virsh pool-list > > virsh vol-create-as --pool zpool --name test1 --capacity 1G > > virsh vol-list zpool > > Everything seems to work (no error message, vol-list shows the created > volume, I can see the volume > via zfs list -t all). -BUT- I cannot use that volume via virt-managerCould you check if you can use this volume via virsh, and paste an error message in case if it provides one? Or maybe an error message if virt-manager gives one.> and after a short while it’s > no longer listed via virsh vol-list zpool. The very same thing worksDoes "after a short while" involve host reboots, libvirtd restarts or anything like that? Anyway, I've just checked the scenario you provided on FreeBSD and I was able to create a VM using this new 'test1' volume. I was using just virsh though. I'll try to setup Ubutun 17.04 VM and check there.> as expected if I create a new zfs > pool which I hand into libvirt. So instead of creating a pool from > "big/zpool“ I create a pool names > „somepool“ on a free device and -voila- everything works. > > Hope I did make myself clear? > > Best regards, > thies > > _______________________________________________ > libvirt-users mailing list > libvirt-users@redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-usersRoman Bogorodskiy
Thies C. Arntzen
2017-Apr-24 12:51 UTC
Re: [libvirt-users] ZFS: creating a pool in a created zfs does not work, only when using the whole zfs-pool.
Thank you for your reply. I have managed to create a virtual machine on my ZFS-filesystem using virt-install:-) It seems to me that my version of libvirt (Ubuntu 17.04) has problems enumerating the devices when "virsh vol-list“ is used. The volumes are available for virt-install but not thru virsh or virt-manager. As to when the volumes disappear in virsh vol-list - I have no idea. I’m not restarting libvirtd. It *seems* to me that (wild guess) they can be listed as long as they are fresh and in some in memory cache and never get displayed if you have to enumerate from the filesystem. There are no error-messages that I can see - the volumes are simply not displayed. Best regards, thies Am 23. April 2017 um 15:14:55, Roman Bogorodskiy (bogorodskiy@gmail.com) schrieb: Thies C. Arntzen wrote:> Hi, > > I’m new here so apologies if this has been answered before. > > I have a box that uses ZFS for everything (ubuntu 17.04) and I want to > create a libvirt pool on that. My ZFS pool is named „big" > > So i do: > > > zfs create big/zpool > > virsh pool-define-as --name zpool --source-name big/zpool --type zfs > > virsh pool-start zpool > > virsh pool-autostart zpool > > virsh pool-list > > virsh vol-create-as --pool zpool --name test1 --capacity 1G > > virsh vol-list zpool > > Everything seems to work (no error message, vol-list shows the created > volume, I can see the volume > via zfs list -t all). -BUT- I cannot use that volume via virt-managerCould you check if you can use this volume via virsh, and paste an error message in case if it provides one? Or maybe an error message if virt-manager gives one.> and after a short while it’s > no longer listed via virsh vol-list zpool. The very same thing worksDoes "after a short while" involve host reboots, libvirtd restarts or anything like that? Anyway, I've just checked the scenario you provided on FreeBSD and I was able to create a VM using this new 'test1' volume. I was using just virsh though. I'll try to setup Ubutun 17.04 VM and check there.> as expected if I create a new zfs > pool which I hand into libvirt. So instead of creating a pool from > "big/zpool“ I create a pool names > „somepool“ on a free device and -voila- everything works. > > Hope I did make myself clear? > > Best regards, > thies > > _______________________________________________ > libvirt-users mailing list > libvirt-users@redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-usersRoman Bogorodskiy
Possibly Parallel Threads
- ZFS: creating a pool in a created zfs does not work, only when using the whole zfs-pool.
- Re: ZFS: creating a pool in a created zfs does not work, only when using the whole zfs-pool.
- ctags(1) command execution vulnerability
- Re: [libvirt] Python-libvirt in a virtual environment.
- Finding Pool ID