(中文版請見後一篇)
Recently, I added two SATA 1TB hard drives into the SVN server of my team. For inventory control, the model number and the serial number of new hardware must be reported. As an IT guy, I won’t bother to remove the chassis, unplug the HD and then check the S/N. So I was trying to look for way to obtain the device information as easy as possible…
Introduction
As a counterpart of hdparm in Linux; there is camcontrol (8) in FreeBSD, but it’s not what we need here. For ATA devices, we are talking about atacontrol (8).
HOWTO
You may directly type the command without any parameter, then a simple directions will be shown. (It’s skipped here.)
Running with ``list''
parameter, it will show ATA devices currently available. The result is excerpted as follows.
netsec-svn# atacontrol list ATA channel 3: Master: ad6 <WDC WD5002ABYS-01B1B0/02.03B02> SATA revision 2.x Slave: no device present ATA channel 4: Master: acd0 <ASUS DRW-22B1ST/1.00> SATA revision 1.x Slave: no device present ATA channel 5: Master: ad10 <ST31000528AS/CC35> SATA revision 2.x Slave: no device present ATA channel 6: Master: ad12 <ST31000528AS/CC35> SATA revision 2.x Slave: no device present netsec-svn#
As a result, now we know the newly installed HD are attached on ATA channel 5 and 6; the device name are ad10
and ad12
, separately.
Then, we can use the ``cap''
parameter to get detail information.
netsec-svn# atacontrol cap ad10 Protocol SATA revision 2.x device model ST31000528AS serial number 5VP1XXXX firmware revision CC35 cylinders 16383 heads 16 sectors/track 63 lba supported 268435455 sectors lba48 supported 1953525168 sectors dma supported overlap not supported Feature Support Enable Value Vendor write cache yes yes read ahead yes yes Native Command Queuing (NCQ) yes - 31/0x1F Tagged Command Queuing (TCQ) no no 31/0x1F SMART yes yes microcode download yes yes security yes no power management yes yes advanced power management no no 0/0x00 automatic acoustic management yes yes 0/0x00 254/0xFE netsec-svn#
Now, not only the M/N and S/N, all the ATA-releated information are clearly listed, e.g. CHS definition and DMA support.
Reference
FreeBSD Man Page: atacontrol (8)