- Thread Starter
- #101
I'm on securelevel 1
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?Code:> lsblk DEVICE MAJ:MIN SIZE TYPE LABEL MOUNT ada0 0:108 466G - - - diskinfo: /dev/ada1: Permission denied
# 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
gpart show -p .... output. So everything gets shifted because it reads one value too many.kern.securelevel : -1vermaden 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).
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 -
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
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.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 theoperatorgroup, on the systems where it doesn't work the account wasn't added tooperator. That makes sense, permissions on the device give theoperatorgroup read access.
Yeah, something is going on with partition size reporting.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
Looked at 14.3, 14.4, 15.0 and 15.1, it's all the same, operator group has read access on the device node. Don't have anything older anymore, but I suspect it to be the same on 13 too.That's a recent change?
Who's gonna file the bug report?Yeah, partition size reporting has errors. I've seen this even with release 15.0
$ 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 -