Why is lsblk not included in base install?

Code:
> lsblk
DEVICE MAJ:MIN SIZE TYPE LABEL MOUNT
ada0 0:108 466G - - -
diskinfo: /dev/ada1: Permission denied
It's not giving the error on ada0 (though there seems to be some information missing), it does get a permission error on ada1. What's the difference of these disks?

As for the partition size discrepancy, I suspect it's this bit of code:
Code:
  # READ PARTITIONS OF PROVIDER
  local GPART=$( gpart show -p ${DEV} 2> /dev/null | sed -E 's-\[.*\]--g' | sed 's|=>||g' )
  # PARSE gpart(8) OUTPUT
  echo "${GPART}" \
    | while read BEG END NAME TYPE SIZE SIZE_FREE
      do
There's no SIZE_FREE in the gpart show -p .... output. So everything gets shifted because it reads one value too many.
 
vermaden there's something wrong with lsblk lately.

Firstly, it started demanding root credentials to display disk sizes.

Secondly, it no longer displays partition sizes, it just prints the entire device size per each partition. (if the device size is 16G, then it'll just say 16G for each individual partition on that device).
kern.securelevel : -1
no root needed for me , partition sizes are shown for me.
 
Seems odd with 59G on EFI (pretty sure a 64GB SD card) on 15.1:
Code:
DEVICE         MAJ:MIN  SIZE TYPE                                    LABEL MOUNT
mmcsd0           0:78    59G MBR                                         - -
  <FREE>         -:-    993K -                                           - -
  mmcsd0s1       0:79    59G fat32lba                          msdosfs/EFI /boot/efi
  mmcsd0s2       0:80    59G BSD                               gpt/freebsd -
    <FREE>       -:-     64K -                                           - -
    mmcsd0s2a    0:83    53G freebsd-ufs                        ufs/rootfs /
    mmcsd0s2b    0:84   5.9G freebsd-swap                label/growfs_swap SWAP
  <FREE>         -:-    2.0M -

Was more odd on CURRENT a few weeks ago:
Code:
DEVICE         MAJ:MIN  SIZE TYPE                                    LABEL MOUNT
nda0             0:82   954G GPT                                         - -
  nda0p1         0:84   954G efi                                   gpt/efi /boot/efi
  nda0p2         0:86   954G freebsd-ufs                   gpt/freebsd-ufs /
  nda0p3         0:88   954G freebsd-swap                 gpt/freebsd-swap SWAP
 
Hmm, think I might know why diskinfo(8) works for me on some systems but not others. On the systems where it works my user is a member of the operator group, on the systems where it doesn't work the account wasn't added to operator. That makes sense, permissions on the device give the operator group read access.
 
Hmm, think I might know why diskinfo(8) works for me on some systems but not others. On the systems where it works my user is a member of the operator group, on the systems where it doesn't work the account wasn't added to operator. That makes sense, permissions on the device give the operator group read access.
That's a recent change? It was working fine for me before without the user being part of the operator group.
 
Seems odd with 59G on EFI (pretty sure a 64GB SD card) on 15.1:
Code:
DEVICE         MAJ:MIN  SIZE TYPE                                    LABEL MOUNT
mmcsd0           0:78    59G MBR                                         - -
  <FREE>         -:-    993K -                                           - -
  mmcsd0s1       0:79    59G fat32lba                          msdosfs/EFI /boot/efi
  mmcsd0s2       0:80    59G BSD                               gpt/freebsd -
    <FREE>       -:-     64K -                                           - -
    mmcsd0s2a    0:83    53G freebsd-ufs                        ufs/rootfs /
    mmcsd0s2b    0:84   5.9G freebsd-swap                label/growfs_swap SWAP
  <FREE>         -:-    2.0M -

Was more odd on CURRENT a few weeks ago:
Code:
DEVICE         MAJ:MIN  SIZE TYPE                                    LABEL MOUNT
nda0             0:82   954G GPT                                         - -
  nda0p1         0:84   954G efi                                   gpt/efi /boot/efi
  nda0p2         0:86   954G freebsd-ufs                   gpt/freebsd-ufs /
  nda0p3         0:88   954G freebsd-swap                 gpt/freebsd-swap SWAP
Yeah, something is going on with partition size reporting.
 
User is in operator group, securelevel=0
Code:
$ gpart show -p                                                                   
=>       40  500118112    nda0  GPT  (238G)
         40     532480  nda0p1  efi  (260M)
     532520  490201088  nda0p2  freebsd-ufs  (234G)
  490733608    8388608  nda0p3  freebsd-swap  (4.0G)
  499122216     995936          - free -  (486M)

$ lsblk
DEVICE         MAJ:MIN  SIZE TYPE                                    LABEL MOUNT
nda0             0:108  238G GPT                                         - -
  nda0p1         0:110  238G efi                              gpt/efiboot0 /boot/efi
  nda0p2         0:112  238G freebsd-ufs                         gpt/root0 /
  nda0p3         0:114  238G freebsd-swap                        gpt/swap0 -
  <FREE>         -:-    486M -
 
Back
Top