FreeNAS support lsblk command? Want to List View Disks.

rogere

Cadet
Joined
Jan 12, 2022
Messages
4
Hello. We're running FreeNAS-9.3-STABLE-201512121950.

The shell does not support command lsblk? --->

I'd like to collect this data: result of
lsblk -o NAME,SIZE,SERIAL,LABEL,FSTYPE

.... a table of all disks in the NAS.

Code:
[root@Stor02 ~]# lsblk -o NAME,SIZE,SERIAL,LABEL,FSTYPE                         
bash: lsblk: command not found                                                 
[root@Stor02 ~]#      


The GUI facilitates the View Disks task which generates a table the disks in the NAS, with Size & Serial, etc. However one cannot copy the text of the GUI data into a spreadsheet; there is also no Export feature. The lsblk shell command output would be better. Does the shell not support a means to simply list the disks in the NAS, with their serial and capacity parameters? Most if not all these parameters would be best, (NAME,SIZE,SERIAL,LABEL,FSTYPE).

Thanks for your help.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,681
lsblk is a Linux thing. FreeBSD isn't Linux, and there isn't a general POSIX way to handle this that I can think of. FreeBSD manages most common block devices through the CAM layer, so camcontrol will provide some information about the physical devices. Finding out what's on a device is typically managed through the geom layer. The FreeNAS API may also have some sort of call to get the information, but I don't know what it would be offhand.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,740
Top