当前位置: 首页 > news >正文

物理机检查磁盘坏道方式

1. 系统环境

[root@monitor ~]# cat  /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)
[root@monitor ~]# uname  -r
3.10.0-1160.108.1.el7.x86_64

2. 通过smartctl 命令检查

        使用smartctl命令需要安装smartmontools软件包

yum install   -y  smartmontools 

3. smartctl命令帮助

======================================= READ AND DISPLAY DATA OPTIONS =====-H, --healthShow device SMART health status-c, --capabilities                                            (ATA, NVMe)Show device SMART capabilities-A, --attributesShow device SMART vendor-specific Attributes and values-f FORMAT, --format=FORMAT                                          (ATA)Set output format for attributes: old, brief, hex[,id|val]-l TYPE, --log=TYPEShow device log. TYPE: error, selftest, selective, directory[,g|s],xerror[,N][,error], xselftest[,N][,selftest], background,sasphy[,reset], sataphy[,reset], scttemp[sts,hist],scttempint,N[,p], scterc[,N,M], devstat[,N], defects[,N], ssd,gplog,N[,RANGE], smartlog,N[,RANGE], nvmelog,N,SIZE-v N,OPTION , --vendorattribute=N,OPTION                            (ATA)Set display OPTION for vendor Attribute N (see man page)-F TYPE, --firmwarebug=TYPE                                         (ATA)Use firmware bug workaround:none, nologdir, samsung, samsung2, samsung3, xerrorlba, swapid-P TYPE, --presets=TYPE                                             (ATA)Drive-specific presets: use, ignore, show, showall-B [+]FILE, --drivedb=[+]FILE                                       (ATA)Read and replace [add] drive database from FILE[default is +/etc/smartmontools/smart_drivedb.hand then    /usr/share/smartmontools/drivedb.h]============================================ DEVICE SELF-TEST OPTIONS =====-t TEST, --test=TESTRun test. TEST: offline, short, long, conveyance, force, vendor,N,select,M-N, pending,N, afterselect,[on|off]-C, --captiveDo test in captive mode (along with -t)-X, --abortAbort any non-captive test on device=================================================== SMARTCTL EXAMPLES =====smartctl --all /dev/sda                    (Prints all SMART information)smartctl --smart=on --offlineauto=on --saveauto=on /dev/sda(Enables SMART on first disk)smartctl --test=long /dev/sda          (Executes extended disk self-test)smartctl --attributes --log=selftest --quietmode=errorsonly /dev/sda(Prints Self-Test & Attribute errors)smartctl --all --device=3ware,2 /dev/sdasmartctl --all --device=3ware,2 /dev/twe0smartctl --all --device=3ware,2 /dev/twa0smartctl --all --device=3ware,2 /dev/twl0(Prints all SMART info for 3rd ATA disk on 3ware RAID controller)smartctl --all --device=hpt,1/1/3 /dev/sda(Prints all SMART info for the SATA disk attached to the 3rd PMPortof the 1st channel on the 1st HighPoint RAID controller)smartctl --all --device=areca,3/1 /dev/sg2(Prints all SMART info for 3rd ATA disk of the 1st enclosureon Areca RAID controller)

 4. 磁盘检查命令

smartctl    -H   /dev/sda1

相关文章:

  • prtobuf的原理
  • 【Luogu】动态规划一
  • TS-300B浊度传感器详解(STM32)
  • STM32单片机入门学习——第46节: [14-1] WDG看门狗
  • Redis在.NET平台中的各种应用场景
  • AI日报 - 2025年4月23日
  • 代理模式(Proxy Pattern)详解:以延迟加载图片为例
  • NLP高频面试题(五十)——大模型(LLMs)分词(Tokenizer)详解
  • 【C++】Json-Rpc框架项目介绍(1)
  • Agent框架LangGraph:实现一个简单的Plan-and-Execute Agent
  • 电子电器架构 --- 面向下一代车辆的演进式(发展演变的)汽车网关
  • 仅追加KV数据库
  • 实验一 进程控制实验
  • 2023蓝帽杯初赛内存取证-4
  • NVIDIA 自动驾驶技术见解
  • 从零到多智能体:Google Agent开发套件(ADK)入门指南
  • C语言教程(十三):C 语言中 enum(枚举)的详细介绍
  • 武装Burp Suite工具:RouteVulScan插件_被动扫描发现漏洞.
  • shared_ptr八股收集 C++
  • SwiftInfer —— 大模型无限流式输入推理打破多轮对话长度限制
  • 媒体:不能让追求升学率,成为高中不双休的借口
  • 在海拔3980米驻守:“全国先进工作者”刘鹏与洛戈梁子警务站的9年
  • AI世界的年轻人|横跨教育与产业,他说攻克前沿问题是研究者的使命
  • 陈芋汐世界杯总决赛卫冕夺冠,全红婵无缘三大赛“全满贯”
  • 多地晒五一假期前两日成绩单,湖南单日客流同比增长逾三成
  • 下达专项资金、党政主官田间调研……全国多地力保夏粮稳收