Posts

Showing posts from February, 2021

Convert existing ext4 filesystem to btrfs

Image
What I want to achieve is getting btrfs features like snapshots, compression and deduplication The problem is, my system already running and containing data, filesystem is ext4 under linux lvm. So I will convert existing ext4 filesystem to btrfs, keeping lvm partition, and only /home will be converted   Converting to btrfs in-place LVM partition: NAME                      MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT sda                         8:0    0 465.8G  0 disk   ├─sda1                      8:1    0   123M  0 part /boot/efi ├─sda2                      8:2    0 390.6G  0 part   │ ├─VGVG-Fedora--30--root 253:0    0    60G  0 lvm  / │ ├─ VGVG -Archive          253:1    0  25.6G  0 lvm    │ └─ VGVG -Home3rd          253:2    0   200G  0 lvm  /home First, go to rescue mode and unmount /home , or boot into single-user mode # systemctl rescue # umount /home Fix filesystem issue: # fsck.ext4  -fv /dev/mapper/VGVG-Home3rd When filesystem is clean for error, now convert to btrfs: # btrfs-convert /