Linux系统硬盘出现故障的如何修复
时间:2023-04-27 22:28:30
最近,很多使用Linux的用户发现,Linux系统硬盘在使用过程中会出现一些坏道。如果坏道发生在系统关键区域,就会损坏系统文件,出现各种错误。对此,应该如何解决和预防呢?下面,小编就给大家介绍下Linux系统硬盘出现故障的修复方法。
Linux系统
故障提示:
Jul 17 00:46:34 xxxxxxxxxxxxxx kernel: [8384801.159283] EXT4-fs (sdl1): warning: mounting fs with errors, running e2fsck is recommended
Jul 17 00:50:00 xxxxxxxxxxxxxx kernel: [8385006.016500] sd 6:0:6:0: [sdl] Sense Key : Medium Error [current]
Jul 17 00:50:00 xxxxxxxxxxxxxx kernel: [8385006.016508] sd 6:0:6:0: [sdl] Add. Sense: Unrecovered read error
Jul 17 00:50:00 xxxxxxxxxxxxxx kernel: [8385006.016524] Buffer I/O error on device sdl1, logical block 1415594116
Jul 17 00:50:00 xxxxxxxxxxxxxx kernel: [8385006.095561] Buffer I/O error on device sdl1, logical block 1415594117
故障解决:
#e2fsck /dev/sdl1
1、若坏的block无法修复,则需要用fdisk格式化硬盘:
#fdisk /dev/sdl
#d
#n
#p
#Enter
#Enter
#w
2、用ext4文件系统格式化磁盘:
#mkfs.ext4 /dev/sdl1
3、把格式化好的硬盘mount回来:
#mount -L /Hadoop07 /hadoop/7 -t ext4 -o defaults,noatime,nodiratime,noauto
若几天后发现/var/log/messages里面有最新的/dev/sdl的错误日志,则表明此硬盘需要更换了,这时可以先禁掉这块盘所挂在目录的读写功能,在此之前你可以先把里面的数据拷贝出来:
#chmod 0 /hadoop07
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
KB5013943导致大量用户.NET Framework 3.5损坏、应用崩溃、电脑黑屏等问题
![](https://img.aspxhome.com/file/2023/1/a274112_0s.jpg)
Win7/Win8系统中的Hosts文件是一个没有扩展名的系统文件吗?
![](https://img.aspxhome.com/file/2023/29/a255482_0s.jpg)
win7默认的开机动画修改成自己想要的图片
![](https://img.aspxhome.com/file/2023/29/a254894_0s.png)
Win8开机联网后总是自动启动浏览器转到必应首页
![](https://img.aspxhome.com/file/2023/2/a288704_0s.jpg)
如何利用 excel 条件格式快速标记出每天的最大数值
![](https://img.aspxhome.com/file/2023/7/a162517_0s.jpg)
Win10蓝屏代码大全详解及解决方法(持续更新)
![](https://img.aspxhome.com/file/2023/26/a221916_0s.jpg)
WPS怎么将表格选择呢
PPT2016怎么更改幻灯片的起始编号和调节幻灯片大小?
![](https://img.aspxhome.com/file/2023/10/a346954_0s.jpg)
Win11微软商店无法加载页面怎么办?
![](https://img.aspxhome.com/file/2023/27/a235758_0s.png)
Win10商店应用数量超过66.9万 质量是关键
![](https://img.aspxhome.com/file/2023/28/a247045_0s.jpg)
SUBSTITUTE函数
![](https://img.aspxhome.com/file/2023/2/a142522_0s.png)
云路由MAC地址过滤规则设置 普通路由器设置MAC地址过滤的方法
![](https://img.aspxhome.com/file/2023/6/a326078_0s.jpg)
Win10音频服务未响应且无法修复怎么办?
![](https://img.aspxhome.com/file/2023/1/a280650_0s.jpg)
Win7系统安装出现a destination volum怎么办?
![](https://img.aspxhome.com/file/2023/2/a291352_0s.jpg)
Win10 1909虚拟内存如何设置
![](https://img.aspxhome.com/file/2023/2/a289001_0s.png)
Windows褪下主角光环 微软何去何从?
![](https://img.aspxhome.com/file/2023/2/a288179_0s.jpg)
win7无法运行可执行文件exe提示缺少关联程序的解决办法
![](https://img.aspxhome.com/file/2023/28/a250951_0s.jpg)
WPS轻松办公—不用看日历加减日期
计算一组数的平均值
Win10系统怎么显示文件后缀?Win10显示文件扩展名的方法
![](https://img.aspxhome.com/file/2023/26/a224898_0s.png)