brent timothy saner via plug on 20 Jul 2020 01:27:05 -0700


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

Re: [PLUG] RAID-1 mdadm vs. Mobo H/W = moot


On 7/20/20 02:47, JP Vossen via plug wrote:
> On 7/16/20 9:21 PM, JP Vossen wrote:
(SNIP)
> 
> 
> Brent, very cool!  I will check out
> https://git.square-r00t.net/OpTools/tree/sys/BootSync soon, and also to
> see if it might work for my larger sync job.  I suspect not, since
> that's out of scope and cron+rsync is probably the way.  Still, neat stuff.

Hopefully it fulfills your need in this case. I'm personally using mdadm
RAID1 for my / and thus have two non-raided partitions as a primary and
fallback ESP as well[0]. I doubt that it'd help with your larger rsync
job as the script was written *explicitly* to sync grub ESPs between two
separate partitions (don't RAID the partitions, keep them as separate).

Let me know if you need any clarification or it doesn't work for you, etc.


[0] This may provide a more accurate illustration for you if you're
having a hard time visualizing:

$ findmnt -T /boot
TARGET SOURCE   FSTYPE OPTIONS
/      /dev/md1 ext4   rw,noatime


[bts@dawid ~]$ sudo mdadm --detail /dev/md1 | egrep -A3 -E '^\s*Number'
    Number   Major   Minor   RaidDevice State
       0       8       50        0      active sync   /dev/sdd2
       1       8       18        1      active sync   /dev/sdb2


$ efibootmgr | egrep -E '^BootOrder'
BootOrder: 0005,0000,0011,000F,0010,000B,000C,000D,000E,0012

$ efibootmgr -v | egrep -E '^Boot000(5|0)\*\s+'
Boot0000* Arch (Fallback)
HD(1,GPT,2068f0e7-fab9-4b91-b685-0dc35cf55d6c,0x800,0x400000)/File(\EFI\Arch\grubx64.efi)
Boot0005* Arch
HD(1,GPT,b2021ab0-fa79-42fd-a43a-fe5ed517ed39,0x800,0x400000)/File(\EFI\Arch\grubx64.efi)


$ sudo fdisk -l /dev/sd{b,d}
Disk /dev/sdb: 111.81 GiB, 120034123776 bytes, 234441648 sectors
Disk model: Samsung SSD 840
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 2399F18B-AEFA-4A97-A1A8-6E0A0D0577AD

Device       Start       End   Sectors   Size Type
/dev/sdb1     2048   4196351   4194304     2G EFI System
/dev/sdb2  4196352 234441614 230245263 109.8G Linux filesystem


Disk /dev/sdd: 111.81 GiB, 120034123776 bytes, 234441648 sectors
Disk model: Samsung SSD 840
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 815CFB0F-CB34-45BE-B955-EB38365A923E

Device       Start       End   Sectors   Size Type
/dev/sdd1     2048   4196351   4194304     2G EFI System
/dev/sdd2  4196352 234441614 230245263 109.8G Linux filesystem

Attachment: signature.asc
Description: OpenPGP digital signature

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug