
Another outputs from SanDisk SSD installed on FreeBSD 12.x server: For example:Ħ001175126016 # mediasize in bytes ( 5.5T)ġ1628021 # Cylinders according to firmware. The diskinfo command on FreeBSD displays information about a disk device, and can run a naive performance test on the device too. List all connected SSD and hard drive devices in FreeBSD FreeBSD print the attached disk size using the CLI Next, execute the shell script in FreeBSD: Gpart=$ ( gpart show $disk 2 >& 1 ) if then inquiry=$ ( camcontrol inquiry $disk 2 >& 1 ) identify=$ ( camcontrol identify $disk 2 >& 1 ) else info= " $ done

$DEVICE_TYPE_DISK 2 >& 1 ) || break $device get name disk "Select a disk device" " $hline_arrows_tab_enter" \ usr /share /bsdconfig /device.subr || exit & WITH_CAMCONTROL= 1 while : do info= "gpart(8) show %s: \n%s \n \n" disk= gpart= inquiry= identify=ĭevice=$ ( msg_cancel=Done f_device_menu " $DIALOG_TITLE" \ #!/bin/sh # Name: showdisk # Author: FrauBSD ( ) #. The atacontrol utility is a control program that provides the user access and control to the FreeBSD ata (IDE / SATA hard disk) subsystem. Outputs: Mediasize: 6001175126016 (5.5T) Using atacontrol command (for older version of FreeBSD) to list disks on FreeBSD You can filter out info using the egrep command/ grep command to get only needed information: My FreeBSD disk info is as follows for ada2: Try to show detailed information about disks using geom: Using geom utility on FreeBSD show disk info

ad6: My Second hard disk connected to ATA channel 3.ad4 : My First hard disk connected to ATA channel 2.Trying to mount root from ufs:/dev/ad4s1aįrom above output it is clear that I’ve the following storage installed on my FreeBSD server: # egrep 'ad|cd' /var/run/dmesg.bootįreeBSD listing disks output from my home system: acd0: DVDROM at ata0-slave UDMA33 OR use the egerp command on FreeBSD to list disks:

List all detected hard disk / cdroms / SSDs in FreeBSD
