Created attachment 226676 [details] A Konsole session. From the attached transcript (01): ---- root@mowa219-gjp4-8570p:~ # gpart modify -l cache-transcend -i 1 da0 da0p1 modified root@mowa219-gjp4-8570p:~ # lsblk da0 DEVICE MAJ:MIN SIZE TYPE LABEL MOUNT da0 2:98 14G GPT - - <FREE> -:- 1.0M - - - da0p1 2:99 14G freebsd-zfs gpt/efiboot0 <ZFS> root@mowa219-gjp4-8570p:~ # gpart show -l /dev/da0 => 34 30310333 da0 GPT (14G) 34 2014 - free - (1.0M) 2048 30308319 1 cache-transcend (14G) … ----
Created attachment 226677 [details] Another Konsole session … … I'm not sure how to interpret the results in these two transcripts. At the tail of the first transcript, the expected label for the 14 G drive was shown by lsblk: gpt/cache-transcend – only after I ordered the reconnection of devices to have the drive at da1. ---- At the tail of this second transcript, with the 14 G drive returned to da0, it's as if the label was lost: root@mowa219-gjp4-8570p:~ # lsblk da0 DEVICE MAJ:MIN SIZE TYPE LABEL MOUNT da0 2:114 14G GPT - - <FREE> -:- 1.0M - - - da0p1 2:115 14G freebsd-zfs gpt/efiboot0 <ZFS> ---- I'll restart the OS, review output from lsblk …
I just done that on FreeBSD 13.0. Works as desired. # gpart modify -i 1 -l swap da0 da0p1 modified # lsblk da0 DEVICE MAJ:MIN SIZE TYPE LABEL MOUNT da0 0:166 30G GPT - - da0p1 0:167 30G freebsd-swap gpt/swap - # gpart modify -i 1 -l swap1 da0 da0p1 modified # lsblk da0 DEVICE MAJ:MIN SIZE TYPE LABEL MOUNT da0 0:166 30G GPT - - da0p1 0:167 30G freebsd-swap gpt/swap1 -
Created attachment 226679 [details] Third session (In reply to vermaden from comment #2) OK. I wonder what's wrong here. After restarting the system: again, it seems that a problem occurs when _either_ of the two devices is at: da0
Created attachment 226681 [details] Fourth session (In reply to Graham Perrin from comment #3) > … it seems that a problem occurs when _either_ of the two devices is at: > > da0 Not just those two devices. The same effect with a third device when it's at da0. From the attached transcript: ---- … root@mowa219-gjp4-8570p:~ # lsblk DEVICE MAJ:MIN SIZE TYPE LABEL MOUNT ada0 0:130 466G GPT - - ada0p1 0:132 200M efi gpt/efiboot0 - ada0p2 0:134 512K freebsd-boot gpt/gptboot0 - <FREE> -:- 492K - - - ada0p3 0:136 16G freebsd-swap gpt/swap0 SWAP ada0p3.eli 2:82 16G freebsd-swap - SWAP ada0p4 0:138 450G freebsd-zfs gpt/zfs0 <ZFS> ada0p4.eli 0:148 450G zfs - - <FREE> -:- 4.0K - - - cd0 0:196 10M cd9660 iso9660/ONEPLUS%20DRIVERS - da0 2:105 29G GPT - - <FREE> -:- 1.0M - - - da0p1 2:106 29G freebsd-zfs gpt/efiboot0 <ZFS> da1 2:113 14G GPT - - <FREE> -:- 1.0M - - - da1p1 2:114 14G freebsd-zfs gpt/cache-transcend <ZFS> da2 2:126 466G GPT - - <FREE> -:- 1.0M - - - da2p1 2:127 466G freebsd-zfs gpt/Transcend <ZFS> root@mowa219-gjp4-8570p:~ # gpart show -l /dev/da0 => 34 60437425 da0 GPT (29G) 34 2014 - free - (1.0M) 2048 60435411 1 cache-copperbowl (29G) …
Please try latest version from here: https://github.com/vermaden/lsblk/blob/master/lsblk
Thanks, (In reply to vermaden from comment #5) I can, however (at a glance) the most recent commit <https://github.com/vermaden/lsblk/commit/ae79c5a8a15d58cb4cd4155792614e4526553a72> matches <https://cgit.freebsd.org/ports/commit/?id=3625ba51feb356d0e2e1948ea99d2090582867bb> for 3.5, which is what I already have. From the first attachment: root@mowa219-gjp4-8570p:~ # pkg info -x lsblk lsblk-3.5 Please, is a difference expected?
(In reply to Graham Perrin from comment #6) Try the version from GitHub. I did not yet bumped the version. Version in the packages/ports is older then the one on the GitHub page.
(In reply to vermaden from comment #5) % pwd /usr/home/grahamperrin/Desktop % chmod +x lsblk % file lsblk lsblk: POSIX shell script, ASCII text executable % lsblk DEVICE MAJ:MIN SIZE TYPE LABEL MOUNT ada0 0:130 466G GPT - - ada0p1 0:132 200M efi gpt/efiboot0 - ada0p2 0:134 512K freebsd-boot gpt/gptboot0 - <FREE> -:- 492K - - - ada0p3 0:136 16G freebsd-swap gpt/swap0 SWAP ada0p3.eli 2:82 16G freebsd-swap - SWAP ada0p4 0:138 450G freebsd-zfs gpt/zfs0 <ZFS> ada0p4.eli 0:148 450G zfs - - <FREE> -:- 4.0K - - - cd0 0:196 10M cd9660 iso9660/ONEPLUS%20DRIVERS - da0 2:105 29G GPT - - <FREE> -:- 1.0M - - - da0p1 2:106 29G freebsd-zfs gpt/efiboot0 <ZFS> da1 2:113 14G GPT - - <FREE> -:- 1.0M - - - da1p1 2:114 14G freebsd-zfs gpt/cache-transcend <ZFS> da2 2:126 466G GPT - - <FREE> -:- 1.0M - - - da2p1 2:127 466G freebsd-zfs gpt/Transcend <ZFS> % gpart show -l /dev/da0 => 34 60437425 da0 GPT (29G) 34 2014 - free - (1.0M) 2048 60435411 1 cache-copperbowl (29G) %
Please send me (or attach) the output of this command when lsblk behaves bad: # sh -x lsblk Thanks.
Created attachment 226684 [details] sh -x ~/Desktop/lsblk da0 (In reply to vermaden from comment #9)
(In reply to Graham Perrin from comment #10) … sorry, I ran that without superuser privileges. Should I re-run?
(In reply to Graham Perrin from comment #11) Should do. Thanks.
Created attachment 226687 [details] lsblk Please try this attached modified version.
Created attachment 226695 [details] lovely-looking lolcat labels (In reply to vermaden from comment #13) Success :-) at a glance.
Thanks. I will submit port update for lsblk as 3.6 in my next block of 'free' time :) Regards.
Updated on GitHub. https://github.com/vermaden/lsblk Will submit a PR to update the port now.
Submitted: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=257494
Thank you! (In reply to vermaden from comment #13) Was it the white space? <https://github.com/vermaden/lsblk/commit/2be20f6752208d2d05937953a13bf7fba0044eb4#diff-ade8891466c48206771f3cb0dfc42306b257e1e28b684141f4beb824832922f5R245>
(In reply to Graham Perrin from comment #18) Yes :) Without it the ada0p1 was the same as da0p1 ... and because of grep(1) '-m' option always the first result was taken. Regards.
Should be fixed in 3.6 in head and 2021Q3.