Forum

Full Version: [ToDo] Wiki Updates
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
@Killerbee

oh, now you got me. maybe because subvolume "root" is storing really "/" and subvolume "home" is keeping "/home".
http://www.linfo.org/home.html

"It seems that "root" doesn't means "/" but "/" minus "/home"".
^ elaborate please. Wink
(3rd Apr, 2014 09:33 PM)mk01 Wrote: [ -> ]@Killerbee

oh, now you got me. maybe because subvolume "root" is storing really "/" and subvolume "home" is keeping "/home".
http://www.linfo.org/home.html

"It seems that "root" doesn't means "/" but "/" minus "/home"".
^ elaborate please. Wink

@mk01
The big question here is: is "/home" part of "/" when used on one single partition?
According to xbian's btrfs-auto-snapshot configuration not Big Grin
According to me (average user) ...........

KB
btrfs is a bit hard to wrap you head around, particularly for someone who knows a bit about traditional filesystems. it is kind of like LVM in a sense, but not. both '/' and '/home' are considered subvolumes, somewhat as if you setup your traditional linux with seperate partitions for '/' and '/home' (or '/boot', or '/var'). honestly i don't completely understand it myself yet, but the more i learn about it the more sense it makes. Cool
Quote:somewhat as if you setup your traditional linux with seperate partitions for '/' and '/home' (or '/boot', or '/var')
That's just what it is.

The only difference is the definition of a subvolume. Traditionally a subvolume is a partition. I believe that BTRFS is like ZFS which interprets a subvolume (or zvol) as a volume on top of a storage device. That can be a file, harddrive, flash drive, network drive, or a raid combination with any of them. So in ZFS you can create a RAID array with files just as you can with harddrives. If doesn't matter much to the BTRFS or ZFS filesystem on top of it.

The biggest difference between BTRFS and ZFS with traditional filesystems is that they both combine a hardware layer with a filesystem layer. The hardware layer manages the actual subvolumes, raid levels etc. The filesystem on top of it adds features as cloning, snapshotting etc. So ZFS and BTRFS are not just filesystems, but a lot more.

So, if want to have the same with say EXT4 you need to combine it with either a hardware raid controller or with MDADM.
^^ what he said! Tongue
(4th Apr, 2014 12:00 AM)Killerbee Wrote: [ -> ]@mk01
The big question here is: is "/home" part of "/" when used on one single partition?
According to xbian's btrfs-auto-snapshot configuration not Big Grin
According to me ...........

imagine BTRFS as a two layer storage provider.
- one layer works with base storage providers (disk, partition, file ...) - working with just one partition or consolidating more of them while building ONE new flat virtual storage.
- second one is using this virtual storage - space - to allow us to create a filesystem. and because at layer one it took from us the possibility of "separation", sub-volumes were introduced what allows us to create literally a filesystem within a filesystem.

in praxis this means:
- you don't care and don't bother with the issues of repartitioning (shrinking, expanding, splitting, merging)
- adding new "free space" can be so easy as saying to btrfs "take /dev/sdd"
- creating new "separated" storage for another OS is so easy as creating new sub-volume with one command on existing filesystem
- removing the OS again is question of one command (removing the subvolume) while the before allocated space is immediately put back to "common" pool

all this is not quite visible (clear) to user with BTRFS as BTRFS is trading implementation simplicity for user space tools easy of use and variability. in ZFS it is all very fast and easy to understand.

and now to the "root" and "home" and "one partition" story (finally!)
so in XBian we have (mostly) one device (partition) in use. so we create a "common" btrfs partition on it. now you will ask how we separate userdata from system - we create two sub-volumes, one called root and second called home. on this level it is exactly as before with two partitions. for system boot "root" is used. then /home partition (home sub-volume) is mounted to /home. reformating "root" partition means deleting and creating "root" sub-volume. the same for "home".

but we will never face problem of root being initially too small or home being initially too small. they simply share the "common" space so during development we don't need to bother us or the user with discussions how we would like to do it or the user would like it.

another example of use would be - how to install second OS in parallel ? normally you need second storage (SD, USB disk, etc). or you need to bother with repartitioning - or worst case removing all and reinstalling with different setup. with XBian you simply use existing BTRFS "space" while creating new sub-volume.

BTRFS unfortunately displays sub-volumes as directories. this is why initially there is confusion. if you mount XBian filesystem you see just folders, root, home... but in deep BTRFS this are sub-volumes which are (to some extent) separated from each other. so Raspbian would be installed in three steps:
- creation of new subvolume root/raspbian
- deploying system to this subvolume
- booting from same storage (/dev/sda1 for instance) with different mount option (subvol=root/raspbian).

((there is much more to tell about anyhow - and what was told is very much simplified. some aspects have been not considered at all - to avoid confusion))

there is even a "bootloader" with XBian which allows you to choose what you want to boot (including separate kernels etc). once it will be at least "preliminary" tested and we have at least basic doc/wiki for the "traditional" functions, this should be introduced to the user/community.

I call it "it will come the day". Wink

(4th Apr, 2014 01:54 AM)dharmabm Wrote: [ -> ]btrfs is a bit hard to wrap you head around, particularly for someone who knows a bit about traditional filesystems. it is kind of like LVM in a sense, but not. both '/' and '/home' are considered subvolumes, somewhat as if you setup your traditional linux with seperate partitions for '/' and '/home' (or '/boot', or '/var'). honestly i don't completely understand it myself yet, but the more i learn about it the more sense it makes. Cool

if you have this level of knowledge or imagination then quite fast answer to help you is exactly how btrfs is doing it.

btrfs is one big metadata tree (so N-array tree). sub-volume is another N-array tree attached to the first one. or going to start - one big N-array tree with "volume" property (which is splitting the "one big" into more "bigs" - providing thus "separation" ) Smile
Pages: 1 2
Reference URL's