UUIDs in RAID 1

Here you can discuss every aspect of Debian. Note: not for support requests!

UUIDs in RAID 1

Postby questlinq » 2017-10-16 18:13

Hello,

I've done Raid 1 setup on a GPT partitioned system, now I'm thinking to use 'dd' command to copy (efi) /dev/sda1 to /dev/sdb1. Is this a good practice or should I use another approach, what about UUIDs if I use 'dd' command - do I need to do anything about that too?
questlinq
 
Posts: 12
Joined: 2017-09-19 08:51

Re: UUIDs in RAID 1

Postby p.H » 2017-10-26 13:35

I assume you mean software Linux RAID.

dd will clone the partition contents, including the filesystem UUID (actually just a 32-bit identifier in FAT filesystems).
However it won't clone the partition unique GUID (PARTUUID in GNU/Linux) which is stored in the partition table entry itself, not in the partition.
EFI boot entries reference partitions on GPT partitioned disks by PARTUUID, so a boot entry pointing to the original partition won't work if only the cloned partition is available, unless you also clone the PARTUUID. I guess gdisk can do this.

However a UUID/GUID is supposed to be unique, so having multiple partitions with both the same filesystem and partition UUIDs may have issues.
The most obvious issue is that either of the EFI partitions may be mounted on /boot/efi. That may be desirable in a RAID setup. But keep in mind that there is no automatic mirroring of the mounted one to the other. So one may be updated and the not updated one may be mounted at next boot. You can change the UUID of the cloned partition to avoid this.

I have considered the problem of the EFI partitions on software RAID and did not come up with a definitive answer.
I have thought about using RAID 1 with 1.0 superblock on the EFI partitions, so that they are automatically mirrored and the UEFI firmware can read them as regular FAT filesystems (no RAID header, 1.0 superblock is at the end). However I do not know if GRUB and efibootmgr would support this setup.
p.H
 
Posts: 160
Joined: 2017-09-17 07:12

Re: UUIDs in RAID 1

Postby man_without_clue » 2017-11-11 14:10

Do you think this method might work?

https://lars.st0ne.at/blog/efi+partitio ... are+raid+1

I am working on solving efi partition in RAID1 as well.
man_without_clue
 
Posts: 48
Joined: 2012-02-10 14:24

Re: UUIDs in RAID 1

Postby p.H » 2017-11-13 10:09

I cannot follow this link right now. I'll try to have a look this evening.
p.H
 
Posts: 160
Joined: 2017-09-17 07:12

Re: UUIDs in RAID 1

Postby p.H » 2017-11-13 21:03

As I wrote, it should work at least until you reinstall GRUB. Then I don't know how grub-install and efibootmgr behave when /boot/efi is an md device.
p.H
 
Posts: 160
Joined: 2017-09-17 07:12

Re: UUIDs in RAID 1

Postby man_without_clue » 2017-11-15 05:37

man_without_clue wrote:Do you think this method might work?

https://lars.st0ne.at/blog/efi+partitio ... are+raid+1

I am working on solving efi partition in RAID1 as well.


Well, you know what? I screwed up by doing this, and I ended up doing new install, anyway....

The problem is that I couldn't fix the UUID of the RAID efi partition, I was supposed to manipulate with the hex editor, but I wasn't prepared and was too lazy to do, so I gave up on it. efi itself was successfully created and mounted on md raid alley though.

What I did instead was I installed /boot/efi on USB stick and things are working perfectly. I had failed doing this several time prior to this but by doing "force installing efi on removal media" things are working perfectly. I choose graphical expert mode to do this.

Now I copied this usb stick and keep it as back up.
man_without_clue
 
Posts: 48
Joined: 2012-02-10 14:24


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable