View Full Version : Disk layout on a laptop being installed on btrfs only.

January 14th, 2014, 01:41 AM

I am planning on installng 13.10 on btrfs only on one of my laptops. Should I partition the disk before I start with one large btrfs parition, or will the installer do it optimally if I let it use the whole unformatted disk? It says here:


In Ubuntu 11.04 and later, the installer sets up btrfs with a specific layout:
The default subvolume to mount is always the top of the btrfs tree (subvolid=5).
Subvolumes are created below the top of the btrfs tree as needed, e.g. for / and /home, it creates subvolumes named @ and @home. This means that specific options are needed in order to mount the subvolumes, instead of the default btrfs tree top:

The @ subvolume is mounted to / using the kernel boot option rootflags=subvol=@

The @home subvolume (if it is used), is mounted via the mount option subvol=@home in fstab.

Is this what happens if I let the Ubuntu installer run autmatically on one large btrfs parition on the disk, or do I have to set the layout manually? I want to take advantage of the cool features in btrfs one of them being easy resize so I would like to get this correct and undertand how it works. Any advice in this regard would be apprecialted.

January 15th, 2014, 05:16 PM
I know btrfs has some new features, but not all have been worked out yet.

Linux 3.13 Kernel HDD File-System Benchmarks
10-Way Linux File-System Comparison On Linux13.10
BTRFS, not ready for prime time
Linux 3.11 File-System Performance: EXT4, Btrfs, XFS, F2FS

January 15th, 2014, 06:35 PM
I would not confuse Btrfs volumes and sub-volumes with partitions which are sometimes called volumes in Linux. Please note this.

When installing Ubuntu in one large btrfs-Partition without an extra boot-partition, take care to keep about 1 Mib space free at the beginning of the disk. This is possible using the partition manager in the Ubuntu installer. When there is not this space, the installer fails at the end when trying to install Grub!

I would go so far as to say that without that minimum of unallocated free space it is impossible to use the Ubuntu installer to install Ubuntu onto a Btrfs partition. I know I tried it many times when 13.10 was under development. We get an error message that Grub failed to install. But when I created the free space at the beginning of the hard disk I was able to install Ubuntu 13.10 on a partition set to be used as btrfs.

You should also be aware that as yet we do not have a GUI snapshot manager. It all has to be done using the command line. In the software centre is a tool called apt-btrfs-snapshot. This will automatically create a snapshot every time we run the Update Manager (apt-get update) and upgrade (apt-get upgrade). For some reason the tool creates four snapshots every time. With apt-btrfs-snapshot installed then we get an additional option to the Recovery menu. Once we put the file system into read/write mode (such as running the Network option or using a command) then we will get "apt-snapshot - revert to old snapshot & reboot" as a recovery menu option. This can be very useful.