-
-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Partition confusion when block device is identified as filesystem by libblkid #4
Comments
Whoa, for that matter, why are there partition details on the top of both nvme devices? It's like they're both actively selected, despite only one being active (and there only being one possible active device). This also happens if neither is active! |
This is all managed by print_blockbar() in ncurses.c. I inserted some diags.
So it looks like we're always electing to print nvme1n1 going to the right, and then we print what we're actually on, which is usually going to the right due to the bloat on the empty space. We're not printing the 'nvme1n1' when we're not actively on the device, but I think each device becomes active as it's discovered? So that presumably gets done once (ctrl-'L' does not make them go away)... |
pretty certain that the |
growlight-readline gets this right:
|
|
It's because these have
For the record, /dev/nvme1n1 is not a "zfs_member" so far as I'm concerned, no more than /dev/sdf is. |
util-linux's code is probe_zfs() from superblocks/zfs.c. Essentially, this sees a ZFS filesystem on our block device in addition to the partition where it actually lives. Note that PTTYPE is properly detected as GPT.
Note that being GPT doesn't preclude the device from being ZFS -- ZFS on Linux always creates a GPT table (see openzfs/zfs#6277, openzfs/zfs#94, and openzfs/zfs#1162), at least through 0.8.0. Note that gparted also seems to think this is a ZFS filesystem, and that it has no partition table :(. See attached image. gdisk has no problem with it:
|
lol look at dumbass gparted talking about the number of cylinders on my NVMe SSD 👍 |
Ahhh look at what we have here. They concur that this is a bug in blkid. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=888114 I've gone ahead and mailed the utils-linux-ng mailing list, along with Karel Zak and Andreas Dilger. |
https://gitlab.gnome.org/GNOME/gparted/issues/14 gparted says use wipefs, but that seems less than optimal. libblkid ought be able to reason that this is a block device (more correctly, a namespace). |
https://marc.info/?l=util-linux-ng&m=156491424909123&w=2 is the mail I sent to util-linux, which hasn't seen any reply yet. Either I need to fix this in libblkid, or we need use some other method... |
Branch Why does growlight-readline get it right?!? |
The reason why growlight-readline "gets it right" is because it doesn't display unpartitioned space in the |
I think the right way to fix this is to read the actual partition table (rather than just walking through blkid), and use that to constrain any information gathered from filesystem inspection. Partitions don't announce how large they are, but filesystems typically do. The partition table, however, ought be the authoritative word IMHO -- we are after all a blockdev tool first, and a filesystem tool second. If we then detect a filesystem which claims to be longer (or shorter) than its containing partition boundaries (which might be implicit, as in this case -- the space is technically not on a partition), we can bring that to the user's attention. But trust the partition table. |
I just committed a fix which makes the weird browsing line ( |
│ │growlight-curses: src/ncurses.c:827: create_zobj: Assertion `lsector >= fsector' failed.─────────╯ |
I added two 1TB Western Digital Black NVMe M.2 drives to my machine, one requiring an Asus Hyper PCIe card. I carved out a part3 on each:
nvme1n1:
nvme2n1:
and enrolled them into a mirrored zfs vdev,
zhomez
.Here's
zpool status zhomez
:Upon loading growlight, both the inline display of both devices seems screwed up (it shows almost entirely empty space; the '3' only gets one character), and the details box also has some problems.
Not sure whether the former is due to discontiguous partitions or what, but it's gotta get fixed.
See what can be done about the detail view, as well.
The text was updated successfully, but these errors were encountered: