You are not logged in.

#1 2008-07-28 13:39:41

nh
Member
From: England
Registered: 2008-07-09
Posts: 45

[SOLVED] Filesystem troubles

I installed Arch on the "last" partition on my hard drive, and it seems there are quite a few bad blocks there.  Here is the result of e2fsck on the Arch root partition:

Pass 1: Checking inodes, blocks, and sizes
Group 32's block bitmap (1048576) is bad. Relocate? yes

Group 32's inode bitmap (1048577) is bad. Relocate? yes

Error allocating 1 contiguous block(s) in block group 32 for block bitmap: Could not allocate block in ext2 filesystem
Error allocating 1 contiguous block(s) in block group 32 for inode bitmap: Could not allocate block in ext2 filesystem
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information

Arch: ********** WARNING: Filesystem still has errors **********


83721 inodes used (31.84%)
242 non-contiguous inodes (0.3%)
# of inodes with ind/dind/tind blocks: 2440/35/0
383914 blocks used (36.55%)
4852 bad blocks
1 large file

Does the line "Error allocating 1 contiguous block(s) in block group 32 for block bitmap: Could not allocate block in ext2 filesystem" mean that there are so many bad blocks in that group that fsck is unable to repair the filesystem?

There's no important data on this partition, so I'm thinking that one solution would be to shrink it (the badblock are all at the "end" of the partition) until I can create a good filesystem, and then reinstall Arch.  Does that sound like a good plan?

On the other hand, if anyone can suggest a better solution, I'm willing to give it a go!  I already tried shrinking the partition using PartedMagic (hoping to leave the bad blocks in unused space at the "end" of the disk), but it refused to do anything because the filesystem check failed.  Catch 22!  Are there e2fsck options that could repair the filesystem?

I'm new to Linux, so I hope the above makes sense!  Installing and configuring Arch is a great learning experience.

Last edited by nh (2008-07-29 09:29:18)

Offline

#2 2008-07-28 16:50:11

rooloo
Member
Registered: 2008-07-09
Posts: 218

Re: [SOLVED] Filesystem troubles

well e2fsck utility only works on ext2/3 file systems.

So I am gonna assume that all you would need do is repartition that part of the disk and then reformat that partition with new fs.

Why are you using partitionmagic?

Last edited by rooloo (2008-07-28 16:51:20)

Offline

#3 2008-07-28 18:37:42

nh
Member
From: England
Registered: 2008-07-09
Posts: 45

Re: [SOLVED] Filesystem troubles

Yes, the partition is formatted as ext3.  Sorry, I should have made that clearer.

I'll do the repartition and reformat if I have to.  As I said, I've no important data in Arch, yet.  But if there's a quicker solution, I'd rather give that a go first!  Anyone...?

I'm using Parted Magic because I saw good reviews of it.  I used it to resize my Windows partition and add several more partitions for various Linux distributions, of which Arch is one.  I like the degree of control Arch gives you, together with a good package manager and the rolling release system.  Can you recommend a better partition tool?

Thanks,
nh

Offline

#4 2008-07-29 07:33:50

nh
Member
From: England
Registered: 2008-07-09
Posts: 45

Re: [SOLVED] Filesystem troubles

Just to close this issue... I tried resizing the filesystem, but resize2fs will only operate on a clean filesystem, so I was back to square one.  Or almost, because next I tried running resize2fs with the -f option, which forces it to override some of the safety checks it normally performs.  That was a last resort, and I wasn't too surprised to see the program bomb out, leaving a corrupt filesystem. sad

So I bit the bullet and shrank the partition.  It seems all the bad blocks were at the "end" of the disk, and I was able to create a clean filesystem on the new partition.  Then I reinstalled Arch.  It took only 3-4 hours this time, versus several days of wireless configuration, firmware installation, and X configuration issues last time!  smile

Offline

#5 2008-07-29 12:27:36

rooloo
Member
Registered: 2008-07-09
Posts: 218

Re: [SOLVED] Filesystem troubles

I thought bad blocks had only to do with the ext3 fs (any fs) and not the partitioning of the disk? If that's the case then shrinking the partition did nothing but give you less space.

I would have just tried to re-part and re-format that part of the disk (all of it, including the bad blocks), I would not have shrank the partition size.

edit: http://www.velocityreviews.com/forums/t … to-do.html

^^^ looking here, some drives can come with bad blocks shipped, it's up to the HD utility program to map these bad sectors and let the drive know it can not use these areas to store data.

The important part is to run the test twice or three times over a week to see if the drive is still failing (compiling more and more bad blocks), if it is all your data is in jeopardy.

Last edited by rooloo (2008-07-29 12:37:04)

Offline

#6 2008-07-29 22:21:44

nh
Member
From: England
Registered: 2008-07-09
Posts: 45

Re: [SOLVED] Filesystem troubles

I think the bad blocks were all at the end of the partition (and the disk) -- so shrinking the partition and leaving the last 400MB or so unused seems to have eliminated the problem.  At least for now.  But you're right -- I definitely need to keep an eye on the disk.  It's six years old, so it may well be in the first stages of failing.  Of course, I have backups.

Thanks for the reference re bad blocks on hard drives.  I, too, thought that the hard drive transparently hid bad blocks/tracks from the operating system.  I don't know why it didn't in this case.

Offline

Board footer

Powered by FluxBB