Btrfs

De Wiki Seb35
Révision datée du 2 février 2019 à 18:52 par Seb35 (discussion | contributions) (begin of notes about btrfs)
(diff) ← Version précédente | Voir la version actuelle (diff) | Version suivante → (diff)
Aller à la navigation Aller à la recherche

I tried to have a root filesystem into btrfs for a Gandi server, unsuccessfully for now. Here are my steps if it can be useful to others.

WARNING: this is EXPERIMENTAL and could cause DATA LOSS.

Create the server

On https://v4.gandi.net, create a new server [1] with e.g. 1 proc, 256 Mio RAM, 1 system disk, Ubuntu 18.04 LTS.

Update the packages:

apt update && apt upgrade -y

On https://v4.gandi.net, stop the server, open the page about the system disk, clone the system disk with another name, and attach this cloned disk to the server, start the server.

Convert to btrfs

The package btrfs-progs currently does not contain btrfs-convert (this Debian bug) because the risk of data loss is too great. Then we need to compile btrfs-progs.

Install dependencies:

apt install gcc g++ libblkid-dev liblzo2-dev zlib1g-dev libzstd-dev asciidoc xmlto libattr1-dev libext2fs-dev pkg-config python3-dev python3-setuptools

Download and compile btrfs-progs (changelog, releases):

wget https://mirrors.edge.kernel.org/pub/linux/kernel/people/kdave/btrfs-progs/btrfs-progs-v4.20.1.tar.gz
tar xfz btrfs-progs-v4.20.1.tar.gz
cd btrfs-progs-v4.20.1
./configure --with-convert=ext2
make
make install
cd ..
rm -rf btrfs-progs-v4.20.1 btrfs-progs-v4.20.1.tar.gz