]> git.proxmox.com Git - pve-docs.git/blame - pve-storage-btrfs.adoc
ssh: document PVE-specific setup
[pve-docs.git] / pve-storage-btrfs.adoc
CommitLineData
ea856d57
WB
1[[storage_btrfs]]
2BTRFS Backend
3-------------
4ifdef::wiki[]
5:pve-toplevel:
6:title: Storage: BTRFS
7endif::wiki[]
8
9Storage pool type: `btrfs`
10
11On the surface, this storage type is very similar to the directory storage type,
12so see the directory backend section for a general overview.
13
14The main difference is that with this storage type `raw` formatted disks will be
15placed in a subvolume, in order to allow taking snapshots and supporting offline
16storage migration with snapshots being preserved.
17
18NOTE: BTRFS will honor the `O_DIRECT` flag when opening files, meaning VMs
19should not use cache mode `none`, otherwise there will be checksum errors.
20
21Configuration
22~~~~~~~~~~~~~
23
24This backend is configured similarly to the directory storage. Note that when
25adding a directory as a BTRFS storage, which is not itself also the mount point,
26it is highly recommended to specify the actual mount point via the
27`is_mountpoint` option.
28
29For example, if a BTRFS file system is mounted at `/mnt/data2` and its
30`pve-storage/` subdirectory (which may be a snapshot, which is recommended)
31should be added as a storage pool called `data2`, you can use the following
32entry:
33
34----
35btrfs: data2
36 path /mnt/data2/pve-storage
37 content rootdir,images
38 is_mountpoint /mnt/data2
39----
40
41Snapshots
42~~~~~~~~~
43
44When taking a snapshot of a subvolume or `raw` file, the snapshot will be
45created as a read-only subvolume with the same path followed by an `@` and the
46snapshot's name.
47
48ifdef::wiki[]
49
50See Also
51~~~~~~~~
52
53* link:/wiki/Storage[Storage]
c1e9a769 54* link:/wiki/BTRFS[BTRFS Sysadmin]
ea856d57
WB
55
56endif::wiki[]