/var/lib/libvirt/images on BTRFS (it works!)

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

 



Some of you may be interested in running your qemu-kvm (or other) disk image files on BTRFS. After some fumbling around, I have found out how to do it so it works and works very well (especially if it is on an SSD).

Anyone investigating running on BTRFS immediately finds out that there is a fragmentation problem (just putting image files on btrfs can result in them having between 50,000 and 100,000 extents). Some may have seen that adding nodatacow to the mount option is a solution ... it is not. So what is the solution?

1.  execute:  chattr  +C  /var/lib/libvirt/images
or wherever your image files are. This needs to be done on the directory whether you have a separate subvol or not.

2. This ONLY works for new files and ONLY works for "raw" storage format files. Pretty much by definition, qcow2 files are sparse format files and that is the primary problem on btrfs.

So that the vm creation wizard will create a new disk using the raw storage format, you need to select:
   Edit->Preferences->VM Details->Default Storage Format->Raw
After that, a created virtual will have the correct disk format.

You can use "filefrag" to verify that things are working.

Gene
--
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org




[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux