User:Maffblaster/Drafts/bcachefs

From Gentoo Wiki
Jump to: navigation, search

bcachefs is a next generation, robust, high performance Linux filesystem supporting CoW, device tiering, compression, and encryption.

Presently bcachefs is not ready to be distributed in the upstream Linux kernel. Those who are interested in using bcachefs must patch the Linux kernel in order to add support.

Installation

Prerequisites

Obtain the patched kernels sources.

Right now it is easier for bcachefs' developer Ken Overstreet to maintain kernel sources with the bcachefs already applied.

Move to the kernel sources directory on Gentoo, then clone the sources (dev-vcs/git is required):

root #cd /usr/src
root #git clone --depth=1 https://evilpiepirate.org/git/bcachefs.git bcachefs.git

Build the kernel

The bcachefs kernel sources will need to be built. With the exceptions of defining any new kernel features and enabling CONFIG_BCACHE_FS, the kernel can be built using the currently running kernel's configuration:

root #zcat /proc/config.gz > /usr/src/bcachefs.git/.config
root #make oldconfig

Enable CONFIG_BCACHE_FS:

root #make menuconfig

Build (and install) the kernel, then update the bootloader (GRUB2 presumed):

root #make && make install
root #grub-mkconfig -o /boot/grub/grub.cfg

Emerge

There are presently no USE flags for the sys-fs/bcache-tools package, so simply emerge the package:

root #emerge --ask sys-fs/bcache-tools
Note
This is for bcache-tools package which is associated with hybrid hard drives. This package has been requested with a proposed ebuild via bug #657120.