sidero
sidero copied to clipboard
Automatically handle corrupt partitions
Sidero automatically fast wipes disks. This is all well and good, but there's not really any checks for the integrity of these partition tables.
I believe, for example, running sgdisk /dev/sda will give you an error state of 2 if there's a bad partition table, and 0 if everything is good.
You could then trigger a sgdisk --zap-all /dev/sda to fix the partition table.
The current system has resulted in me being unable to mount secondary disks in rook due to bad partition tables more than once, so corrections to it would be appreciated.
Good point, I think we have it fixed, but I'll double check if the fix will be included in the next version of Sidero
@Rojikku do you have a specific example of the problem? Sidero in fast wipe mode should zero out the first 1 MiB of the partition. What does confuse sgdisk? Do you have a specific logs to make sure that the disk was in fact fast wiped? (I wonder if the disk wasn't detected properly by the Sidero agent)
@smira I don't have any corrupt disks currently, but it occasionally happens with rook. I don't have logs to copy you, but I can confirm the disk was detected by sidero and did the fast wipe.
I might mention the output from sidero looked normal, and it had no errors, and appeared to wipe successfully. I just don't think the type of wipe it is doing made rook happy.
Normally when you do a sgdisk /dev/sdb for example it gives you a code 0. Rook ran this command and got a code 2 instead, so rook would skip over formatting the disk.
So an issue with the GPT table rather than the partition, I suppose.
When I encountered the issue, it was significantly easier for me to re-install talos using sidero rather than manually fix the disk...But the issue remained. I verified sidero was detecting the disk, and then ultimately used a bootable USB to re-wipe the disk and fix the issue. It happened to me a couple times, which is why it is notable to me. The issue primarily happens with a second physical disk. I haven't ever had the issue with the disk talos itself is installed onto.
I guess I need to test it out, I will see what I can do