nix-community / disko

Declarative disk partitioning and formatting using nix [maintainers=@Lassulus @Enzime]

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

zpool is not created due to stubborn fs signature

ghostbuster91 opened this issue · comments

Hi,

It seems that sgdisk --clear &/or wipefs -a are not enough to clear fs signatures.

This problematic because if the fs signatures are not cleared correctly blkid will report them causing the disko script to malfunction.

I was finally able to get rid of these signatures by manually writing zeros to the partition header:

sudo dd if=/dev/zero of=/dev/sda1 bs=1M count=100

For me it caused issues with the zfs script:

elif (blkid "$dev" -o export | grep '^TYPE='); then

Note that I was not able to replicate it on oracle VM. It was only happening on a real machine.

We should switch to zpool labelclear -f instead.

fyi: I was able to get rid of the offensive signature by calling wipefs -a for each partition separately. Before I was calling it only on the disk itself (e.g. /dev/sda)

I thought we were already doing this:

"wipefs --all -f \(.path)"

But I also heard from other sources that wipefs itself won't pick up all zfs signatures: util-linux/util-linux#1228

I didn't use disko-deactivate script, only the disko-format as I no longer had access to the old disko config.

disko-deactivate is used in disko format. It uses the new configuration to wipe disks rather than the old one.

So it makes sense that it didn't work as it didn't iterate over all old parts.
Shall we add into disko repository a guideline on how to manually clear signatures etc?

I believe this was fixed in #757
let me know if it still persist.