A montagem de um subvolume btrfs funciona recursivamente?

2

Com os seguintes subvolumes em um sistema de arquivos btrfs em / dev / sda3:

root
root/home

e a montagem a seguir:

/dev/sda3 on /

A pasta /home está no subvolume root ou no subvolume root/home ?

    
por Joshka 29.09.2013 / 10:06

1 resposta

2

The default subvolume

When you create a brand new BTRFS filesystem, the system not only creates the initial the root subvolume (numbered 0) but also tags it as being the default subvolume. When you ask the operating system to mount a subvolume contained in a BTRFS volume without specifying a subvolume number, it determines which of the existing subvolumes has been tagged as "default subvolume" and mounts it. If none of the exiting subvolumes has the tag "default subvolume" (e.g. because the default subvolume has been deleted), the mount command gives up with a rather cryptic message:

# mount /dev/loop0 /mnt
mount: No such file or directory

It is also possible to change at any time which subvolume contained in a BTRFS volume is considered the default volume. This is accomplished with btrfs subvolume set-default. The following tags the subvolume 261 as being the default:

# btrfs subvolume set-default 261 /mnt

After that operation, doing the following is exactly the same:

# mount /dev/loop0 /mnt
# mount -o subvolid=261 /dev/loop0 /mnt

De link

    
por 29.09.2013 / 11:24