Btrfs: Difference between revisions
Adamthiede (talk | contribs) (service file is now in btrfs-progs package) |
m (ABUMARD) |
||
Line 14: | Line 14: | ||
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 "btrfs" is in the list of features; then (again as root) run the {{ic|mkinitfs}} command. | 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 "btrfs" is in the list of features; then (again as root) run the {{ic|mkinitfs}} command. | ||
== | {| | ||
# |+ نص التسمية التوضيحية | |||
# |- | |||
# ! نص العنوان | |||
{{cat|/etc/fstab|<nowiki>... | # |- | ||
UUID=abcdef-0055-4958-990f-1413ed1186ec | # | مثال | ||
</nowiki>}} | # |} | ||
# = | |||
<nowiki>Insert non-formatted text here</nowiki>|} | |||
== تركيب وحدة تخزين == لتركيب وحدة تخزين عند التمهيد، أضف إدخالا جديدا إلى fstab الخاص بك: {{cat|/etc/fstab|<nowiki>... UUID=abcdef-0055-4958-990f-1413ed1186ec /var/data btrfs defaults,nofail,subvol=@ 0 0 </nowiki>}} إذا كنت تستخدم خيارات تركيب أكثر تحديدا مثل على سبيل المثال: {{cat|/etc/fstab|<nowiki>... UUID=005f5994-f51c-4360-8c9b-589fa59ea6fc /mnt/hddext btrfs nofail,rw,noatime,commit=64,nossd,autodefrag,compress=zstd:10 0 2 </nowiki>}} لا تنس تثبيت تبعيات إضافية. إذا قمت بتمكين ضغط الطيران، فأنت بحاجة إلى تثبيت zstd: {{cmd|# apk add {{pkg|zstd}}}} يمكن العثور على مزيد من المعلومات حول التركيب في الرسمي [https://btrfs.readthedocs.io Btrfs wiki] | |||
{{cat|/etc/fstab|<nowiki>... | |||
UUID=005f5994-f51c-4360-8c9b-589fa59ea6fc | |||
</nowiki>}} | |||
{{cmd|# apk add {{pkg|zstd}}}} | |||
== Troubleshooting == | == Troubleshooting == |
Revision as of 15:55, 25 December 2024
Documentation how to use Btrfs on Alpine Linux.
Install
Installing Btrfs is relatively straight forward. Install the package and tell Alpine to load the module on startup:
# apk add btrfs-progs # echo btrfs >> /etc/modules
To load the module immediately, you can use the following command:
# modprobe btrfs
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) /etc/mkinitfs/mkinitfs.conf and ensure that "btrfs" is in the list of features; then (again as root) run the mkinitfs
command.
- |+ نص التسمية التوضيحية
- |-
- ! نص العنوان
- |-
- | مثال
- |}
- =
Contents of /etc/fstab
Contents of /etc/fstab
# apk add zstd
يمكن العثور على مزيد من المعلومات حول التركيب في الرسمي Btrfs wikiTroubleshooting
Mount failed
If you try mounting a Btrfs volume via your /etc/fstab and it doesn't show up, it could be because Btrfs does not know about the drives during boot.
To work around this, you can enable the OpenRC service from the btrfs-progs package:
# rc-update add btrfs-scan boot
The volume should mount correctly after a reboot.
See also
- BTRFS on Alpine Linux
- Using BTRFS on Alpine Linux
- Can't mount BTRFS volume using fstab
- ArchWiki
- Gentoo Wiki
- Install Alpine on a btrfs filesystem with refind as boot manager