What commands can I use to give me as much information as possible about disks?
I'm aware diskinfo(8) smartctl(8) and gpart(1)
Is there anything else?
I'm aware diskinfo(8) smartctl(8) and gpart(1)
Is there anything else?
camcontrol identify
. camcontrol inquiry
, or sg_inq
(if you are serious about disks, you have to install the sg utils package). Note that in the inquiry command to the disk, you can request various pages; most modern disk drives have about a dozen pages worth of information they can give you. If you tell sg_inq
to give you page 0, it will give you a list of all pages the drive has. This gives you information about the identity and vital product data of the disk. sg_modes
. I think the listing of all mode pages in the SCSI standard is about a hundred pages long. You can download versions of the SCSI manual that pertain your drive from the manufacturer's web page, Seagate for example is very good about having model-specific SCSI manuals (each hundreds of pages long). Read about those. sg_readcap
. gpart
command you gave above is the starting point. apt install sg_utils
, and all tools were available so that I could do the work...Answering this fully would take me a day, mostly copying stuff from SATA and SCSI manuals.
About the hardware:
For SATA disks: runcamcontrol identify
.
For SCSI disks:
About the data on the drive: Thegpart
command you gave above is the starting point.
Strange. I actually don't have any SCSI disks in use at home, and no SCSI controller in my machine, so I can't test them. The sg_utils actually started life on *BSD; for that reason, their Linux source code is quite screwy: the internal data structures are all in BSD-style formats, and there is a front-end layer that converts them to Linux style.By the way, I do not know what's wrong with sysutils/sg3_utils.
I needed that for reformatting a bunch of NetApp drives to 512-byte sectors a while ago.
But all these sg_utils missed after installing that on FreeBSD.