Bug 241056 - New port: sysutils/lsblk list information about block devices in the system
Summary: New port: sysutils/lsblk list information about block devices in the system
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Koichiro Iwao
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-04 12:24 UTC by Slawomir Wojciech Wojtczak
Modified: 2019-10-11 13:39 UTC (History)
2 users (show)

See Also:


Attachments
lsblk.shar (1.52 KB, text/plain)
2019-10-04 12:24 UTC, Slawomir Wojciech Wojtczak
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Slawomir Wojciech Wojtczak 2019-10-04 12:24:04 UTC
Created attachment 208090 [details]
lsblk.shar

Hi,

I would like to add lsblk tool to the Ports tree.

It list information about block devices in the system in a similar way that Linux lsblk(8) does.

Here is how it looks:
https://vermaden.files.wordpress.com/2019/09/lsblk.2.5.gpart_.exfat_.png

Regards.
Comment 1 Koichiro Iwao freebsd_committer freebsd_triage 2019-10-08 00:48:29 UTC
DEVICE         MAJ:MIN SIZE TYPE                          LABEL MOUNT
ada0             0:77  112G GPT                               - -
  ada0p1         0:78   16G freebsd-swap            label/swap0 -
  ada0p2         0:79   40G freebsd-zfs              gpt/l2arc0 <ZFS>
  ada0p3         0:80   56G freebsd-ufs                gpt/ssd0 /ssd
  <FREE>         -:-   4.0K -                                 - -
ada1             0:98     - -              diskid/DISK-WD-WMC4M3026594 -
ada2             0:122    - -              diskid/DISK-WD-WMC4M3152869 -

On my environment, lsblk doesn't list correct information on ada1 and ada2.
Here's the gpart result.

$ gpart show
=>       40  234441568  ada0  GPT  (112G)
         40   33554432     1  freebsd-swap  (16G)
   33554472   83886080     2  freebsd-zfs  (40G)
  117440552  117001048     3  freebsd-ufs  (56G)
  234441600          8        - free -  (4.0K)

=>        34  3907029101  diskid/DISK-WD-WMC4M3026594  GPT  (1.8T)
          34           6                               - free -  (3.0K)
          40        1024                            1  freebsd-boot  (512K)
        1064    16776320                               - free -  (8.0G)
    16777384  3890251744                            3  freebsd-zfs  (1.8T)
  3907029128           7                               - free -  (3.5K)

=>        34  3907029101  diskid/DISK-WD-WMC4M3152869  GPT  (1.8T)
          34           6                               - free -  (3.0K)
          40        1024                            1  freebsd-boot  (512K)
        1064    16776320                               - free -  (8.0G)
    16777384  3890251744                            3  freebsd-zfs  (1.8T)
  3907029128           7                               - free -  (3.5K)
Comment 2 Koichiro Iwao freebsd_committer freebsd_triage 2019-10-08 00:55:19 UTC
Committed with minor changes, thanks!
When you released a new version that fix my issue, submit a new bug to update the port.
Comment 3 commit-hook freebsd_committer freebsd_triage 2019-10-08 01:03:49 UTC
A commit references this bug:

Author: meta
Date: Tue Oct  8 01:02:49 UTC 2019
New revision: 514019
URL: https://svnweb.freebsd.org/changeset/ports/514019

Log:
  New port: sysutils/lsblk

  Lists information about block devices in the system in a similar way
  that util-linux's lsblk(8) does.

  WWW: https://github.com/vermaden/scripts/blob/master/lsblk.sh

  PR:		241056
  Submitted by:	vermaden@interia.pl

Changes:
  head/sysutils/Makefile
  head/sysutils/lsblk/
  head/sysutils/lsblk/Makefile
  head/sysutils/lsblk/distinfo
  head/sysutils/lsblk/pkg-descr
Comment 4 Slawomir Wojciech Wojtczak 2019-10-11 13:39:38 UTC
(In reply to Koichiro Iwao from comment #1)

Hi,

thanks for trying out lsblk.sh and showing that 'strange' behaviour.

I do not have that /dev/diskid stuff on my 12.1-BETA system, is that 13-CURRENT?

Regards,
vermaden