home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / 3b1 / 4081 < prev    next >
Encoding:
Text File  |  1992-12-21  |  2.8 KB  |  69 lines

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