Subject: hard drive upgrade probs (VERY long)
To: None <port-alpha@netbsd.org>
From: Michael G. Schabert <mikeride@servtech.com>
List: port-alpha
Date: 04/11/1999 22:29:55
Hi all...
In my haste to add another hard drive to my system, I seem to have hit a
wall full-speed ahead. I know that I hosed the info, but I'm curious if the
drive itself is bad, or whether it's NCR flakiness that's involved...as I'm
a native Mac68k'er, I know that they have major problems with the older
Macs where they used 2 different drivers (NCR versus SBC) for various
drives on machines that would normally use the NCR driver (luckily, my68k
Mac used the esp driver which was immune). If your drive didn't like the
flavor of driver that you used, it would give you filesystem corruption. Is
there anything like that in this port?

Again, I'm on an AS 200 4/166, running current...a kernel made on the 9th
with sources from the 9th. I have always been running on a 1 Gig Quantum
Fireball 1080S. That was starting to get a little small when I started to
sup sources (I set it up with 200 MB swap even though I have 80 MB RAM...
not the best use of resources), so I decided to throw in an old IBM 305 MB
drive. I moved /usr/pkgsrc, /usr/pkg, and /home as well as some "misc"
stuff onto that, mounted at /newdrive, with symlinks in the /usr dir for
the pkg & pkgsrc, and a symlink at / for home. Well, that proved to be a
bit too small, still, so I went to put in a Quantum Empire 1080S in place
of the IBM. I gzip/tarred up the dirs & ftp'd them to my Mac to restore
onto the Quantum. Well, I figured that this drive would have plenty of
room, so I was just going to have it be /usr. So a rundown of what I did:

Started out single-user as I already had an sd1a listed in fstab, but the
current sd1 wasn't formatted for un*x. First, I used disklabel -i to create
a label where sd1a was taking the whole drive

partition> P
# /dev/rsd1c:
type: SCSI
disk: EMPIRE_1080S
label: fictitious
flags:
bytes/sector: 512
sectors/track: 91
tracks/cylinder: 8
sectors/cylinder: 728
cylinders: 2874
total sectors: 2109376
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # milliseconds
track-to-track seek: 0  # milliseconds
drivedata: 0

3 partitions:
#        size   offset     fstype   [fsize bsize   cpg]
  a:  2109376        0     4.2BSD        0     0     0   # (Cyl.    0 - 2897*)
  c:  2109376        0     unused        0     0         # (Cyl.    0 - 2897*)

<<looks OK to me>>

partition> W
Label disk [n]? y
Label written
partition> Q

# newfs sd1a
Warning: 368 sector(s) in last cylinder unallocated
/dev/rsd1a:     2109376 sectors in 2898 cylinders of 8 tracks, 91 sectors
        1030.0MB in 182 cyl groups (16 c/g, 5.69MB/g, 1408 i/g)
