ceph存储 smartctl硬盘状态监控

语法
smartctl [options] device

补充说明

系统需要安装smartmontools才可以使用smartctl命令。smartmontools 就是利用硬盘 S.M.A.R.T. (Self-Monitoring_Analysis_and_Reporting) 特性特性监测硬盘的软件包,包含 smartctl 和 smartd 两个程序,前者是前台命令行工具、后者是后台运行程序。

# yum install kernel-utils

在 CentOS/Fedora 下安装smartmontools

# apt-get install smartmontools

在 Debian/Ubuntu 下安装

参数

smartctl -a  <device>    显示硬盘所有SMART信息。

smartctl -i <device>   显示硬盘model number, serial number,是否开启SMART等信息。

smartctl -s on <device>    如果没有打开SMART技术,使用该命令打开SMART技术。

smartctl -t short <device>    后台检测硬盘,消耗时间短

smartctl -t long <device>      后台检测硬盘,消耗时间长

smartctl -C -t short <device> 前台检测硬盘,消耗时间短

smartctl -C -t long <device>  前台检测硬盘,消耗时间长

smartctl -X <device>  中断后台检测硬盘。

smartctl -l selftest <device>  显示硬盘检测日志。

smartctl -l error <device> 显示硬盘错误汇总。

相关命令

hdparmsmartctl

实例

# smartctl -i /dev/sda 
smartctl version 5.38 [x86_64-redhat-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

 START OF INFORMATION SECTION
Model Family:     Western Digital Caviar Second Generation Serial ATA family
Device Model:     WDC WD3200JS-55PDB0
Serial Number:    WD-WCAPD1876075
Firmware Version: 21.00M21
User Capacity:    320,072,933,376 bytes
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   7
ATA Standard is:  Exact ATA specification draft version not indicated
Local Time is:    Mon Dec 19 17:21:12 2011 CST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

检查一下硬盘是否具有 SMART 特性

# smartctl -H /dev/sda 
smartctl version 5.38 [x86_64-redhat-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

START OF READ SMART DATA SECTION 
SMART overall-health self-assessment test result: PASSED

查看硬盘健康状态

Note: 结果是 PASSED 并不意味着硬盘100%安全,如果结果是Failure一般都有问题,您需要备份数据或更新硬盘。

# smartctl -t short /dev/sda 
smartctl version 5.38 [x86_64-redhat-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

 START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION 
Sending command: "Execute SMART Short self-test routine immediately in off-line mode".
Drive command "Execute SMART Short self-test routine immediately in off-line mode" successful.
Testing has begun.
Please wait 2 minutes for test to complete.
Test will complete after Mon Dec 19 17:33:51 2011

Use smartctl -X to abort test.

快速检测硬盘。

# smartctl -l selftest /dev/sda

查看硬盘测试结果

#smartctl -l error /dev/sda
-a 显示设备所有的SMART信息。

  -l error 列出硬盘错误日志。如果显示没有错误最好,如果显示了大量的错误信息,那就该着手准备替换硬盘了。

  -l selftest 列出自行测试结果。

 
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Ceph是一个可靠的、数据自动重均衡、自动恢复的SDS(软件定义存储)分布式存储系统,功能主要有三大块:块存储、对象存储、文件系统。Ceph不但是提供了统一存储,并且同时还充分利用了客户端的计算能力,在存储每一个数据时,都会通过计算得出该数据存储的位置,尽量将数据分布均衡,同时由于Ceph的设计,采用了CRUSH算法、HASH环等方法,使得它不存在传统的单点故障的问题,且随着规模的扩大性能并不会受到影响。不管是私有云还是公有云,随着云架构的发展,Ceph 成为了OpenStack、Proxmox标配的后端存储,不光如此,就连目前最火的容器编排 Kubernetes 持久存储也都支持 Ceph ,让 Ceph 成为当前主流的存储系统,而对 Ceph 存储的学习也就变的刻不容缓。 该课程属于比较基础的 Ceph 存储课程,旨在让大家能快速上手对 Ceph 集群的部署以及操作,主要讲解以下几个方面: 1.     架构的介绍2.     集群的多种部署方式3.     块存储部署,客户端使用及快照、克隆和镜像4.     对象存储的部署及简单使用5.     Ceph FS 文件系统的部署、客户端使用及导出为NFS6.     集群的操作和管理,包括服务,集群扩展,缩减和集群维护7.     Ceph 基础知识的介绍,包括集群map,PG和身份验证8.     Ceph 集群的监控

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值