Ivan Tomica

Cleaning up ZFS GPT signatures

I have been previously installing Ubuntu on ZFS (root-on-zfs) and since then I’ve transitioned to Fedora, on ext4+lvm, to avoid much complication and hassle. It is also not necessary for me to have all those nice ZFS features on root.

When I was installing Fedora I have reformatted existing drive. Unfortunately although new GPT should’ve been created it seems like I’ve missed something and root of my device was identified as ZFS member:

nvme0n1                                       zfs_member  rpool   6746866517683744678                                   
├─nvme0n1p1                                   vfat                0714-E22E                               579.2M     3% /boot/efi
├─nvme0n1p2                                   ext4        boot    7846c247-a35f-4093-b4ef-e860a734b507    671.4M    24% /boot
└─nvme0n1p3                                   crypto_LUKS         f780afb3-06ba-4a67-b502-e44ef0799a95                  
  └─luks-f780afb3-06ba-4a67-b502-e44ef0799a95 LVM2_member         dU20fV-Y679-pJ8A-tZaK-pMPc-eOZA-AlsjaJ                
    └─fedora-root                             ext4        root    a2bd9c66-25a1-48ed-8bd9-e66d1691ffa1     67.4G    32% /

Although in practice that doesn’t mean much it was still annoying to me, so I decided to cleanup. Luckily whole process isn’t hard with wipefs utility.

First I inspected the signatures on the drive:

[root@bequiet ~]# wipefs /dev/nvme0n1 
DEVICE  OFFSET       TYPE       UUID                LABEL
nvme0n1 0x1bf293f000 zfs_member 6746866517683744678 rpool
nvme0n1 0x1bf293e000 zfs_member 6746866517683744678 rpool
nvme0n1 0x1bf293d000 zfs_member 6746866517683744678 rpool
nvme0n1 0x1bf293c000 zfs_member 6746866517683744678 rpool
nvme0n1 0x1bf293b000 zfs_member 6746866517683744678 rpool
nvme0n1 0x1bf293a000 zfs_member 6746866517683744678 rpool
nvme0n1 0x1bf2939000 zfs_member 6746866517683744678 rpool
nvme0n1 0x1bf2938000 zfs_member 6746866517683744678 rpool
nvme0n1 0x1bf2937000 zfs_member 6746866517683744678 rpool
nvme0n1 0x1bf2936000 zfs_member 6746866517683744678 rpool
nvme0n1 0x1bf2935000 zfs_member 6746866517683744678 rpool
nvme0n1 0x1bf2934000 zfs_member 6746866517683744678 rpool
nvme0n1 0x1bf2933000 zfs_member 6746866517683744678 rpool
nvme0n1 0x1bf2932000 zfs_member 6746866517683744678 rpool
nvme0n1 0x1bf2931000 zfs_member 6746866517683744678 rpool
nvme0n1 0x1bf2930000 zfs_member 6746866517683744678 rpool
nvme0n1 0x1bf292f000 zfs_member 6746866517683744678 rpool
nvme0n1 0x1bf292e000 zfs_member 6746866517683744678 rpool
nvme0n1 0x1bf292d000 zfs_member 6746866517683744678 rpool
nvme0n1 0x1bf292c000 zfs_member 6746866517683744678 rpool
nvme0n1 0x1bf292b000 zfs_member 6746866517683744678 rpool
nvme0n1 0x1bf292a000 zfs_member 6746866517683744678 rpool
nvme0n1 0x1bf2929000 zfs_member 6746866517683744678 rpool
nvme0n1 0x1bf2928000 zfs_member 6746866517683744678 rpool
nvme0n1 0x1bf2927000 zfs_member 6746866517683744678 rpool
nvme0n1 0x1bf2926000 zfs_member 6746866517683744678 rpool
nvme0n1 0x1bf2925000 zfs_member 6746866517683744678 rpool
nvme0n1 0x1bf2924000 zfs_member 6746866517683744678 rpool
nvme0n1 0x1bf2923000 zfs_member 6746866517683744678 rpool
nvme0n1 0x1bf2922000 zfs_member 6746866517683744678 rpool
nvme0n1 0x1bf2921000 zfs_member 6746866517683744678 rpool
nvme0n1 0x1bf2920000 zfs_member 6746866517683744678 rpool
nvme0n1 0x200        gpt                            
nvme0n1 0x1bf2975e00 gpt                            
nvme0n1 0x1fe        PMBR          

Then I have deleted those matching “zfs_member” type. Note that it is advised to first try without -a and -f options just to see if you’re properly matching those signatures. Option -f was there to do it without partition reload as I was booted from that very same system.