super-block backups (for fsck -b #) at:
 32, 11776, 23520, 35264, 47008, 58752, 70496, 82240,
 93216, 104960, 116704, 128448, 140192, 151936, 163680, 175424,
 186400, 198144, 209888, 221632, 233376, 245120, 256864, 268608,
 279584, 291328, 303072, 314816, 326560, 338304, 350048, 361792,
 372768, 384512, 396256, 408000, 419744, 431488, 443232, 454976,
 465952, 477696, 489440, 501184, 512928, 524672, 536416, 548160,
 559136, 570880, 582624, 594368, 606112, 617856, 629600, 641344,
 652320, 664064, 675808, 687552, 699296, 711040, 722784, 734528,
 745504, 757248, 768992, 780736, 792480, 804224, 815968, 827712,
 838688, 850432, 862176, 873920, 885664, 897408, 909152, 920896,
 931872, 943616, 955360, 967104, 978848, 990592, 1002336, 1014080,
 1025056, 1036800, 1048544, 1060288, 1072032, 1083776, 1095520, 1107264,
 1118240, 1129984, 1141728, 1153472, 1165216, 1176960, 1188704, 1200448,
 1211424, 1223168, 1234912, 1246656, 1258400, 1270144, 1281888, 1293632,
 1304608, 1316352, 1328096, 1339840, 1351584, 1363328, 1375072, 1386816,
 1397792, 1409536, 1421280, 1433024, 1444768, 1456512, 1468256, 1480000,
 1490976, 1502720, 1514464, 1526208, 1537952, 1549696, 1561440, 1573184,
 1584160, 1595904, 1607648, 1619392, 1631136, 1642880, 1654624, 1666368,
 1677344, 1689088, 1700832, 1712576, 1724320, 1736064, 1747808, 1759552,
 1770528, 1782272, 1794016, 1805760, 1817504, 1829248, 1840992, 1852736,
 1863712, 1875456, 1887200, 1898944, 1910688, 1922432, 1934176, 1945920,
 1956896, 1968640, 1980384, 1992128, 2003872, 2015616, 2027360, 2039104,
 2050080, 2061824, 2073568, 2085312, 2097056, 2108800,

<<Then, I just shutdown -r now...I forgot to fsck it before shutting down>>

<<rebooted already in multi-user, I remembered fsck...I know you shouldn't
do it multi-user, but I didn't think I could really mess a blank disk>>

prez# fsck -f /dev/rsd1a
** /dev/rsd1a (NO WRITE)
** Last Mounted on /newdrive
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
1 files, 1 used, 1019724 free (12 frags, 127464 blocks, 0.0% fragmentation)

>>No errors on that so I thought I was golden. Now I proceeded to do an ftp
>>transfer of the .tgz files from the Mac, & in another window:

prez# cd usr
prez# ls
total 33
drwxr-xr-x  19 root  wheel   512 Apr 11 10:47 .
drwxr-xr-x  21 root  wheel  1024 Apr 10 12:25 ..
drwxrwxrwt   2 root  wheel   512 Apr  5 19:19 ASftp
drwxr-xr-x  13 root  wheel   512 Mar 21 12:18 X11R6
drwxr-xr-x   2 root  wheel  5632 Mar 25 16:26 bin
drwxrwxr-x   2 root  wheel   512 Apr  9 10:48 doc
drwxr-xr-x   3 root  wheel  1024 Jan 31 14:09 games
drwxr-xr-x  30 root  wheel  2560 Apr 10 15:46 include
drwxr-xr-x   4 root  wheel  6144 Apr 10 16:59 lib
drwxr-xr-x   3 root  wheel   512 Dec 30  1997 libdata
drwxr-xr-x   7 root  wheel  1024 Mar 25 16:26 libexec
drwxr-xr-x   2 root  wheel   512 Mar 25 16:14 lkm
drwxr-xr-x  12 root  wheel   512 Feb 14 18:42 local
drwxr-xr-x   2 root  wheel   512 Mar 25 16:14 mdec
lrwxr-xr-x   1 root  wheel    13 Apr  7 21:11 pkg -> /newdrive/pkg
lrwxr-xr-x   1 root  wheel    16 Apr 11 10:47 pkgsrc -> /newdrive/pkgsrc
drwxr-xr-x   2 root  wheel  3072 Apr  9 11:04 sbin
drwxr-xr-x  27 root  wheel   512 Apr  7 21:14 share
drwxrwxr-x   4 root  wheel   512 Jul 11  1998 spool
drwxrwxr-x  17 root  wheel   512 Apr 10 12:24 src
drwxrwxr-x   3 root  wheel   512 Apr  5 09:26 sup
prez# mv * /newdrive/

>>There was the STUPID PART. I know (in retrospect) that it would have been
>>>>safer to do a cp instead of a move, but I'd used that drive quite
>>extensively >>under MacOS with no corruption, so I figured that the drive
>>was OK.
>>Unfortunately, a ways into the move, I started getting errors like this:


sd1(ncr0:4:0):  Check Condition on CDB: 0x08 0a 22 20 10 00
    SENSE KEY:  Media Error
   INFO FIELD:  664096
     ASC/ASCQ:  Unrecovered Read Error

mv: /newdrive//include/miscfs/genfs: Input/output error
mv: /bin/cp: terminated with 1 (non-zero) status: No such file or directory
Apr 11 21:06:45 prez /netbsd: sd1(ncr0:4:0):  Check Condition on CDB: 0x08
0a 22 20 10 00
Apr 11 21:06:45 prez /netbsd:     SENSE KEY:  Media Error
Apr 11 21:06:45 prez /netbsd:    INFO FIELD:  664096
Apr 11 21:06:45 prez /netbsd:      ASC/ASCQ:  Unrecovered Read Error
Apr 11 21:06:45 prez /netbsd:
sd1(ncr0:4:0):  Check Condition on CDB: 0x08 0e 66 20 10 00
    SENSE KEY:  Media Error
   INFO FIELD:  943648
     ASC/ASCQ:  Unrecovered Read Error


>>I got a few of those during the move...mostly in the libraries I
>>believe...I then did a cd /      mv usr oldusr      mv newdrive usr.....

Then it continued with more errors like the previous...only this time it
was with a vengeance. I finally ctrl-c'd the move & am in a dorry state, as
not much of anything from /usr/bin is accessable. If it's a script, it
generally gives syntax error like a missing ), & the compiled stuff are the
old "wrong architecture" deal.










So, that brings me to the point of "what now"...Can anyone tell me whether
that's the drive's fault or a problem with the driver, or something
_really_ boneheadded that I did? Can I not use that drive with the NetBSD
system? I was hoping to not have to resort to using one of my other drives
because of their form-factor, but I'd like a usable stable system. Please
respond to me at the from: address from here, as I'm sure that I can
receive it...I'm a bit unsure of my maildaemon at prez.org at the moment.
Thanks for bearing with me on this long message (as well as all of my other
stupid questions), and again any insight greatly appreciated.


Thanks,
Mike
Bikers don't *DO* taglines.