On 2024-06-18 11:40, Tom Horsley wrote:
On Tue, 18 Jun 2024 11:23:57 -0400 Frank Bures wrote:
Question: is this solution OK or have I done something wrong? Is there a better way of solving this?
Using dd to back up a disk leaves the copy with the exact same UUID as the source. So it is just down to random timing and order of operations as to which disk it will choose, so using /dev/sda instead of UUID is one possible solution, but there are UUID values in lots more places than /etc/fstab. (grub.cfg for one, but other files as well like the /boot/loader/entries files).
Personally, I'd just use rsync to back up the contents of sda rather than doing a dd of the whole disk. That way everyone could have their own UUIDs.
Just to explain:
I do not dd the whole /dev/sda. There are only /boot and /boot/efi partitions on the disk, the rest is unformatted. I only dd the formatted sectors.
The whole idea of having the same UUID on both sda and sdg is the ability of just booting from the other disk in case of sda failure without having to reconfigure anything. Now I understand the problem this arrangement creates.
If I understand correctly, doing rsync backup would not guarantee this direct boot functionality.
Any other thoughts?
Thanks Frank