Linux文件系统故障,Input/output error
事情是这样的,在启动某一个应用程序的时候,出现 Input/output error 的报错,磁盘以及目录无法使用的情况下,进行了重启,重启完成后是可以正常使用的,过一段时间后就会再次出现这个问题,一番Google之后怀疑是磁盘出现问题,根据网友的解决方案尝试之后发现,这个方法可行,下文是命令及回显:
使用ls命令查看的时候出现这个报错
[root@webc ~]# ls /data/
ls: 无法访问/data/: 输入/输出错误
[root@webc ~]#
这个是xfs的文件系统,所以使用如下命令进行修复
[root@webc ~]# xfs_repair /dev/sdc1
xfs_repair: cannot open /dev/sdc1: 设备或资源忙
这时这个问题,不要慌,先把磁盘卸载了在进行修复
[root@webc ~]# umount /dev/sdc1
[root@webc ~]# xfs_repair /dev/sdc1
Phase 1 - find and verify superblock...
Phase 2 - using internal log
- zero log...
ERROR: The filesystem has valuable metadata changes in a log which needs to
be replayed. Mount the filesystem to replay the log, and unmount it before
re-running xfs_repair. If you are unable to mount the filesystem, then use
the -L option to destroy the log and attempt a repair.
Note that destroying the log may cause corruption -- please attempt a mount
of the filesystem before doing this.
[root@webc ~]#
[root@webc ~]#
[root@webc ~]# xfs_repair /dev/sdc1
Phase 1 - find and verify superblock...
Phase 2 - using internal log
- zero log...
ERROR: The filesystem has valuable metadata changes in a log which needs to
be replayed. Mount the filesystem to replay the log, and unmount it before
re-running xfs_repair. If you are unable to mount the filesystem, then use
the -L option to destroy the log and attempt a repair.
Note that destroying the log may cause corruption -- please attempt a mount
of the filesystem before doing this.
[root@webc ~]# xfs_repair /dev/sdc1 -L
Phase 1 - find and verify superblock...
Phase 2 - using internal log
- zero log...
ALERT: The filesystem has valuable metadata changes in a log which is being
destroyed because the -L option was used.
- scan filesystem freespace and inode maps...
agi unlinked bucket 31 is 7620063 in ag 5 (inode=10745038303)
sb_icount 533632, counted 533568
sb_ifree 617, counted 614
sb_fdblocks 2852137932, counted 2860186916
- found root inode chunk
Phase 3 - for each AG...
- scan and clear agi unlinked lists...
- process known inodes and perform inode discovery...
- agno = 0
- agno = 1
- agno = 2
- agno = 3
- agno = 4
- agno = 5
correcting bt key (was 91997, now 92001) in inode 10745038303
data fork, btree block 1343129285
correcting bt key (was 226254, now 226257) in inode 10745038303
data fork, btree block 1345535075
correcting bt key (was 241554, now 241557) in inode 10745038303
data fork, btree block 1345535075
correcting bt key (was 795517, now 795515) in inode 10745038303
data fork, btree block 1343659983
data fork in regular inode 10745038303 claims used block 1353137709
correcting nextents for inode 10745038303
bad data fork in inode 10745038303
cleared inode 10745038303
- agno = 6
- agno = 7
- agno = 8
correcting nextents for inode 17197661037, was 870903 - counted 870911
- agno = 9
- agno = 10
correcting bt key (was 1923723, now 1923730) in inode 21481716216
data fork, btree block 2687659655
correcting bt key (was 1997785, now 1997794) in inode 21481716216
data fork, btree block 2687659655
correcting nextents for inode 21481716216, was 918874 - counted 918898
- process newly discovered inodes...
Phase 4 - check for duplicate blocks...
- setting up duplicate extent list...
- check for inodes claiming duplicate blocks...
- agno = 0
- agno = 3
- agno = 4
- agno = 2
- agno = 5
- agno = 6
- agno = 1
- agno = 7
- agno = 9
- agno = 8
- agno = 10
Phase 5 - rebuild AG headers and trees...
- reset superblock...
Phase 6 - check inode connectivity...
- resetting contents of realtime bitmap and summary inodes
- traversing filesystem ...
- traversal finished ...
- moving disconnected inodes to lost+found ...
Phase 7 - verify and correct link counts...
Maximum metadata LSN (15:166217) is ahead of log (1:2).
Format log to cycle 18.
done
[root@webc ~]#
修复完成后在把磁盘挂上,即可生效
[root@webc ~]# mount /dev/sdc1 /data/
查看一下这个磁盘是否可以正常使用
[root@webc ~]# cd /data/vm/
[root@webc vm]# ls
CentOS7-Clone-1 CentOS7-Clone-3 CentOS7-Clone-4 CentOS7-Clone-5 CentOS8 Ubuntu
此刻文件系统已修复完毕
注意:
修复其他文件系统使用fsck命令进行修复
例如ext4文件系统
fsck -t ext4 -y /dev/sda1
不同的文件系统,命令会有些许不同,灵活变通一下
Linux文件系统故障,Input/output error的更多相关文章
- CentOS 启动提示unexpected inconsistency;RUN fsck MANUALLY, ntfs的input/output Error,InPageError c000009c使用chkdsk修复磁盘,12款Linux系统恢复工具
CentOS这两天服务器出了问题了,提示如下: unexpected inconsistency;RUN fsck MANUALLY An error occurred during the file ...
- PHP failed to ptrace(PEEKDATA) pid 13659: Input/output error错误解决方法
PHP failed to ptrace(PEEKDATA) pid 13659: Input/output error错误解决方法 现在改linux内核文件打开限制<pre>ulimit ...
- cannot access Input/output error
ls: cannot access Input/output errorls: cannot open directory .: Input/output error 硬盘故障,只读或只写,你可以d ...
- PHP-FPM-failed to ptrace(PEEKDATA) pid 123: Input/output error
If you're running PHP-FPM you can see these kind of errors in your PHP-FPM logs. $ tail -f php-fpm.l ...
- NFS挂载异常 mount.nfs: Input/output error
[root@localhost ~]# vi /etc/exports #增加/nfs 192.168.10.132(rw,no_root_squash,no_all_squash,async) [r ...
- read()、write()返回 Input/output error, Device or resource busy解决
遇到的问题,通过I2C总线读.写(read.write)fs8816加密芯片,报错如下: read str failed,error= Input/output error! write str fa ...
- Docker 在转发端口时的这个错误Error starting userland proxy: mkdir /port/tcp:0.0.0.0:3306:tcp:172.17.0.2:3306: input/output error.
from:https://www.v2ex.com/amp/t/463719 系统环境是 Windows 10 Pro,Docker 版本 18.03.1-ce,电脑开机之后第一次运行 docker ...
- dpdk EAL: Error reading from file descriptor 23: Input/output error
执行test程序时输出: EAL: Error reading from file descriptor 23: Input/output error 原因: 在虚拟机添加的网卡,dpdk不支持导致的 ...
- mount_cd9660:/dev/acd0: Input/output error
mount -t cd9660 /dev/acd0 /cdrom g_vfs_done():acd0[READ(offset32768, length=204]error =5 mount_cd966 ...
- mac NTFS 关于错误-36,rm Input/output error
当传输文件时出现Mac错误代码36 当我向一个U盘或存储卡里传输文件时,出现了Mac Error Code36,我该如何解决? Mac,传输文件,错误代码36,U盘,卡片 Mac OS X Snow ...
随机推荐
- python音乐分类--knn
1 #利用knn算法分类音乐,将音乐进行情绪分类 2 #将音乐分为兴奋的(excited), 愤怒的(angry),悲伤的(sorrowful),轻松的(relaxed) 3 4 #可分离因素 5 # ...
- js-var,let ,const 的区别
变量提升: 在js预编译阶段,函数和变量的声明会被提前检索编译,打乱了编写时的声明顺序. 函数字面量表达式不会被提升 var a = function(){}; ex: console.log(a) ...
- 数据库之【常用sql语句归纳】
一.数据库操作: 1.创建数据库 create database dbname; 2.创建库是否存在,不存在就创建 create database if not exists dbname; 3.查看 ...
- LOJ数列分块入门九题(中)
#6281. 数列分块入门 5 - 题目 - LibreOJ (loj.ac) 区间开方,区间求和题. 显然,针对区间维护开方操作很难做到,于是考虑其值的性质,显然,int范围内的值最多开方6次就会变 ...
- 【NAS使用心得】使用Synology Photos管理照片
整理方式 1.本地没有整理或只按年份整理的:时间线模式下直接上传,让软件自己按照片创建时间生成文件夹:有按年份生成相册需求的,可以用"选择照片以创建相册"功能,找到年份文件夹,全选 ...
- 阿里云centos7 磁盘挂载
适用于多磁盘的情况 1. 查看本地所有磁盘 fdisk -l 2.格式化磁盘系统 mkfs.ext3 /dev/vdb (/dev/vdb 为未挂载的磁盘路径) 2.创建挂载点 mkdir /ho ...
- ASP.NET实现前台调用后台变量或者方法
前台页面 <div> <%= Name %> </div> <div> <%= getName() %> </div> 后台代码 ...
- 排序方法-c语言
在接触过得排序算法中中,较为常见的有冒泡排序.选择排序.归并排序.快速排序法,他们的区别在于稳定性.时间复杂度.空间复杂度等: 现简单复习一下冒泡排序: 思路非常简单,逐个比较相邻的两个元素,前一个元 ...
- windows音频设备图像隔离audiodg.exe占用内存高(停止与重启audiodg服务)
首先想到的办法是结束该进程,于是在任务管理器里结束进程后,内存是释放了,但是发现发现电脑没有声音去到电脑的system32目录下双击audiodg.exe后任然没有声音解决方法如下(重启audiodg ...
- MOBIUS: Towards the Next Generation of Query-Ad Matching in Baidu's Sponsored Search——百度下一代搜索广告系统
简介 传统的广告最终的呈现需要经过召回与排序两个阶段,百度的搜索架构则采用三层漏斗状,如图1所示.最上面的一层用于筛选出和用户查询最相关的一部分广告,将整个候选广告集从亿级降到千级:下面两层是排序阶段 ...