I have Fedora installed on my laptop, but I installed \home with ext4. I would like to know if there is any way to convert, or just format \home to BTRFS and later allocate it as \home again. If yes, how do I do it?
There used to be a command to do that. I think I would recommend copying the files instead though. You’ll get the benefit of a little file defragmentation by copying the files plus you’ll have a backup in case things go wrong.
Yes, I’ll backup all my files. Put would like to know how to convert it or allocate like Home again after format like btrfs.
Is your root filesystem (/
) already Btrfs? If so, you should be able to “add” the partition that currently holds your home filesystem to the existing Btrfs filesystem. Be sure you have good backups first though. Adding another partition to a Btrfs filesystem will destroy all the data on the partition.
Edit: If you add the partition that currently contains your /home
filesystem to your root (/
) filesystem, then you’ll also need to remove the line containing /home
from /etc/fstab
. To restore your home directories, you would run something like cp -a /mnt/* /home
(assuming your backed-up home directories were under /mnt
). You’ll have to do everything as the root user of course, since normal users will have all their home directories stored under /home
. And make sure /home
is unmounted before you run the Btrfs command to reformat that partition.
You mean /home, not \home, beware. The command btrfs-convert does that. Or gparted.
BTRFS has a tool called btrfs-convert, which helps with file system conversion.
https://btrfs.readthedocs.io/en/latest/btrfs-convert.html