Date: Sun, 14 Dec 1997 15:11:18 -0800 From: PandT Johnson <pttjohnson@earthlink.net> To: questions@freebsd.org Subject: bad144 usage Message-ID: <34946796.313@earthlink.net>
next in thread | raw e-mail | index | archive | help
(Second e-mail on the topic; didn't get any response to the first e-mail plea for help. Ended up grepping all over the place for bad144 information and reading kernel source code. Found useful fragments of information in the FreeBSD installation documentation in /stand/help, a few comments in the handbook, some apparently out of date information in the bad144 man page, and a few comments in sections 5 and 8.) I have a Compaq Armada 1125 laptop computer, and have had mostly good luck with it. I've been using it for almost a year with almost no problems. I was using FreeBSD 2.2.1, and have just upgraded to FreeBSD 2.2.5. One problem I have had is hard drive bad sectors. I have now had two sectors go bad on the IDE hard drive on my system. I solved the first one with badsect, but the second one contained i-nodes (I think); badsect refused to deal with it. When I installed 2.2.5, I decided to go with bad144. This e-mail is a quick summary of how I set things up, and a plea for comments from FreeBSD sysadmin gurus indicating if this is reasonable. One comment: I found the bad144 documentation a bit fragmentary, and in a few cases it looked out of date. It might be nice to have a Handbook section with an overview of disk configuration and a description of bad144. (Pardon me if the 2.2.5 documentation already has something like this. I looked at the 2.2.2 documentation.) 1) As I understand it, the slice that contains the root file system has to be entirely contained within the first half-gig of the IDE drive if bad144 information is to be usable during the boot process. This appears to have to do with use of BIOS I/O services during the boot process. 2) As I understand it, bad144 information goes at the end of each slice. Up to 126 sectors can be used at the end of the slice to logically replace bad sectors elsewhere in the slice. However, if the file system at the end of the slice gets full, you may commit some or all of those 126 available sectors to actual files and data in the file system. (This is how I interpret the cryptic warning in the bad144 man page `If that partition is used for a file system, the user is responsible for making sure that it does not overlap the bad sector information or any replacement sectors.') In view of the above, I divided the disk into three slices: 1) a DOS file system for Win95 (about 300 megs) 2) a 70-meg partition for the root file system and swap space 3) a 400-meg partition for /usr (I didn't put a /var filesystem out there; I usually symlink /var to /usr/var.) The other thing I did was to create tiny file systems at the top of each of the two FreeBSD slices. These are something like two megs each; I wanted them as small as possible, but larger than the bad sector information. My intention is never to write anything to these file systems, and indeed not even to mount them. They are there only to ensure that there will always be room for the bad sector data structures. That way, the other file systems on those slices will never grow to the point of stealing sectors that should be left free for bad144's use that way. Is the above reasonable? Here is a `df' after the installation of 2.2.5. (This is before I comment out the /etc/fstab lines that cause /bad1 and /bad2 to get mounted at boot time.) Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/wd0a 19487 13809 4120 77% / /dev/wd0s2e 848 1 780 0% /bad1 /dev/wd0s4f 1392 1 1280 0% /bad2 /dev/wd0s1 296128 280416 15712 95% /dos /dev/wd0s4e 409183 35164 341285 9% /usr procfs 4 4 0 100% /proc /dev/fd0a 1423 126 1297 9% /floppy I don't think the above scheme is common. How do other people ensure that the 126 sectors that bad144 may need don't get allocated to other purposes when the disk starts to get full? Thanks in advance, Greg Johnson pttjohnson@earthlink.net
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?34946796.313>