博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
一次linux服务器Read-only file system的修复过程
阅读量:5325 次
发布时间:2019-06-14

本文共 2478 字,大约阅读时间需要 8 分钟。

下面演示了一次linux服务器Read-only file system的修复过程。这次硬盘损坏情况应该很轻微,出现问题的时候,还能够ssh上去执行很多操作。所以在客户备份好全部数据之后,我们就尝试 fsck -y 来修复。备份参考:

[root@www.ctohome.com]# mkdir aa mkdir: cannot create directory `aa': Read-only file system

[root@www.ctohome.com]# cat /etc/fstab LABEL=/                 /                       ext3    defaults        1 1 LABEL=/home  /home  ext3  grpquota,usrquota,rw  0  2 devpts                  /dev/pts                devpts  gid=5,mode=620  0 0 sysfs                   /sys                    sysfs   defaults        0 0 proc                    /proc                   proc    defaults        0 0 LABEL=SWAP-sda3         swap                    swap    defaults        0 0
# Modified by BurstNET Technologies, Inc. for additional security tmpfs            /dev/shm     tmpfs        defaults,nosuid,noexec   0 0
[root@www.ctohome.com]# fsck -y fsck 1.39 (29-May-2006) e2fsck 1.39 (29-May-2006) /: recovering journal / contains a file system with errors, check forced. Pass 1: Checking inodes, blocks, and sizes Inode 24641550, i_size is 112000, should be 118784.  Fix? yes
Inode 24641550, i_blocks is 232, should be 240.  Fix? yes
Inode 24642311, i_size is 266014, should be 270336.  Fix? yes
Inode 24642311, i_blocks is 528, should be 536.  Fix? yes
Pass 2: Checking directory structure Entry '14646.228' in /var/run/mod_fcgid (24739847) has deleted/unused inode 24740333.  Clear? yes
Entry '30851.13' in /var/run/mod_fcgid (24739847) has deleted/unused inode 24740337.  Clear? yes
Pass 3: Checking directory connectivity Pass 4: Checking reference counts Inode 24740220 ref count is 1, should be 2.  Fix? yes
Unattached inode 24740228 Connect to /lost+found? yes
Inode 24740228 ref count is 2, should be 1.  Fix? yes
Unattached inode 24740239 Connect to /lost+found? yes
Pass 5: Checking group summary information Block bitmap differences:  +24661016 -24682104 -24682106 +24830549 +(24833206--24833207) +24864088 +24874807 +24874945 +(24876303--24876306) +(24878597--24878598) +24878816 +(24879735--24879737) +24880240 +24880758 +24882234 +24882821 +24883526 +24884209 +24884945 +24887058 +(24887211--24887214) +(24889298--24889299) +24889376 +24889416 +(24889659--24889661) +(24949344--24949345) +24949789 Fix? yes
Free blocks count wrong for group #752 (2862, counted=2849). Fix? yes
Free blocks count wrong for group #757 (219, counted=216). Fix? yes
/: ***** FILE SYSTEM WAS MODIFIED ***** /: ***** REBOOT LINUX ***** /: 140610/32407552 files (3.2% non-contiguous), 2165381/32376991 blocks [root@www.ctohome.com]#  [root@www.ctohome.com]# mkdir aa mkdir: cannot create directory `aa': Read-only file system
[root@www.ctohome.com]# reboot

 

重启后就能正常了

转载于:https://www.cnblogs.com/cav5lier/archive/2013/06/14/3135803.html

你可能感兴趣的文章
字符串类的扩展
查看>>
路由系统和模板基础
查看>>
SQL学习笔记(基本语法)
查看>>
app 进入后台进行模糊处理
查看>>
缓存使用场景
查看>>
fatal error: error writing to /tmp/ccXIKnDg.s: No space left on device
查看>>
跨域方法:JSONP、iframe
查看>>
配置 archlinux 之安装 xfce
查看>>
数据结构与算法JavaScript描述
查看>>
每周总结③
查看>>
项目打包结构
查看>>
log4j
查看>>
linux下setsockopt函数的使用
查看>>
我的第一个python web开发框架(36)——后台菜单管理功能
查看>>
eclipse开发创建web项目
查看>>
iphone常见机型微信网页可视高度
查看>>
移动混合开发之HTML5在移动开发中的准则
查看>>
以Qemu模拟Linux,学习Linux内核
查看>>
Hadoop 综合大作业
查看>>
hexo安装
查看>>