blkid reports disk as zfs_member if it has a zfs_member partition

Bug #1921108 reported by James Dingwall
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
util-linux (Ubuntu)
New
Undecided
Unassigned

Bug Description

Upstream bug report: https://github.com/karelzak/util-linux/issues/918

In summary if a disk partition used for zfs is at the end of the disk then libblkid identifies the _whole_ disk as a zfs member which causes udev information returned for other partitions to be incorrect. blkid used directly reports the correct information.

# udevadm info /dev/sdb | grep ID_FS_TYPE
E: ID_FS_TYPE=zfs_member

# udevadm info /dev/sdb3 | grep ID_FS_TYPE
E: ID_FS_TYPE=zfs_member

# blkid /dev/sdb3
/dev/sdb3: UUID="4dcL2M-osmP-8MNF-kB3G-VobX-m1UX-aWGYk1" TYPE="LVM2_member" PARTLABEL="bootvg" PARTUUID="3abeebf9-9699-49c1-9e6e-039afb3b04a2"

# gdisk -l /dev/sdb
GPT fdisk (gdisk) version 1.0.3

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/sdb: 3907029168 sectors, 1.8 TiB
Model: HUS722T2TALA600
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): 45A8D0F8-D347-4D68-8DA1-72CDB2CCAC38
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 3907029134
Partitions will be aligned on 2048-sector boundaries
Total free space is 4205 sectors (2.1 MiB)

Number Start (sector) End (sector) Size Code Name
   1 2048 4095 1024.0 KiB EF02 BIOSBOOT
   2 4096 2099199 1023.0 MiB EF00 EFI_DATA
   3 2099200 3147775 512.0 MiB 8E00 vg1
   4 3147776 7342079 2.0 GiB 8E00 vg2
   5 7342080 11536383 2.0 GiB 0700 recovery
   6 11536384 3907029133 1.8 TiB BF01 ztank

This is fixed for me by rebuilding the util-linux patch and adding commit f6e182078a3f05af3ce3b5e5a2d1956d4b9677e2 from the upstream git tree. Once that is applied:

# udevadm info /dev/sdb | grep ID_FS_TYPE
(no output)

# udevadm info /dev/sdb3 | grep ID_FS_TYPE
E: ID_FS_TYPE=LVM2_member

This has been observed on Ubuntu bionic.

$ apt-cache policy util-linux
util-linux:
  Installed: 2.31.1-0.4ubuntu3.7
  Candidate: 2.31.1-0.4ubuntu3.7
  Version table:
 *** 2.31.1-0.4ubuntu3.7 500
        500 http://gb.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages
        100 /var/lib/dpkg/status
     2.31.1-0.4ubuntu3 500
        500 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 Packages

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic

On Ubuntu focal an ID_FS_TYPE is also incorrectly reported for the whole disk but the information for individual partitions seems to be correct although I don't have a system with same partition table from the example. I haven't yet tried with the util-linux patch in focal.

Tags: bionic focal
Revision history for this message
James Dingwall (a-james-launchpad) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.