#8 create additional subvolumes at install time
Opened 2 years ago by chrismurphy. Modified a year ago

Summary:

  • Creating snapshots on btrfs is not recursive, the snapshot stops at nested subvolumes.
  • Create additional subvolumes in order to exclude (or treat with special handling) certain locations from a snapshot, send and receive, and restore regime.
  • Subvolumes are dedicated btrees, with their own fd (file descriptor) and inode pool.

Detailed explanation:

  • Creating subvolumes in nested form

    • Dilemma: A rollback will need to move these subvolumes to a new location, because they're nested in the old/abandoned subvolume.
  • Create subvolumes at the top-level, add them to fstab or native systemd mount.

    • Dilemma: results in 'invalid cross-device link' when reflinking; mv will fallback to a normal (inefficient) copy.

Possible locations:

/var/log/
/var/lib/libvirt/images/
/var/lib/containers/ ##useful for overlayfs driver, not needed for btrfs driver

Implementation:

Anaconda knows how to do this already, just change the kickstart to add additional subvolumes.


How about ~/.local/share/gnome-boxes?

How about ~/.local/share/gnome-boxes?

I'd characterize it as a nice optimization rather than a requirement. The biggest pro is to avoid snapshotting VM images, thereby avoiding copy-on-write which results in fragmentation. The performance hit isn't COW itself, it's the cost of tracking many fragments that are the result of COW. Likewise, preallocating the qcow2 file would reduce the tendancy of fragmentation (on any file system).

What should do this? It's briefly discussed on the libvirt list (very end of this post):
https://www.redhat.com/archives/libvir-list/2020-July/msg00558.html

The most immediate "owner" of this directory is GNOME Boxes. The path doesn't exist until the first VM is created.

The installer currently can't do it for Workstation. The installer could do it for the first user it creates on other desktops, but not additional users. That suggests g-i-s and Users panel (and equivalents), and homectl in the systemd-homed case.

@feborges

Metadata Update from @ngompa:
- Issue set to the milestone: Future Release (was: Fedora 34)

a year ago

Login to comment on this ticket.

Metadata
Boards 1
Development Status: Backlog