Why the @ in Btrfs subvolume names?

It's just a convention. The kernel btrfs wiki's section on subvolumes doesn't mention @ at all. This discussion on the debian-boot mailing list is informative:

The convention proposed in the upstream btrfs sysadmin guide is identical to the way Fedora names its subvolumes, and I believe it was written by a Fedora developer. I think the primary rational to diverge from it is to signify that what seem to be directories are not actually directories, but subvolumes. As I mentioned before the flexibility this FS supports is astounding, and I fear could be a nightmare to support without near self-evident default conventions. I guess I'll just pick something, and it someone doesn't like it then it can be changed? I was hoping any strong opinions would come out in this discussion! :-)

This is a convention that OpenSUSE and Debian apparently picked up from Ubuntu, and the idea of using all those subvolumes is attributed by Colin Watson to Roger Leigh. That was in 2010, and in 2011, we already have subvolumes named with @, but I can't find online discussions about this during that period. I suppose only Colin can answer this now.


The @ is the 'true' root volume. It has a volume ID of 0, not listed when you do btrfs subvolume list /. You use this volume to create/delete subvolumes.

mount -o subvolid=0 UUID=insert-the-uuid-here /mnt

You must mount this hidden root somewhere else to access the subvolumes. You can get the UUID in /etc/fstab, it is the one repeated for all the root subvols.

# ls /mnt
  @

The /mnt listing shows an @ directory, under this is the normal /etc, /var, etc

btrfs subvolume delete /mnt/@/whatever

or

btrfs subvolume create /mnt/@/whatever

If creating a subvolume, add:

UUID=insert-the-uuid-here /whatever btrfs subvol=@/home 0 0 

to /etc/fstab.

Now, mkdir /whatever, then you can mount it: mount /whatever.

If deleting a subvolume, be sure to remove it in fstab and delete the mount point.