You are not logged in.

#1 2011-01-25 18:52:57

broken pipe
Member
Registered: 2010-12-10
Posts: 238

[solved] btrfs subvolume confusions

hi all!
i would like to do a fresh install and use btrfs as my primary filesystem.
the partition layout should look like this:

/dev/sda2 - 100mb /boot (ext4, because of grub2 and win7)
/dev/sda3 - 4000mb swap
/dev/sda4 - rest of free space (btrfs)

i already tried this partition layout in virtualbox using the wiki (https://wiki.archlinux.org/index.php/In … filesystem) but i got stuck because this subvolume and snapshots management confused me a lot. i don't really need snapshots for system rollbacks because important files are synced to an external storage.

the only thing i wanted to achieve is to create several subvolumes of /dev/sda3 for /var, /tmp, /home, etc. ...

i know how to format the partition to btrfs but not how to create a subvolume nor how to mount it as mountpoint for /home or edit /etc/fstab for automounting subvolumes at boot.

i'm happy for every helping hand :>

Last edited by broken pipe (2011-01-25 21:29:23)

Offline

#2 2011-01-25 19:44:45

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [solved] btrfs subvolume confusions

Offline

#3 2011-01-25 20:49:08

sctincman
Member
From: CO (USA)
Registered: 2009-04-08
Posts: 85

Re: [solved] btrfs subvolume confusions

You can create new subvolumes using the btrfs command.

# btrfs subvolume create /path/to/subvolume

eg. if your have your root btrfs filesystem mounted to /mnt, then "/mnt/home" etc...

# btrfs subvolume create /mnt/home
# btrfs subvolume create /mnt/var
...

If the subvolumes are contained in something that is already mounted, there is no need to mount them--the subvolumes are navigable as simple directories (with btrfs-progs installed). So having an entry for "/" in fstab should take care of everything under it.

But yeah, if the need be, the way to mount subvolumes is to pass "subvol=name" into the mount options.

Edit: The btrfs wiki is full of good info on btrfs, such as formatting, mounting, how it works, etc...  https://btrfs.wiki.kernel.org/index.php/Main_Page

Last edited by sctincman (2011-01-25 20:59:19)

Offline

#4 2011-01-25 21:29:08

broken pipe
Member
Registered: 2010-12-10
Posts: 238

Re: [solved] btrfs subvolume confusions

wow, easier than i thought!!! i tested it in virtualbox first and it works, thx a lot! i got several folder permission errors during the install (subvolume "folder" is 700) but i think they were automatically solved by installing the packages!?

Offline

#5 2011-01-25 22:12:34

sctincman
Member
From: CO (USA)
Registered: 2009-04-08
Posts: 85

Re: [solved] btrfs subvolume confusions

Oh yes, pacman complaining about "Filesystem permission for xyz is 0700, package has 07xx" ?

I'm pretty sure it changes the permissions for you, but if you do it again, maybe hit the new subvolumes with a "chmod 0755" first.

Offline

Board footer

Powered by FluxBB