[nflug] fixing disk errors

Joe josephj at main.nc.us
Mon Mar 10 02:17:11 EDT 2008


Joe wrote:
> I just deleted my dapper partition /dev/sda2 successfully.
>
> When I use gparted to try to grow /dev/sda4 (gutsy) to use all that
> space, it fails on a read error.
>
> I went back into gparted and created an ext3 partition on /dev/sda2.
>
> I rebooted and ran fsck -CVa /dev/sda2 and it says it's clean - no errors.
>
> It looks like I need to map out some bad sectors on my drive in that
> partition.
>
> What should I do next - leaving my other partitions intact?
>
> Thanks.
>
> Joe
> _______________________________________________
> nflug mailing list
> nflug at nflug.org
> http://www.nflug.org/mailman/listinfo/nflug
>
>   

I just ran fsck (below) on it and it found and "fixed" 10 bad blocks.
Since it just puts them in a file of bad blocks, it doesn't do anything
that will help gparted get past them.

I just read an article
http://www2.uic.edu/~aciani1/sector_blues.html#3.0 that says modern
disks don't let you map out bad blocks/sectors any more. It says if you
try to write to the bad blocks, the drive maps them out itself until it
runs out of spare blocks. So I ran fsck again forcing non-destructive
writes. I thought that might have fixed it but gparted still failed (see
below).

So, do I need a new hard disk or what?

Joe

1st fsck:

bigbird at sananda:~$ sudo fsck.ext3 -cfv /dev/sda2
[sudo] password for bigbird:
e2fsck 1.40.2 (12-Jul-2007)
Checking for bad blocks (read-only test): done
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/sda2: ***** FILE SYSTEM WAS MODIFIED *****

11 inodes used (0.00%)
1 non-contiguous inode (9.1%)
# of inodes with ind/dind/tind blocks: 0/0/0
133920 blocks used (1.72%)
10 bad blocks
1 large file

0 regular files
2 directories
0 character device files
0 block device files
0 fifos
0 links
0 symbolic links (0 fast symbolic links)
0 sockets
--------
2 files

2nd fsck:

bigbird at sananda:~$ sudo fsck.ext3 -Cfv -c -c /dev/sda2
[sudo] password for bigbird:
e2fsck 1.40.2 (12-Jul-2007)
Checking for bad blocks (non-destructive read-write test)
Testing with random pattern: 2316936/ 7805580294728/ 7805580 7805580
done
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/sda2: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sda2: 11/3908128 files (9.1% non-contiguous), 133918/7805581 blocks
bigbird at sananda:~$

Saved gparted log:

GParted 0.3.4

Libparted 1.7.1


Delete /dev/sda2 (ext2, 29.78 GiB) from /dev/sda 00:01 ( SUCCES )

calibrate /dev/sda2 00:00 ( SUCCES )

path: /dev/sda2
start: 81915435
end: 144360089
size: 62444655 (29.78 GiB)
delete partition 00:00 ( SUCCES )

========================================


Grow /dev/sda4 from 38.40 GiB to 68.18 GiB 07:55 ( ERROR )

calibrate /dev/sda4 00:00 ( SUCCES )

path: /dev/sda4
start: 144360090
end: 224893934
size: 80533845 (38.40 GiB)
calculate new size and position of /dev/sda4 00:00 ( SUCCES )

requested start: 81915435
requested end: 224893934
requested size: 142978500 (68.18 GiB)
new start: 81915435
new end: 224893934
new size: 142978500 (68.18 GiB)
check filesystem on /dev/sda4 for errors and (if possible) fix them
03:45 ( SUCCES )

e2fsck -f -y -v /dev/sda4

Superblock last write time is in the future. Fix? yes

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/sda4: ***** FILE SYSTEM WAS MODIFIED *****

210866 inodes used (4%)
8679 non-contiguous inodes (4.1%)
# of inodes with ind/dind/tind blocks: 13816/1433/1
7774699 blocks used (77%)
0 bad blocks
2 large files

175937 regular files
17286 directories
329 character device files
26 block device files
2 fifos
1369 links
17262 symbolic links (15692 fast symbolic links)
15 sockets
--------
212226 files

e2fsck 1.39 (29-May-2006)

move partition to the left 00:00 ( SUCCES )

old start: 144360090
old end: 224893934
old size: 80533845 (38.40 GiB)
new start: 81915435
new end: 162449279
new size: 80533845 (38.40 GiB)
move filesystem to the left 04:10 ( ERROR )

perform readonly test 04:10 ( ERROR )

using internal algorithm
read 80533845 sectors
finding optimal blocksize

read 32768 sectors using a blocksize of 128 sectors 00:01 ( SUCCES )

32768 of 32768 read
0.692194 seconds
read 32768 sectors using a blocksize of 256 sectors 00:00 ( SUCCES )

32768 of 32768 read
0.538741 seconds
read 32768 sectors using a blocksize of 512 sectors 00:01 ( SUCCES )

32768 of 32768 read
0.545907 seconds
optimal blocksize is 256 sectors (128.00 KiB)
read 80435541 sectors using a blocksize of 256 sectors 04:08 ( ERROR )

11092565 of 80435541 read
Error while reading block at sector 155550959
11190869 sectors read
rollback last change to the partitiontable 00:00 ( SUCCES )

move partition to the right 00:00 ( SUCCES )

old start: 81915435
old end: 162449279
old size: 80533845 (38.40 GiB)
new start: 144360090
new end: 224893934
new size: 80533845 (38.40 GiB)
libparted messages ( INFO )

Input/output error during read on /dev/sda

========================================



More information about the nflug mailing list