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?
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
-
- Global Moderator
- Posts: 3049
- Joined: 2017-09-17 07:12
- Has thanked: 5 times
- Been thanked: 132 times
Re: UUIDs in RAID 1
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.
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.
-
- Posts: 49
- Joined: 2012-02-10 14:24
Re: UUIDs in RAID 1
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.
https://lars.st0ne.at/blog/efi+partitio ... are+raid+1
I am working on solving efi partition in RAID1 as well.
-
- Posts: 49
- Joined: 2012-02-10 14:24
Re: UUIDs in RAID 1
Well, you know what? I screwed up by doing this, and I ended up doing new install, anyway....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.
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.