1 (edited by mfleetwo 2020-06-11 10:09:36)

Topic: GParted showing whole drive ZFS rather than partitions on drive

Hi.

I first had an older version of Gparted and it was able to see the partitions on my hard drive perfectly fine. However, I had an issue with this error.

e2fsck 1.42.9 (4-Feb-2014)
/dev/sda1 has unsupported feature(s): metadata_csum
e2fsck: Get a newer version of e2fsck!

I was able to resolve that issue with downloading and setting up a USB device with the most recent Gparted live version...

But now I'm having an issue that when I go to the same exact drive to review the partitions it can't see any of the partitions on the drive...

It just shows that the drive is in zfs and acts like there isn't anything on it...

I'm drawing a blank on what the issue is now since previously they showed up and now they don't. The drive itself boots perfectly fine. I need to get some of the partitions resized as I'm struggling with some issues with my main partition being inadequately sized.

Help?

2

Re: GParted showing whole drive ZFS rather than partitions on drive

If it helps when I booted back on my normal debian setup I ran a couple of fdsk commands.

Disk /dev/sda: 55.9 GiB, 60022480896 bytes, 117231408 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 2714AA37-2CAA-451C-8D64-BD7FF8E91D6E

Device        Start       End  Sectors  Size Type
/dev/sda1      2048   1050623  1048576  512M EFI System
/dev/sda2   1050624  20654079 19603456  9.4G Linux filesystem
/dev/sda3  20654080  27840511  7186432  3.4G Linux filesystem
/dev/sda4  27840512  44386303 16545792  7.9G Linux swap
/dev/sda5  44386304  45756415  1370112  669M Linux filesystem
/dev/sda6  45756416 117229567 71473152 34.1G Linux filesystem


Disk /dev/sdb: 1.4 TiB, 1500301910016 bytes, 2930277168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x577b4c88

Device     Boot Start        End    Sectors  Size Id Type
/dev/sdb1        2048 2930277167 2930275120  1.4T 83 Linux


Disk /dev/sdc: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sdd: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sde: 9.1 TiB, 10000831348736 bytes, 19532873728 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 3F8A9B5E-DF1D-4AEB-AB2B-CB885FE80EA3

Device     Start         End     Sectors  Size Type
/dev/sde1   2048 19532871679 19532869632  9.1T Linux filesystem


Disk /dev/md0: 3.7 TiB, 4000529252352 bytes, 7813533696 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 524288 bytes / 1048576 bytes
buster@buster:~$ sudo sfdisk -d /dev/sda
label: gpt
label-id: 2714AA37-2CAA-451C-8D64-BD7FF8E91D6E
device: /dev/sda
unit: sectors
first-lba: 34
last-lba: 117231374

/dev/sda1 : start=        2048, size=     1048576, type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B, uuid=02CEB337-7834-420E-B01C-FAEF7CA5AE39
/dev/sda2 : start=     1050624, size=    19603456, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=E14FD981-6906-413D-ABBE-18C1DD13ED3D
/dev/sda3 : start=    20654080, size=     7186432, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=5DFC437C-5753-4D60-8A68-4EC7103FDAB6
/dev/sda4 : start=    27840512, size=    16545792, type=0657FD6D-A4AB-43C4-84E5-0933C84B4F4F, uuid=54FDAFEB-31D4-45A8-8844-B241C21720FB
/dev/sda5 : start=    44386304, size=     1370112, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=8A4CB62C-7A28-4C12-9E8A-C32A34986C5D
/dev/sda6 : start=    45756416, size=    71473152, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=5235A50B-DD07-40C4-A690-CD6CBB96FA52

3

Re: GParted showing whole drive ZFS rather than partitions on drive

  • Did the drive used to have ZFS on it?

  • Did ZFS use the whole drive (e.g. /dev/sda) or just one partition (e.g. /dev/sda1)?

  • How did the GPT partition table and partitions get created?  (e.g. Debian installer did it, or use partition tool XYZ).

