From 27a6f3127f85a405becb9f6a6f6b5422302ab517 Mon Sep 17 00:00:00 2001 From: Rusty Bird Date: Thu, 2 Oct 2025 10:21:32 +0000 Subject: [PATCH 1/3] Secondary storage: consistently capitalize Btrfs --- user/advanced-topics/secondary-storage.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/user/advanced-topics/secondary-storage.rst b/user/advanced-topics/secondary-storage.rst index 36018085..8eaa7784 100644 --- a/user/advanced-topics/secondary-storage.rst +++ b/user/advanced-topics/secondary-storage.rst @@ -38,7 +38,7 @@ qvm-pool driver explanation: In theory, you can still use file-based disk images (“file” pool driver), but they will lack some features: for example, you won’t be able to do backups without shutting down the qube. -Additional storage can also be added on a Btrfs filesystem. A unique feature of Btrfs is that data can be compressed transparently. The subvolume can also be backed up using snapshots for an additional layer of protection; Btrfs supports differents level of redundancy; it has parity checksum; Btrfs volumes can be expanded or shrunk. Starting or stopping a VM has less impact and less chance of causing slowdown of the system as some users have noted with LVM. Relevant information for general btrfs configuration will be provided after the section on LVM storage. +Additional storage can also be added on a Btrfs filesystem. A unique feature of Btrfs is that data can be compressed transparently. The subvolume can also be backed up using snapshots for an additional layer of protection; Btrfs supports differents level of redundancy; it has parity checksum; Btrfs volumes can be expanded or shrunk. Starting or stopping a VM has less impact and less chance of causing slowdown of the system as some users have noted with LVM. Relevant information for general Btrfs configuration will be provided after the section on LVM storage. LVM storage ^^^^^^^^^^^ @@ -62,7 +62,7 @@ Take note of the VG and thin pool names for your second drive, then register it -BTRFS storage +Btrfs storage ^^^^^^^^^^^^^ @@ -76,7 +76,7 @@ It is possible to use an existing Btrfs storage if it is configured. In dom0, av $ btrfs show filesystem -To register the storage to qubes use the following command where ```` is a freely chosen pool name adn ```` is the mounted path to the second btrfs storage: +To register the storage to qubes use the following command where ```` is a freely chosen pool name adn ```` is the mounted path to the second Btrfs storage: .. code:: console @@ -201,7 +201,7 @@ Unmount the temporary Btrfs filesystem: $ rmdir /mnt/new_qube_storage -Mount the subvolume with compression enabled if desired, where ```` can take the values ``zlib|lzo|zstd``. ```` is a btrfs subvolume "qubes" in this example. +Mount the subvolume with compression enabled if desired, where ```` can take the values ``zlib|lzo|zstd``. ```` is a Btrfs subvolume "qubes" in this example. .. code:: console From c3f74ce704c69c1f8b08b9b4e351bbe7e786e889 Mon Sep 17 00:00:00 2001 From: Rusty Bird Date: Thu, 2 Oct 2025 10:21:33 +0000 Subject: [PATCH 2/3] Secondary storage: fix mounting Btrfs with compression Btrfs mount options are per whole filesystem, not per mountpoint. If a filesystem (or a subvolume inside of it) is mounted a second time, the second set of mount options such as compress= will not be applied. https://btrfs.readthedocs.io/en/latest/ch-mount-options.html --- user/advanced-topics/secondary-storage.rst | 24 ++++------------------ 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/user/advanced-topics/secondary-storage.rst b/user/advanced-topics/secondary-storage.rst index 8eaa7784..d3a1468d 100644 --- a/user/advanced-topics/secondary-storage.rst +++ b/user/advanced-topics/secondary-storage.rst @@ -66,7 +66,7 @@ Btrfs storage ^^^^^^^^^^^^^ -Theses steps assume you have already created a separate Btrfs filesystem for your second drive., that it is encrypted with LUKS and it is mounted. It is recommended to use a subvolume as it enables compression and excess storage can be use for other things. +Theses steps assume you have already created a separate Btrfs filesystem for your second drive, that it is encrypted with LUKS and it is mounted. It is recommended to use a subvolume as it enables snapshotting the VM data independently of any other files that you may want to store on the filesystem. It is possible to use an existing Btrfs storage if it is configured. In dom0, available Btrfs storage can be displayed using: @@ -177,12 +177,12 @@ First create the physical volume: $ sudo mkfs.btrfs -L