dankamongmen / growlight

notcurses block device manager / system installation tool
https://nick-black.com/dankwiki/index.php/Growlight
GNU General Public License v3.0
85 stars 12 forks source link

ZFS partitions show up as code "6" #14

Closed dankamongmen closed 5 years ago

dankamongmen commented 5 years ago

In the details view of a device with ZFS partitions, we see something like:

╭─press 'v' to dismiss details───────────────────────────────────────────────╮─╯
│Sandisk Corp WD Black 2018/PC SN720 NVMe SSD                                │
│Firmware: 2101 BIOS: American Megatrends Inc. Load: 0bps                    │─╮
│nvme1n1: WDS100T3X0C-00SJG0 (931.51GiB) S/N: 1908E1801188 WC- WRVx RO-      │┐│
│Sectors: 1953525168 (512B logical / 512B physical) NVMe connect             │││
│Partitioning: gpt I/O scheduler: [none] mq-deadline kyber                   │┘│
│ 831.51GiB P₀₃ 209717248→1953525134 nvme1n1p3 “Solaris /usr & Mac ZFS” 0x6 1M─╯
i           zfs_member “zhomez”                                              │
╰────────────────────────────────────────────────────────────────────────────╯

note the '0x6'. here's another example:

╭─press 'v' to dismiss details───────────────────────────────────────────────╮─╯
│Broadcom / LSI SAS2008 PCI-Express Fusion-MPT SAS-2 [Falcon]                │
│Firmware: 2101 BIOS: American Megatrends Inc. Load: 36.13Gbps               │─╮
│sdj: ST12000NM0007-2ASN02 (10.91TiB) S/N: ZJV2VZG8 WC+ WRV- RO-             │┐│
│Sectors: 23437770752 (512B logical / 4096B physical) SAT3 connect (6Gbps)   │││
│Partitioning: gpt I/O scheduler: [mq-deadline] kyber none                   │┘│
│  10.91TiB P₀₁ 2048→23437752319 sdj1 “zfs-7f5ed1aa1ce6dbc4” 0x6 1MiB align  M─╯
i           zfs_member “chungus”                                             │
╰────────────────────────────────────────────────────────────────────────────╯

The actual codes are BF01 and BF07.

In growlight-readline, we just see "Oth", sigh. But what the hell is 0x6?

dankamongmen commented 5 years ago

We're pulling 6a898cc3-1dd2-11b2-99a6-080020736631 from PART_TYPE. I think we're matching the shorter MBR types from ptypes[] in get_str_code().

dankamongmen commented 5 years ago

Fixed, although at the moment this serves to exacerbate #13 :/

╭─press 'v' to dismiss details───────────────────────────────────────────────╮───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
│Broadcom / LSI SAS2008 PCI-Express Fusion-MPT SAS-2 [Falcon]                │
│Firmware: 2101 BIOS: American Megatrends Inc. Load: 36.13Gbps               │───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────[-]─╮
│sdh: ST12000NM0007-2ASN02 (10.91TiB) S/N: ZJV335TN WC+ WRV- RO-             │──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐│
│Sectors: 23437770752 (512B logical / 4096B physical) SAT3 connect (6Gbps)   │11111111111111111111111111111111111111111111111 zfs_member “pbrstreetgang” (12T) 111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111119em││
│Partitioning: gpt I/O scheduler: [mq-deadline] kyber none                   │──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘│
│  10.91TiB P₀₁ 2048→23437752319 sdh1 “zfs-d24eb8780f0d40a9” 0xbf01 1MiB alignt code 48897───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
            zfs_member “chungus”                                             184
╰────────────────────────────────────────────────────────────────────────────╯
dankamongmen commented 5 years ago

BF01 is properly being recognized, but BF07 is showing up as 0, I think. Reopening.

dankamongmen commented 5 years ago

Ahhh, the other GUID is 6a945a3b-1dd2-11b2-99a6-080020736631, not 6a898cc3-1dd2-11b2-99a6-080020736631 (look at nibbles 2--8).

dankamongmen commented 5 years ago

Got it.