工作,学习,生活,这里将会有一些记录. 备用域名:http://meisw.51099.com 注册 | 登陆
浏览模式: 标准 | 列表2008年07月的文章

linux启动提示:contains a file system with errors, check forced.的解决方(转)

进入系统后提示:

Press enter for maintenance
(or type Control-D to continue):
/dev/sda3 contains a file system with errors, check forced.
/dev/sda3: Inodes that were part of a corrupted orphan linked list found.

/dev/sda3: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p options)

运行fsck.ext3 -p /dev/sda3 ;未能修复
运行fsck.ext3 -y /dev/sda3 ; repair ok
;注意在修复其它filesystem时要umount掉运行该命令。
文件系统--fsck
指令: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

引用网上的一个例子 :

问题: SLES8 在mount盘阵的时候,出现
server1:/ # mount /dev/sde1 /foo
mount: wrong fs type, bad option, bad superblock on /dev/sde1,
or too many mounted file systems

的问题。请问这种问题怎么能解决呢?

回答:
这个错误信息标识 /dev/sde1 设备上的 ext3 文件系统的超级块损坏了,ext3 文件系统的元数据保存在超级块中。

ext3 文件系统还有一些备份的超级块,可以尝试用备份的超级块加载 ext3 文件系统和修复 ext3 文件系统。

备份的超级块信息可以通过以下命令获得,这个命令模拟 ext3 文件系统创建时的动作并打印出备份超级块的位置,给出的位置缺省是以4k为单位的,mount 在使用时需要为它提供以1k为单位的偏移,需要乘4:

注意!!!!!一定要使用'-n'作为参数模拟 ext3 文件系统的创建而不是真的创建 ext3 文件系统
# mkfs.ext3 -n /dev/hda7
mke2fs 1.38 (30-Jun-2005)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
2198880 inodes, 4393738 blocks
219686 blocks (5.00%) reserved for the super user
First data block=0
135 block groups
32768 blocks per group, 32768 fragments per group
16288 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000

使用备份的超级块来加载 ext3 文件系统的命令:

语法: mount.ext3 -o sb=n
# mount.ext3 -o sb=131072 /dev/hda7 /media/hda7

使用备份的超级块来修复 ext3 文件系统的命令

语法:fsck.ext3 -b superblock
# fsck.ext3 -b 32768 /dev/hda7

Ajax相关

比较早以前就知道了ajax这东东,但从没花时间读过,研究过

这几天因工作需要,得去读和修改一个ajax的小功能代码.

google一下,呵呵

使用 Ajax.Request 类 详解 http://www.busfly.cn/post/ajax_request_show.html

prototype.js开发笔记 https://compdoc2cn.dev.java.net/prototype/html/prototype.js.cn.html

prototype.js之ajax.request学习笔记(一) http://www.blogjava.net/Jkallen/archive/2006/07/21/59445.html

ext3_dx_add_entry: Directory index full

Jul  2 10:22:04 pptp kernel: EXT3-fs warning (device sda2): ext3_dx_add_entry: Directory index full!
Jul  2 10:22:04 pptp kernel:
Jul  2 10:22:04 pptp kernel: EXT3-fs warning (device sda2): ext3_dx_add_entry: Directory index full!
Jul  2 10:22:04 pptp kernel:
Jul  2 10:22:05 pptp kernel: EXT3-fs warning (device sda2): ext3_dx_add_entry: Directory index full!

//

df -i

See if you have any free inodes left on that mounted partition.

If you need to unmount /var normally fuser -m /var will let you know whats running on it, course you fuser -k as you've mentioned too.

Running in single user mode if practical might be most beneficial. If you get desperate you can of course comment out /var in fstab and run in single user mode to the fsck the drive and/or resize2fs it.

Also bear in mind that running fsck on a filesystem with a directory containing an overwhelming number of files might end up just making your machine run out of ram, forcing you to reboot and/or corrupting the filesystem your trying to grow.

http://www.linuxquestions.org/questions/linux-server-73/ext3-fs-warning-device-dm-0-ext3dxaddentry-directory-index-full-631376/

 

此问题为inodes(索引节点)已满,引用"inode译成中文就是索引节点,每个存储设备(例如硬盘)或存储设备的分区被格式化为文件系统后,应该有两部份,一部份是inode,另一部份是Block,Block是用来存储数据用的。而inode呢,就是用来存储这些数据的信息,这些信息包括文件大小、属主、归属的用户组、读写权限等。inode为每个文件进行信息索引,所以就有了inode的数值。操作系统根据指令,能通过inode值最快的找到相对应的文件。"

通过几台的情分析判断,每一G的空间,有120000左右的inodes

可以在格式化分区时指定inodes的大小,加个 -N参数,如

mkfs.ext3 -N 2500000 /dev/sda6 #2500000 为inodes的大小

实际应用需要要根据分区的大小来定估算

造成此问题,通常是产生了大量的小文件