File: Interoperability.rst

package info (click to toggle)
btrfs-progs 6.17-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 20,596 kB
  • sloc: ansic: 127,198; sh: 7,836; python: 1,385; makefile: 900; asm: 296
file content (109 lines) | stat: -rw-r--r-- 3,166 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
.. BTRFS integration related pages index

Interoperability
================

.. _interop-cgroups:

cgroups
-------

Cgroups are supported for the IO controller, for compressed and uncompressed
data. This can be used to limit bandwidth or for accounting. The cgroups can
be configured directly or e.g. via systemd directives *IOAccounting*,
*IOWeight* etc.

See also :manref:`systemd.resource-control(5)`.

.. _interop-fsverity:

fsverity
--------

The fs-verity is a support layer that filesystems can hook into to
support transparent integrity and authenticity protection of read-only
files. This requires a separate management utility :command:`fsverity`.

The ioctls supported by btrfs:

* `FS_IOC_ENABLE_VERITY <https://www.kernel.org/doc/html/latest/filesystems/fsverity.html#fs-ioc-enable-verity>`__
* `FS_IOC_MEASURE_VERITY <https://www.kernel.org/doc/html/latest/filesystems/fsverity.html#fs-ioc-measure-verity>`__
* `FS_IOC_READ_VERITY_METADATA <https://www.kernel.org/doc/html/latest/filesystems/fsverity.html#fs-ioc-read-verity-metadata>`__

See also:
https://www.kernel.org/doc/html/latest/filesystems/fsverity.html

.. _interop-idmapped:

idmapped mounts
---------------

Btrfs supports mount with UID/GID mapped according to another namespace since
version 5.15.

See also:
https://lwn.net/Articles/837566/

Device mapper, MD-RAID
----------------------

Btrfs works on top of device mapper (DM) and linux multi-device software RAID
(MD-RAID) block devices transparently without any need for additional
configuration. There is no integration so device failures are not handled
automatically in any way, must be resolved either in btrfs or on the DM/MD
layer.

The functionality of DM/MD may duplicate the one provided by btrfs (like
mirroring), it's possible to use it that way but it's probably wasteful and may
degrade performance. Creating a filesystem on top of the multiplexed device is
likely the desired way.

overlayfs
---------

Since kernel 4.15 the btrfs filesystem can be used as *lower* filesystem
for overlayfs (supporting the rename modes of *exchange* and *whiteout*).

SELinux
-------

The SELinux labels can be defined via mount option *context* and since
version 6.8 there are no limitations. Until that version some cases
were not supported.

.. _interop-io-uring:

io_uring
--------

Basic file operations are supported. Since 6.12 the *Encoded IO read/write ioctls* the
*read* is supported and write since 6.13.

.. _interop-nfs:

NFS
---

NFS is supported. When exporting a subvolume it is recommended to use the
*fsid* option with a unique id in case the server needs to restart. This
is recommended namely when clients use the mount option *hard*.

Example of server side export:

.. code-block:: none

   /mnt/data/subvolume1      192.168.1.2/24(fsid=12345,rw,sync)
   /mnt/data/subvolume2      192.168.1.2/24(fsid=23456,rw,sync)

See also :manref:`exports(5)`.

.. _interop-samba:

Samba
-----

The Samba VFS module *btrfs* adds support for compression, snapshots and server-side
copy (backed by reflink/clone range ioctl).

See also:
https://wiki.samba.org/index.php/Server-Side_Copy#Btrfs_Enhanced_Server-Side_Copy_Offload