Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: [EN] [solved]Siduction Install on btrfs subvolume  (Read 15159 times)

timc

  • Guest
[EN] Re: [solved]Siduction Install on btrfs subvolume
« Reply #15 on: 2014/01/13, 14:24:03 »
@terroreek, I am impressed. You had something you wanted to get done, there were no good examples of how to do it, but you made it work. Kudos!

Tim

Offline terroreek

  • User
  • Posts: 202
Re: [solved]Siduction Install on btrfs subvolume
« Reply #16 on: 2014/01/13, 15:02:13 »
Hi dibl,

No worries, in my tutorial I did the steps in a vm so thats why the disk is so small.  However, again I don't think I am an expert on btrfs, but from my understanding of it, the snapshot won't take another 4GB, at least right away.  What it does is say ok this is what the snapshot should look like.  An oversimplified answer is as changes are made to the subvolume the snapshot essentially holds onto the original blocks that were changed.  Realistically its actually tracking changes to both subvolumes.

So using the example earlier, where we snapshot prior to a d-u, lets say we do that an the only thing was the kernel got updated, then what should happen is the snapshot then only retains the original kernel prior to the d-u.  So the snapshot will actually only hold that original kernel, the rest of the data is the same so it only holds one copy.  Again I am just oversimplifying it, what actually happens is only the changed blocks get retained, imagine if the old kernel and the new kernel are 99% the same, that snapshot only actually holds 1% of that change. 

The only time where the snapshot will take up the same amount of space as its parent is when the parent and subvolume are 100% different at the block level.  Now that being said snapshots should not be used as a method of backing up data.

Hi Tim

No worries like I said you did nudge me in the right direction, this is an ugly way to do it, if the installer supported subvolumes we wouldn't have to clean up the root subvolume nor mess with grub.  Looking into what you wanted to however, and it looks like the information might have been not so wrong.  As I was going through the grub update scripts the problem maybe that I am not 100% sure if the method grub uses to find other os's if it will probe into other subvoumes outside the one its updating from.  I guess the best way to find out is try it out in vm. 

-Tareeq

Offline GoinEasy9

  • User
  • Posts: 566
Re: [solved]Siduction Install on btrfs subvolume
« Reply #17 on: 2014/01/14, 05:03:43 »
I just wanted to say thanks, and, as dibl said, "It's a great tutorial".
Linux Counter number 348347

nighcrawler

  • Guest
Re: [solved]Siduction Install on btrfs subvolume
« Reply #18 on: 2015/04/29, 13:58:16 »
@terroreek

Hello there, i read your post about how to setup the hdd for btrfs, and apply it to my setup. But how did you set the sda3 "/" as bootable in your config? In my netinstall deb8 it is not possible to set sda3 as bootable...

all steps until:
sudo touch /mnt/@root/snapshot-01-12-2014

works fine so far. But i was not able to update-grub, because my terminal has only grub-installer option....
...so i do grub-installer -boot-directory=/mnt/@root/boot /dev/sda and complete the installation of my debian. After reboot i was not in the subvolume, because ls show me / without my sanity file....



Regards nightcrawler
« Last Edit: 2015/04/29, 15:58:52 by nighcrawler »

Offline terroreek

  • User
  • Posts: 202
Re: [solved]Siduction Install on btrfs subvolume
« Reply #19 on: 2015/04/30, 02:35:39 »
@terroreek

Hello there, i read your post about how to setup the hdd for btrfs, and apply it to my setup. But how did you set the sda3 "/" as bootable in your config? In my netinstall deb8 it is not possible to set sda3 as bootable...

all steps until:
sudo touch /mnt/@root/snapshot-01-12-2014

works fine so far. But i was not able to update-grub, because my terminal has only grub-installer option....
...so i do grub-installer -boot-directory=/mnt/@root/boot /dev/sda and complete the installation of my debian. After reboot i was not in the subvolume, because ls show me / without my sanity file....



Regards nightcrawler

Ok just as a fyi if you are using uefi, /boot can't be in a subvolume.  I've installed siduction onto a uefi system, where the fat32 /boot/efi folder is mounted on /boot thats an ext4 volume, you can do btrfs but just not in a subvolume. 

Ok the other thing is in your grub, config, you need to make sure you are passing rootflags=subvol=yoursubvolumename to the kernel.  If you don't you wont actually be in your root subvolume.

linux    /@root/boot/vmlinuz-3.12-6.towo-siduction-amd64 root=UUID=244bab70-ce04-4b50-b546-6b55cc72e15e ro rootflags=subvol=@root quiet

The other thing I would like to point out is if your using jessie, its actually easier to install with subvolumes because prior to clicking install, your can remount /mnt/target to the a subvolume, if I remember correctly. 
« Last Edit: 2015/04/30, 02:40:22 by terroreek »