Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

UUIDs in RAID 1

Here you can discuss every aspect of Debian. Note: not for support requests!
Post Reply
Message
Author
questlinq
Posts: 69
Joined: 2017-09-19 08:51

UUIDs in RAID 1

#1 Post by questlinq »

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?

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: UUIDs in RAID 1

#2 Post by p.H »

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.

man_without_clue
Posts: 49
Joined: 2012-02-10 14:24

Re: UUIDs in RAID 1

#3 Post by man_without_clue »

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.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: UUIDs in RAID 1

#4 Post by p.H »

I cannot follow this link right now. I'll try to have a look this evening.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: UUIDs in RAID 1

#5 Post by p.H »

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.

man_without_clue
Posts: 49
Joined: 2012-02-10 14:24

Re: UUIDs in RAID 1

#6 Post by man_without_clue »

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.

Post Reply