smarttools 常用管理命令总结
smarttools 介绍 是一款开源的磁盘控制,监视工具,可以运行在 Linux,Unix,BSD,
Solaris,Mac OS,OS/2,Cygwin 和 Windows 上,同时它还可以从启动光盘或启动软盘运行,
支持 ATA/ATAPI/SATA-3(到-8)位的硬盘和 SCSI 硬盘,另外还支持磁带设备,它的老家在
smartmontools.sourceforge.net,实际上它是一个软件包,包括了两个实用程 序:smartctl 和
smatd。它监控的硬盘必须具有 S.M.A.R.T 特性,目前所有硬盘都有这个特性,但默认情况下通常
没有开启这个功能,有两种 方法来开启这个特性:
1)通过 BIOS 设置选项
2)通过 smartctl 命令。
利用它可以测试硬盘的健康状况,并在发生故障前进行预警。
smarttools 下载及安装
http://sourceforge.net/projects/smartmontools/
安装直接 configure –prefix 指定位置安装即可.
命令格式:
Smartctl 参数 –d 设备类型,编号 /dev/设备名
http://smartmontools.sourceforge.net/man/smartctl.8.html
主要参数:
-h –help 帮助
-i –info 显示设备的型号,编号, firmware 版本,该设备是否支持 SMART.
-a –all 打印所有的关于 smart 的信息
ATA 的包括:
'-H -i -c -A -l error -l selftest -l selective'
Scsi 的包括:
'-H -i -A -l error -l selftest'.
-d 指定设备名 auto, ata, scsi, test
usbsunplus - this device type is for SATA disks that are behind
a SunplusIT USB to SATA bridge.
marvell - [Linux only] interact with SATA disks behind Marvell
chip-set controllers (using the Marvell rather than libata
driver).
megaraid,N - [Linux only] the device consists of one or more
SCSI/SAS disks connected to a MegaRAID controller. The
non-negative integer N (in the range of 0 to 127 inclusive) denotes
which disk on the controller is monitored. Use syntax such as:
smartctl -a -d megaraid,2 /dev/sda
美河学习在线 www.eimhe.com
评论0
最新资源