<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Adamthiede</id>
	<title>Alpine Linux - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Adamthiede"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Adamthiede"/>
	<updated>2026-05-10T11:02:42Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Btrfs&amp;diff=28349</id>
		<title>Btrfs</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Btrfs&amp;diff=28349"/>
		<updated>2024-12-14T16:08:27Z</updated>

		<summary type="html">&lt;p&gt;Adamthiede: service file is now in btrfs-progs package&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Documentation how to use Btrfs on Alpine Linux.&lt;br /&gt;
&lt;br /&gt;
== Install ==&lt;br /&gt;
&lt;br /&gt;
Installing [https://wikipedia.org/wiki/Btrfs Btrfs] is relatively straight forward. Install the package and tell Alpine to load the module on startup:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|# apk add {{pkg|btrfs-progs}}&lt;br /&gt;
&amp;lt;nowiki&amp;gt;# echo btrfs &amp;gt;&amp;gt; /etc/modules&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
To load the module immediately, you can use the following command:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|# modprobe btrfs}}&lt;br /&gt;
&lt;br /&gt;
If using btrfs as your root filesystem, you should ensure that the initramfs is generated with the btrfs module, otherwise your system may fail to boot. To do so edit (as root) {{path|/etc/mkinitfs/mkinitfs.conf}} and ensure that &amp;quot;btrfs&amp;quot; is in the list of features; then (again as root) run the {{ic|mkinitfs}} command.&lt;br /&gt;
&lt;br /&gt;
== Mounting a volume ==&lt;br /&gt;
&lt;br /&gt;
To mount a volume on boot, add a new entry to your fstab:&lt;br /&gt;
&lt;br /&gt;
{{cat|/etc/fstab|&amp;lt;nowiki&amp;gt;...&lt;br /&gt;
UUID=abcdef-0055-4958-990f-1413ed1186ec  /var/data  btrfs   defaults,nofail,subvol=@  0  0&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
If you use more specific mounting options like for example:&lt;br /&gt;
&lt;br /&gt;
{{cat|/etc/fstab|&amp;lt;nowiki&amp;gt;...&lt;br /&gt;
UUID=005f5994-f51c-4360-8c9b-589fa59ea6fc  /mnt/hddext  btrfs  nofail,rw,noatime,commit=64,nossd,autodefrag,compress=zstd:10  0 2&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
do not forget to install additional dependencies. If you enabled on the fly compression you need to install zstd:&lt;br /&gt;
&lt;br /&gt;
{{cmd|# apk add {{pkg|zstd}}}}&lt;br /&gt;
&lt;br /&gt;
More information about mounting can be found in the official [https://btrfs.readthedocs.io Btrfs wiki]&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== Mount failed ===&lt;br /&gt;
&lt;br /&gt;
If you try mounting a Btrfs volume via your {{path|/etc/fstab}} and it doesn&#039;t show up, it could be because Btrfs does not know about the drives during boot.&lt;br /&gt;
&lt;br /&gt;
To work around this, you can enable the OpenRC service from the [https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/main/btrfs-progs/btrfs-scan.initd btrfs-progs] package:&lt;br /&gt;
&lt;br /&gt;
{{Cmd|&amp;lt;nowiki&amp;gt;# rc-update add btrfs-scan boot&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
The volume should mount correctly after a reboot.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [https://garrit.xyz/posts/2021-12-31-btrfs-on-alpine BTRFS on Alpine Linux]&lt;br /&gt;
* [https://web.archive.org/web/20221127043947/https://nparsons.uk/blog/using-btrfs-on-alpine-linux Using BTRFS on Alpine Linux]&lt;br /&gt;
* [https://gitlab.alpinelinux.org/alpine/aports/-/issues/9539 Can&#039;t mount BTRFS volume using fstab]&lt;br /&gt;
* [https://wiki.archlinux.org/title/Btrfs ArchWiki]&lt;br /&gt;
* [https://wiki.gentoo.org/wiki/Btrfs Gentoo Wiki]&lt;br /&gt;
* [[Install Alpine on a btrfs filesystem with refind as boot manager]]&lt;br /&gt;
[[Category:Filesystems]]&lt;/div&gt;</summary>
		<author><name>Adamthiede</name></author>
	</entry>
</feed>