What do these command show (can run under Debian or GParted Live)?

sudo blkid /dev/sda
sudo wipefs /dev/sda

Note that using wipefs like above just reports signatures.  It does not wipe anything.

4 (edited by DanGarion 2020-06-10 17:51:45)

Re: GParted showing whole drive ZFS rather than partitions on drive

The initial partitions were set up by the Debian installer.

When I do blkid...

/dev/sda: TYPE="zfs_member" PTUUID="2714aa37-2caa-451c-8d64-bd7ff8e91d6e" PTTYPE="gpt"

wipefs

buster@buster:~$ sudo wipefs /dev/sda
offset               type
----------------------------------------------------------------
0x200                gpt   [partition table]

0xdf997fc00          zfs_member   [filesystem]

5

Re: GParted showing whole drive ZFS rather than partitions on drive

blkid and wipefs say /dev/sda contains both a ZFS file system and a GPT partition table.  This comes about when partition and file system creation tools don't erase all the old signatures before writing new data.

You need to run:

sudo wipefs -o 0xdf997fc00 /dev/sda

to erase that left behind ZFS signature.  It will overwrite just the 8 byte ZFS signature with zeros. Then GParted will display the GPT partition table instead of a whole drive ZFS file system.

6 (edited by DanGarion 2020-06-10 23:22:47)

Re: GParted showing whole drive ZFS rather than partitions on drive

mfleetwo wrote:

blkid and wipefs say /dev/sda contains both a ZFS file system and a GPT partition table.  This comes about when partition and file system creation tools don't erase all the old signatures before writing new data.

You need to run:

sudo wipefs -o 0xdf997fc00 /dev/sda

to erase that left behind ZFS signature.  It will overwrite just the 8 byte ZFS signature with zeros. Then GParted will display the GPT partition table instead of a whole drive ZFS file system.

I can do that just in my normal debain or should I do that from the live CD? --- I get touchy when partitions are involved... What are the chances this blows everything up? smile

7

Re: GParted showing whole drive ZFS rather than partitions on drive

Yes that wipefs -o ... command can be run from your Debian installation.  Doesn't make any difference whether wipefs is run from the OS running from the drive in question or from via a Live CD.

It will be fine.  It won't blow anything up.  It's just gets rid of the ZFS signature on the disk.  This solution has been used multiple times before without issue:
* GNOME Bug 794111 - Gparted doesn't see partition table created with parted
* GParted Issue 14 - zfs partition wrongly shows occupying the whole disk.
* GParted Issue 30 - strange problem while loading disk mbr and graph showing

8

Re: GParted showing whole drive ZFS rather than partitions on drive

Ok, I ran sudo wipefs -o 0xdf997fc00 /dev/sda....

And then when I rebooted another zfs has appeared...


offset               type
----------------------------------------------------------------
0x200                gpt   [partition table]

0xdf997f800          zfs_member   [filesystem]


Do I just need to keep doing this till they stop doing that?

9

Re: GParted showing whole drive ZFS rather than partitions on drive

Sorry about that, run wipefs with -n flag to show all the ZFS signatures.  Delete each one with wipefs -o $offset.  Rebooting is not required.

sudo wipefs -n /dev/sda
sudo wipefs -o 0xdf997f800 /dev/sda
sudo wipefs -o ...

10

Re: GParted showing whole drive ZFS rather than partitions on drive

mfleetwo wrote:

Sorry about that, run wipefs with -n flag to show all the ZFS signatures.  Delete each one with wipefs -o $offset.  Rebooting is not required.

sudo wipefs -n /dev/sda
sudo wipefs -o 0xdf997f800 /dev/sda
sudo wipefs -o ...

I had to delete about 100...

11

Re: GParted showing whole drive ZFS rather than partitions on drive

Thanks for the help. This is now all resolved!