Re: Dual Root setup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



El dom, 05-03-2023 a las 18:11 -0500, Genes Lists escribió:
> Do you know if it would work to use separate /boot partitions, as I 
> mention above, (each XBOOTLDR) but raid-1 them together with btrfs?
> I imagine this would be fine, but have not tested to confirm.

To tell you the truth, since ESP partitions exist, I have never used
another partition as boot, so I can't really contribute with my
experience here. However, the theory is that it should work.

> I have updated the notes which now shows the original way but also
> the 
> approach suggested by Oscar (thank you) - this is a superior method
> but 
> bit more painful for existing installs.

Yes, of course, because you have to repartition if you don't have the
system set up. The good thing is that with btrfs you can do all the
work on one disk and then just add the second one as raid1.

You have one btrfs partition/disk:
$ sudo btrfs filesystem show
  Label: none  uuid: 14736aed-faa3-4f03-819e-24369e9bb34f
           Total devices 1 FS bytes used 384.00KiB
           devid    1 size 20.00GiB used 2.02GiB path /dev/sdb

Add second partition/disk:
$ sudo btrfs device add -f /dev/sdc /mnt/data
$ sudo btrfs filesystem show
  Label: none  uuid: 14736aed-faa3-4f03-819e-24369e9bb34f
          Total devices 2 FS bytes used 384.00KiB
          devid    1 size 20.00GiB used 2.02GiB path /dev/sdb
          devid    2 size 20.00GiB used 0.00B path /dev/sdc

Convert into raid1:
$ sudo btrfs balance start -dconvert=raid1 -mconvert=raid1 /mnt/data
  Done, had to relocate 4 out of 4 chunks

> This way has <esp> on each disk along with btrfs raid1 for the rest 
> basically.
> 
> I have a working example doing this and its pretty nice!
> Yes I had to repartition and reformat 2 disks for my tests but
> without 
> actually doing it, its all just theory :)
> 
> This had one little puzzling wrinkle that needed to be solved to make
> this viable. And it turned out to be quite tricky. The challenge is
> to 
> identify which of the 2 <esp> was actually booted,  so the correct
> one 
> can be bind mounted on to /boot.
> 
> Now that I solved that little puzzle, the rest is pretty
> straightforward.
> 
> I have a little more coding to do and will make the code available
> soon. 
> I still have some work to do on syncing the <esp> but now we know
> which 
> esp is the 'other' one and which is the 'current' one - that work can
> proceed nicely.

Interesting, I'll take a look at it when you upload the code.

> The notes are updated -thanks for the ideas and feedback - much 
> appreciated (esp. Oscar)

You are welcome!

-- 
Óscar García Amor | ogarcia at moire.org | http://ogarcia.me

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux