home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.3b1
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!n8emr!colnet!res
- From: res@colnet.cmhnet.org (Rob Stampfli)
- Subject: Re: Help with Bad Block Table
- Message-ID: <1992Dec18.035704.6080@colnet.cmhnet.org>
- Organization: Little to None
- References: <1992Dec15.171206.6467@rock.concert.net>
- Date: Fri, 18 Dec 1992 03:57:04 GMT
- Lines: 58
-
- In article <1992Dec15.171206.6467@rock.concert.net> toddwall@rock.concert.net (R. Todd Wall -- Catholic Diocese of Raleigh -- Computer Services) writes:
- >
- >Yesterday, when my UnixPC crashed, it told me that it was really having
- >trouble working with Cylinder 102, Head 5, secter 1. I would like to
- >put this in my bad block table, however, I would like to know the
- >best method. Should I use Cyl,Head,Byte "How do I calc. Byte?"
- > Physical Sector "How do I get that number?"
- > Logical Block "Ditto previous quote"
- >
- > Also, is there any way to look up and see what file is occupying
- >102,5,1 ??? I would like to salvage it before marking it bad.
-
- Here is an example:
-
- My Seagate 251 has a bad block at cyl=376, sec=2, hd=5, drive=0.
-
- This also shows up in the /usr/adm/unix.log as belonging to logical blk 14041
- of the filesystem (/dev/rfp002).
-
- /etc/iv -t /dev/rfp000 yields:
-
- Winchester disk
- Volume Name: WINCHE
- 820 Cylinders. 6 Heads per Cylinder.
- There are 17 Physical Sectors (of 512 bytes) per Track.
- 102 Physical Sectors per Cylinder, 83640 Physical Sectors per Disk.
- There are 8 Logical Blocks (of 1024 bytes) per Track.
- 48 Logical Blocks per Cylinder, 39360 Logical Blocks per Disk.
- The Step Rate supplied to the Controller is 0.
- Partition 0: start Track=0, size (in Blocks)=48 <- This is the whole disk
- Partition 1: start Track=6, size (in Blocks)=4000 <- This is swap
- Partition 2: start Track=506, size (in Blocks)=35312 <- This is the Unix FS
- Loader starts at Block 2 (size=23 Blocks).
- Bad Block Table starts at Block 1 (size=1 Blocks).
- The Bad Block Table contains 8 entries.
-
- Here is how you calculate the logical block from cyl/head/sector:
-
- 376 (cyl) * 48 (logical blks/cyl) = 18048 (logical blks)
- 5 (head) * 8 (logical blks/track) = 40 (logical blks)
- 2 (sector) / 2 (sectors/logical blk) = 1 (logical blks)
- ------
- 18089 (logical blk in fp000)
- 506 (start track) * 8 (logical blks/track) =
- 4048 (logical blk start of fs)
- ------
- 14041 (logical blk in fp002)
-
- To figure out where the bad block is:
- 1. Calculate logical block offset in fp002.
- 2. Run "/usr/lbin/bf /dev/rfp002 14041", or whatever to get inode.
- If nothing prints, that means block is free.
- 3. Run "/etc/ncheck -i $INODE /dev/rfp002" to get file name.
-
- Hope this helps.
- --
- Rob Stampfli rob@colnet.cmhnet.org The neat thing about standards:
- 614-864-9377 HAM RADIO: kd8wk@n8jyv.oh There are so many to choose from.
-