Bcachefs

From NixOS Wiki
Revision as of 09:36, 14 May 2023 by imported>Onny (Add encryption example)

Bcachefs is a next-generation CoW filesystem that aims to provide features from Btrfs and ZFS with a cleaner codebase, more stability, greater speed and a GPL-compatible license. It is built upon Bcache and is mainly developed by Kent Overstreet.

Installation

To enable filesystem support and availability of user-space utils, add following line to the system configuration

/etc/nixos/configuration.nix
boot.supportedFilesystems = [ "bcachefs" ];

Usage

Format and mount a signle device

# bcachefs format /dev/sda
# mount -t bcachefs /dev/sda /mnt

Format drive with encryption enabled, unlock and mount it afterwards

# bcachefs format --encrypt /dev/sda
# bcachefs unlock /dev/sda
# mount -t bcachefs /dev/sda /mnt