Btrfs subvolumes support #9
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
applications/manjaro-architect#9
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I wish to port btrfs subvolume functions from previous manjaro cli-installer, so that installation to btrfs subvolumes can be done without manual mounting.
I you no one else volunteered I could give it a try.
Thanks! Greatly appreciated!
I poached the btrfs subvolume functions from the old cli-installer https://github.com/Chrysostomus/manjaro-architect/blob/master/bin/btrfs-subvol-functions.in
They might rely on some other stuff that has not yet been ported though.
I must conclude I am a lousy shell scripter :) But you manage all right :)
This might take me some time cause I can't get the my brain about the logic.
C#, javascript, Python was a lot easier to grasp than shell :)
It's okay. The schedule for this feature is "before summer"
The logic I would think that we need is
No idea how to handle raid options, but I find it a lesser priority
On Tue, 2017-02-21 at 03:56 -0800, Chrysostomus wrote:
There is already som btrfs support - I just installed in a vm with
btrfs
Yes, I install half of the test systems on btrfs too. But if user wants to install on btrfs subvolumes to be able to take snapshots, he needs to create and mount them manually separate of the installer.
Idea would be to to integrate subvolume creation to existing btrfs functionality.
On Tue, 2017-02-21 at 04:28 -0800, Chrysostomus wrote:
I see. I have no knowledge of btrfs so I have familiarize myself with it.
But I find a lot of red flags on Arch wiie considering btrfs - so it seems it is not a better file system.
https://wiki.archlinux.org/index.php/Btrfs#File_system_creation
It seems risky to incorporate advanced features such as snapshots when so many red flags are up.
Subvolumes, snapshots and compression are stable features. Raid is too, except for raid5/6. The unstable ones are fsck, dedublication, quotas and raid5/6. Nothing in installer guides user to try unstable features.
And swap files cannot be used to.
Most gotchas of btrfs are already automatically handled handled by the installer. Incompatible settings are disabled from grub and fsck is removed from mkinitcpio.conf.
I continued your thoughts from
select_filesystem
creating btrfs takes a long time
display message instead of buttons
https://wiki.archlinux.org/index.php/Btrfs#Mounting_subvolumes
Simplify subvolume layouts by not using the toplevel(ID=5) as /.
Instead create a subvolume on the subvolume and use that as /
the flow
format partition with btrfs
use selected mount options
noatime
recovery
space_cache (default in kernel?)
most recommendations is not to use compression with /home
most recommendations is to use compression with /
but to achieve both it must be separate disks as mount options for the first mount takes precedence
mkdir -p /mnt/btrfs
mount /dev/sdX2 /btrfs
It would be sane - in case of average user - to create a default structure for system if user choose btrfs?
Just to complicate it - also the experienced user should be able to mess with the basics?
create subvolume
btrfs create subvolume /mnt/btrfs/system
btrfs create subvolume /mnt/btrfs/system/root
btrfs create subvolume /mnt/btrfs/system/home
ask for more subvolumes - if yes create
btrfs create subvolume /mnt/btrfs/user
create and subsequent volumes
ask for snapshot or subvolume
btrfs create subvolume /mnt/btrfs/user/new_vol1
btrfs create snapshot /mnt/btrfs/user/new_vol2
etc
mount system subvolumes
create install_root
mkdir -p /mnt/install_root
mount -t btrfs -o subvol=system/root /dev/sdxY /mnt/install_root
mkdir /mnt/install_root/boot[/efi]
mkdir /mnt/install_root/home
mount -t btrfs -o subvol=/system/home /dev/sdx/ /mnt/install_root/home
mount /dev/sdX1 /mnt/install_root/boot[/efi]
adding/removing subvolumes requires mount of the basic partition
using the subvolumes can be achieved without mounting the basic partition
a user is required to have knowledge about btrfs to benefit from it
are snapshots done automagically?
@Chrysostomus
I must give in - I cannot get the bigger picture - it is much too confusing for me with variables where I do not know where the value comes from and why.
This shell scripting takes a special brain which I do not have.
At least I tried - keep up the good work 😺 t
Thanks, I appreciate the effort!
I noticed now that the Acidburn0zzz branch has btrfs implemented. I'll take a look if we can import that...
I have been thinking about this. It feels too complicated to properly implement btrfs subvolumes in the current mount partitions phase, because the phase is split across several functions and the times I can work with this are few and far between.
I think it would be, for the time being, make a separate "mount btrfs subvolumes" menu item. It would be ran after basic partition mounting. It would
What do you guys think? @oberon2007 @papajoker ?
something like this:
Making progress with this after moving it within the root volume mounting action. At least automatic mode seems to work now.
Pushed now to the online repo. Automatic and manual modes are still a bit rudimentary, but they seem to work somewhat...