Bcachefs: Difference between revisions

From NixOS Wiki
imported>Onny
Add usage section
imported>Onny
Add encryption example
Line 15: Line 15:
<syntaxhighlight lang="console">
<syntaxhighlight lang="console">
# bcachefs format /dev/sda
# bcachefs format /dev/sda
# mount -t bcachefs /dev/sda /mnt
</syntaxhighlight>
Format drive with encryption enabled, unlock and mount it afterwards
<syntaxhighlight lang="console">
# bcachefs format --encrypt /dev/sda
# bcachefs unlock /dev/sda
# mount -t bcachefs /dev/sda /mnt
# mount -t bcachefs /dev/sda /mnt
</syntaxhighlight>
</syntaxhighlight>

Revision as of 09:36, 14 May 2023

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