之前的笔记,回顾顺便分享给大家
曾遇到一个问题,文件属主删除文件删除不了,提示:只读文件系统
reboot 后发现secureCRT连不上服务器,去机房
发现出现file system error
df -hl 发现/var 下全是空的
后来纠结了一番,用fsck修复了,避免了重装系统麻烦!
***An error occured during the file system check
*** Dropping you to a shell; the system will reboot
*** when you leave the shell.
UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p options)
Press enter for maintenance
(or type Control-D to continue):
输入 passwd 后进入 (Repair filesystem)#
运行fsck -y / (因为修复时会问是否修复,所以要加上-y参数。)
成功修复。
注意:在修复其它filesystem时要umount掉运行该命令。
指令:fsck
使用权限 : 超级使用者
使用方式 : fsck --help
fsck 1.35 (28-Feb-2004)
fsck.ext3: invalid option -- h
Usage: fsck.ext3 [-panyrcdfvstDFSV] [-b superblock] [-B blocksize]
[-I inode_buffer_blocks] [-P process_inode_size]
[-l|-L bad_blocks_file] [-C fd] [-j ext-journal]
[-E extended-options] device
Emergency help:
-p Automatic repair (no questions) ;自动修复
-n Make no changes to the filesystem ;模拟修复
-y Assume "yes" to all questions ;所有的问题都回答yes
-c Check for bad blocks and add them to the badblock list
;检查坏块,并记录下坏块列表
-f Force checking even if filesystem is marked clean
;对标记为“干净”的文件系统进行强制检查 v Be verbose ;详细信息
-b superblock Use alternative superblock
-B blocksize Force blocksize when looking for superblock
-j external-journal Set location of the external journal
-l bad_blocks_file Add to badblocks list
-L bad_blocks_file Set badblocks list
网友评论