Before I submit a BZ I figured maybe some discussion was in order.
As the default fs is now btrfs and it's well known to be bad for VMs, I'm surprised this wasn't already implemented.
Since the folder is created on the fly in the user's home directory this can't be easily fixed through packaging. In fact the only way I can think of is to create a bash script wrapper for the gnome-boxes executable and check for the directory, create it if needed and chattr +C the directory.
Is there a better solution?
Thanks, Richard
On Sat, Apr 3, 2021 at 10:42 AM Richard Shaw hobbes1069@gmail.com wrote:
Before I submit a BZ I figured maybe some discussion was in order.
As the default fs is now btrfs and it's well known to be bad for VMs, I'm surprised this wasn't already implemented.
It is implemented. https://listman.redhat.com/archives/libvir-list/2020-July/msg01377.html
Applies to virt-install, virt-manager, GNOME Boxes, and Cockpit.
If you do a clean install and haven't setup a storage pool yet before copying over VM images from some other source, they won't be nodatacow because the enclosing directory isn't yet nodatacow.
On Sat, Apr 3, 2021 at 11:40 PM Chris Murphy lists@colorremedies.com wrote:
On Sat, Apr 3, 2021 at 10:42 AM Richard Shaw hobbes1069@gmail.com wrote:
Before I submit a BZ I figured maybe some discussion was in order.
As the default fs is now btrfs and it's well known to be bad for VMs,
I'm surprised this wasn't already implemented.
It is implemented. https://listman.redhat.com/archives/libvir-list/2020-July/msg01377.html
Applies to virt-install, virt-manager, GNOME Boxes, and Cockpit.
If you do a clean install and haven't setup a storage pool yet before copying over VM images from some other source, they won't be nodatacow because the enclosing directory isn't yet nodatacow.
Ahh.. That's good at least. I have a fresh system install but using an existing /home so I had to do it manually.
It should be possible, however, to mark the images folder +C even if it wouldn't affect existing images.
Thanks, Richard
On Sun, Apr 4, 2021 at 5:40 AM Richard Shaw hobbes1069@gmail.com wrote:
On Sat, Apr 3, 2021 at 11:40 PM Chris Murphy lists@colorremedies.com wrote:
On Sat, Apr 3, 2021 at 10:42 AM Richard Shaw hobbes1069@gmail.com wrote:
Before I submit a BZ I figured maybe some discussion was in order.
As the default fs is now btrfs and it's well known to be bad for VMs, I'm surprised this wasn't already implemented.
It is implemented. https://listman.redhat.com/archives/libvir-list/2020-July/msg01377.html
Applies to virt-install, virt-manager, GNOME Boxes, and Cockpit.
If you do a clean install and haven't setup a storage pool yet before copying over VM images from some other source, they won't be nodatacow because the enclosing directory isn't yet nodatacow.
Ahh.. That's good at least. I have a fresh system install but using an existing /home so I had to do it manually.
Yeah nodatacow is set when the pool is created. So if it was created before the patch was added to Fedora 33, around July 2020, it wouldn't be set automatically later.
It should be possible, however, to mark the images folder +C even if it wouldn't affect existing images.
It is.
-- Chris Murphy
On Sun, Apr 4, 2021 at 5:19 PM Chris Murphy lists@colorremedies.com wrote:
On Sun, Apr 4, 2021 at 5:40 AM Richard Shaw hobbes1069@gmail.com wrote:
It should be possible, however, to mark the images folder +C even if it
wouldn't affect existing images.
It is.
What I meant, is that it could be marked +C even for existing installs so at least future VMs would be set correctly.
Thanks, Richard
On Mon, Apr 5, 2021, 6:28 AM Richard Shaw hobbes1069@gmail.com wrote:
On Sun, Apr 4, 2021 at 5:19 PM Chris Murphy lists@colorremedies.com wrote:
On Sun, Apr 4, 2021 at 5:40 AM Richard Shaw hobbes1069@gmail.com wrote:
It should be possible, however, to mark the images folder +C even if it
wouldn't affect existing images.
It is.
What I meant, is that it could be marked +C even for existing installs so at least future VMs would be set correctly.
The nodatacow attribute/flag is set at the time the storage pool is created. I'm not sure what would be involved in checking it every time. There's an opt out mechanism in libvirt (keep it cow).
Chris Murphy
On Mon, Apr 5, 2021 at 11:43 AM Chris Murphy lists@colorremedies.com wrote:
On Mon, Apr 5, 2021, 6:28 AM Richard Shaw hobbes1069@gmail.com wrote:
On Sun, Apr 4, 2021 at 5:19 PM Chris Murphy lists@colorremedies.com wrote:
On Sun, Apr 4, 2021 at 5:40 AM Richard Shaw hobbes1069@gmail.com wrote:
It should be possible, however, to mark the images folder +C even if
it wouldn't affect existing images.
It is.
What I meant, is that it could be marked +C even for existing installs so at least future VMs would be set correctly.
The nodatacow attribute/flag is set at the time the storage pool is created. I'm not sure what would be involved in checking it every time. There's an opt out mechanism in libvirt (keep it cow).
Ahh, I was speaking more to the ~/.local/share/gnome-boxes/images folder.
Thanks, Richard
On Mon, Apr 5, 2021 at 12:12 PM Richard Shaw hobbes1069@gmail.com wrote:
On Mon, Apr 5, 2021 at 11:43 AM Chris Murphy lists@colorremedies.com wrote:
On Mon, Apr 5, 2021, 6:28 AM Richard Shaw hobbes1069@gmail.com wrote:
On Sun, Apr 4, 2021 at 5:19 PM Chris Murphy lists@colorremedies.com wrote:
On Sun, Apr 4, 2021 at 5:40 AM Richard Shaw hobbes1069@gmail.com wrote:
It should be possible, however, to mark the images folder +C even if it wouldn't affect existing images.
It is.
What I meant, is that it could be marked +C even for existing installs so at least future VMs would be set correctly.
The nodatacow attribute/flag is set at the time the storage pool is created. I'm not sure what would be involved in checking it every time. There's an opt out mechanism in libvirt (keep it cow).
Ahh, I was speaking more to the ~/.local/share/gnome-boxes/images folder.
It's the same mechanism for virt-install, Cockpit, GNOME Boxes, and virt-manager. Maybe anything libvirt, because when I cleaned up a pool (virsh pool-destroy; virsh pool-undefine) and 'chattr -C /path/' and then recreated the pool with virsh, nodatacow was set again.