Btrfs
From wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
Warning: | Btrfs is still a new filesystem. While many (including myself) find it stable enough for everyday use, don't use it for critical services and be prepared to use you backups. See status page on Btrfs wiki for up-to-date info. |
Install
To create and manipulate Btrfs volumes, you will need to install
$ sudo apt install btrfs-progs
Create a filesystem
mkfs
Single Disk
$ sudo mkfs.btrfs /dev/sdb
Raid 1
$ sudo mkfs.btrfs -mraid1 -draid1 /dev/sdb /dev/sdc
Raid 0
$ sudo mkfs.btrfs -mraid1 -draid0 /dev/sdb /dev/sdc
Mount
$ sudo mount /dev/sdb /mnt
When mounting raid disks, only one of the disks need to be specified in the command. Btrfs will find the other one automatically.
Subvolumes
To create a subvolume just use the command
$ sudo btrfs subvolume create /<path>
To create a snapshot use
$ sudo btrfs subvolume snapshot /<source-path> /<destination-path>