Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
mounting btrfs subvols
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
pavel.stratil
Tux's lil' helper
Tux's lil' helper


Joined: 23 Oct 2005
Posts: 134

PostPosted: Tue Dec 29, 2015 1:41 pm    Post subject: mounting btrfs subvols Reply with quote

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
View user's profile Send private message
py-ro
Veteran
Veteran


Joined: 24 Sep 2002
Posts: 1734
Location: Velbert

PostPosted: Tue Dec 29, 2015 4:03 pm    Post subject: Reply with quote

It is allready mounted. The "Directory" that appears is the subvolume.
Back to top
View user's profile Send private message
pavel.stratil
Tux's lil' helper
Tux's lil' helper


Joined: 23 Oct 2005
Posts: 134

PostPosted: Tue Dec 29, 2015 4:18 pm    Post subject: Reply with quote

dang, but it didnt show up in /etc/mtab ... how comes?
_________________
Senbonzakura
Back to top
View user's profile Send private message
py-ro
Veteran
Veteran


Joined: 24 Sep 2002
Posts: 1734
Location: Velbert

PostPosted: Tue Dec 29, 2015 4:24 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
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