Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Nov 1995 18:07:33 -0800 (PST)
From:      Julian Elischer <julian@ref.tfs.com>
To:        hasty@rah.star-gate.com (Amancio Hasty Jr.)
Cc:        hasty@rah.star-gate.com, hackers@FreeBSD.org
Subject:   Re: Help! I got a bad block....
Message-ID:  <199511220207.SAA07656@ref.tfs.com>
In-Reply-To: <199511220128.RAA00896@rah.star-gate.com> from "Amancio Hasty Jr." at Nov 21, 95 05:28:41 pm

next in thread | previous in thread | raw e-mail | index | archive | help
No in fsck it attempts to write nulls to the inode
which requires it to read the block first,
null out the inode, and write it back.....
the  read is failing..


you need to do a write with no prior read..
(using the blknum shown in dmesg, not the blknum mentionned in fsck)

e.g. 
char buf[512];
main()
int fd = open ( "/dev/rsd0",O_WRONLY,0); /* or whatever*/
lseek(fd, blknum*512, 0 ); /* without looking at the man page */
write (fd,buf,512);
}


> 
> Writes to the bad block are failing per fsck ...
> On a fsck stage , it attempts to write nulls to the bad block 
> and the drive fails. I do have AWRE and ARRE set on the disk.
> 
> Tnks,
> 	Amancio
> 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199511220207.SAA07656>