[root@bequiet ~]# wipefs -a -f -t zfs_member /dev/nvme0n1 
/dev/nvme0n1: 8 bytes were erased at offset 0x1bf293f000 (zfs_member): 0c b1 ba 00 00 00 00 00
/dev/nvme0n1: 8 bytes were erased at offset 0x1bf293e000 (zfs_member): 0c b1 ba 00 00 00 00 00
/dev/nvme0n1: 8 bytes were erased at offset 0x1bf293d000 (zfs_member): 0c b1 ba 00 00 00 00 00
/dev/nvme0n1: 8 bytes were erased at offset 0x1bf293c000 (zfs_member): 0c b1 ba 00 00 00 00 00
/dev/nvme0n1: 8 bytes were erased at offset 0x1bf293b000 (zfs_member): 0c b1 ba 00 00 00 00 00
/dev/nvme0n1: 8 bytes were erased at offset 0x1bf293a000 (zfs_member): 0c b1 ba 00 00 00 00 00
/dev/nvme0n1: 8 bytes were erased at offset 0x1bf2939000 (zfs_member): 0c b1 ba 00 00 00 00 00
/dev/nvme0n1: 8 bytes were erased at offset 0x1bf2938000 (zfs_member): 0c b1 ba 00 00 00 00 00
/dev/nvme0n1: 8 bytes were erased at offset 0x1bf2937000 (zfs_member): 0c b1 ba 00 00 00 00 00
/dev/nvme0n1: 8 bytes were erased at offset 0x1bf2936000 (zfs_member): 0c b1 ba 00 00 00 00 00
/dev/nvme0n1: 8 bytes were erased at offset 0x1bf2935000 (zfs_member): 0c b1 ba 00 00 00 00 00
/dev/nvme0n1: 8 bytes were erased at offset 0x1bf2934000 (zfs_member): 0c b1 ba 00 00 00 00 00
/dev/nvme0n1: 8 bytes were erased at offset 0x1bf2933000 (zfs_member): 0c b1 ba 00 00 00 00 00
/dev/nvme0n1: 8 bytes were erased at offset 0x1bf2932000 (zfs_member): 0c b1 ba 00 00 00 00 00
/dev/nvme0n1: 8 bytes were erased at offset 0x1bf2931000 (zfs_member): 0c b1 ba 00 00 00 00 00
/dev/nvme0n1: 8 bytes were erased at offset 0x1bf2930000 (zfs_member): 0c b1 ba 00 00 00 00 00
/dev/nvme0n1: 8 bytes were erased at offset 0x1bf292f000 (zfs_member): 0c b1 ba 00 00 00 00 00
/dev/nvme0n1: 8 bytes were erased at offset 0x1bf292e000 (zfs_member): 0c b1 ba 00 00 00 00 00
/dev/nvme0n1: 8 bytes were erased at offset 0x1bf292d000 (zfs_member): 0c b1 ba 00 00 00 00 00
/dev/nvme0n1: 8 bytes were erased at offset 0x1bf292c000 (zfs_member): 0c b1 ba 00 00 00 00 00
/dev/nvme0n1: 8 bytes were erased at offset 0x1bf292b000 (zfs_member): 0c b1 ba 00 00 00 00 00
/dev/nvme0n1: 8 bytes were erased at offset 0x1bf292a000 (zfs_member): 0c b1 ba 00 00 00 00 00
/dev/nvme0n1: 8 bytes were erased at offset 0x1bf2929000 (zfs_member): 0c b1 ba 00 00 00 00 00
/dev/nvme0n1: 8 bytes were erased at offset 0x1bf2928000 (zfs_member): 0c b1 ba 00 00 00 00 00
/dev/nvme0n1: 8 bytes were erased at offset 0x1bf2927000 (zfs_member): 0c b1 ba 00 00 00 00 00
/dev/nvme0n1: 8 bytes were erased at offset 0x1bf2926000 (zfs_member): 0c b1 ba 00 00 00 00 00
/dev/nvme0n1: 8 bytes were erased at offset 0x1bf2925000 (zfs_member): 0c b1 ba 00 00 00 00 00
/dev/nvme0n1: 8 bytes were erased at offset 0x1bf2924000 (zfs_member): 0c b1 ba 00 00 00 00 00
/dev/nvme0n1: 8 bytes were erased at offset 0x1bf2923000 (zfs_member): 0c b1 ba 00 00 00 00 00
/dev/nvme0n1: 8 bytes were erased at offset 0x1bf2922000 (zfs_member): 0c b1 ba 00 00 00 00 00
/dev/nvme0n1: 8 bytes were erased at offset 0x1bf2921000 (zfs_member): 0c b1 ba 00 00 00 00 00
/dev/nvme0n1: 8 bytes were erased at offset 0x1bf2920000 (zfs_member): 0c b1 ba 00 00 00 00 00

After this was completed, my label was gone.

nvme0n1                                                                                                                 
├─nvme0n1p1                                   vfat                0714-E22E                               579.2M     3% /boot/efi
├─nvme0n1p2                                   ext4        boot    7846c247-a35f-4093-b4ef-e860a734b507    671.4M    24% /boot
└─nvme0n1p3                                   crypto_LUKS         f780afb3-06ba-4a67-b502-e44ef0799a95                  
  └─luks-f780afb3-06ba-4a67-b502-e44ef0799a95 LVM2_member         dU20fV-Y679-pJ8A-tZaK-pMPc-eOZA-AlsjaJ                
    └─fedora-root                             ext4        root    a2bd9c66-25a1-48ed-8bd9-e66d1691ffa1     67.4G    32% /

Tagged in:, ,
About 
Sysadmin on the everlasting journey of learning.