View previous topic :: View next topic |
Author |
Message |
pavel.stratil Tux's lil' helper
Joined: 23 Oct 2005 Posts: 134
|
Posted: Tue Dec 29, 2015 1:41 pm Post subject: mounting btrfs subvols |
|
|
Hi all,
I'm fiddling with btrfs on a new system, so I set up a simple partition scheme
/dev/sda1 bios boot
/dev/sda2 ext4 (/boot)
/dev/sda3 swap
/dev/sda4 btrfs root
creating the root subvolume goes well with
Code: |
mkdir -p /mnt/{btrfs,gentoo}
mount -t btrfs -o defaults,noatime,compress=lzo,autodefrag /dev/sda4 /mnt/btrfs
btrfs subvolume create /mnt/btrfs/root
umount /mnt/btrfs
mount -t btrfs -o defaults,space_cache,noatime,compress=lzo,autodefrag,subvol=root /dev/sda4 /mnt/gentoo
|
Now, when I add a new subvolume with
Code: | btrfs subvol create /mnt/gentoo/home |
the /mnt/gentoo/home directory appears and when I mount the volume, the mount command fails
Code: |
mount -o defauts,space_cache,compress=lzo,subvol=home /dev/sda4 /mnt/gentoo/home
mount: mount(2) failed: No such file or directory
|
What am I missing? _________________ Senbonzakura |
|
Back to top |
|
|
py-ro Veteran
Joined: 24 Sep 2002 Posts: 1734 Location: Velbert
|
Posted: Tue Dec 29, 2015 4:03 pm Post subject: |
|
|
It is allready mounted. The "Directory" that appears is the subvolume. |
|
Back to top |
|
|
pavel.stratil Tux's lil' helper
Joined: 23 Oct 2005 Posts: 134
|
Posted: Tue Dec 29, 2015 4:18 pm Post subject: |
|
|
dang, but it didnt show up in /etc/mtab ... how comes? _________________ Senbonzakura |
|
Back to top |
|
|
py-ro Veteran
Joined: 24 Sep 2002 Posts: 1734 Location: Velbert
|
Posted: Tue Dec 29, 2015 4:24 pm Post subject: |
|
|
Because it isn't "mounted", that is how btrfs works, if you mount a volume every subvolume beneath it is visible within it.
That is why you probably want to take a look at this guide, for a better layout:
https://btrfs.wiki.kernel.org/index.php/SysadminGuide
TL;DR
Use the FS root as container, make subs beneath that and mount them like normal partition. Use the root of btrfs for snapshot management.
Bye
Py |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|