Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2038498
  • 博文数量: 220
  • 博客积分: 8531
  • 博客等级: 中将
  • 技术积分: 4976
  • 用 户 组: 普通用户
  • 注册时间: 2007-07-18 13:33
文章分类

全部博文(220)

文章存档

2017年(1)

2015年(1)

2014年(5)

2013年(6)

2012年(6)

2011年(30)

2010年(37)

2009年(53)

2008年(41)

2007年(40)

分类: LINUX

2009-12-24 17:35:37

    系统启动时,有两个分区检测失败,输入密码进入单用户模式。想对某一个分区做文件系统检测时,竟然有如下提示

# fsck.ext3  /dev/sda10
e2fsck 1.35 (28-Feb-2004)
The filesystem size (according to the superblock) is 14821962 blocks
The physical size of the device is 14813930 blocks
Either the superblock or the partition table is likely to be
Abort<y>? yes

#


    这就奇怪了,文件系统的块大小比物理设备大。要是有逻辑卷还可以解释,是逻辑卷缩小了,文件系统没变化。但是物理分区怎么会出现这种情况?
    在网上还是有相关的问题,只要输入no,就可以继续检测,并且需要用resize2fs重新检查一下文件系统即可。

nteresting. I changed the PASS value to 0 in /etc/fstab for /dev/md0, and the system booted up normally. (As expected, since fsck skipped scanning the array).

However, I changed the PASS value back to 2, and then the UUID=xxx to /dev/md0. I got a new error on boot:

/dev/md0: The filesystem size (according to the superblock) is 48839600 blocks
The physical size of the device is 48839584 blocks
Either the superblock or the partition table is likely to be


/dev/md0: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e. without -a or -p options)
fsck died with exit status 4
...
* File system check failed.

I guess the filesystems did not get resized with the partitions somehow? So I ran the commands:

$ sudo e2fsck -f /dev/md0
e2fsck 1.39 (29-May-2006)
The filesystem size (according to the superblock) is 48839600 blocks
The physical size of the device is 48839584 blocks
Either the superblock or the partition table is likely to be
Abort<y>? no

Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/md0: 438/24428544 files (5.9% non-contiguous), 1200621/48839600 blocks
$ sudo resize2fs /dev/md0
resize2fs 1.39 (29-May-2006)
Resizing the filesystem on /dev/md0 to 48839584 (4k) blocks.
The filesystem on /dev/md0 is now 48839584 blocks long.


This resized the filesystem I guess. My system now boots


阅读(4949) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~