From: ejh@khonshu.colorado.edu (Edward J. Hartnett)
Subject: problem newfs'ing a disk
Organization: Cooperative Institute for Research in the Environmental Sciences
Date: Wed, 19 Aug 1992 22:59:59 GMT

I have this little problem. I've got two disks on my Sun IPC, an old
Wren (about 900 MB) and a new Elite (1.3 GB). I had things set up such
that everything (OS, home partition, var, usr, and swap) was on the
Elite, and the Wren was just one big empty partition used for data
storage. But recently one of the gurus here suggested that I move the
OS onto the wren, and keep the data and home partitions on the Elite,
since the elite is faster. So I tried to repartition and newfs the
wren, and had a problem when I newfs'd the last partition (whihc is
just leftover space I'll use as a data overflow). Here's an extract
from the script file I was running at the time:




Script started on Wed Aug 19 16:34:06 1992
AVAILABLE DISK SELECTIONS:
        0. sd0 at esp0 slave 24
           sd0: <SUN1.3G cyl 1965 alt 2 hd 17 sec 80>
        1. sd3 at esp0 slave 0
           sd3: <IMPRIMIS 94601-15         cyl 1898 alt 2 hd 15 sec 71>
Specify disk (enter its number): 1
selecting sd3: <IMPRIMIS 94601-15        >
[disk formatted, defect list found]
Warning: Current Disk has mounted partitions.


FORMAT MENU:
        disk       - select a disk
			<snip>
format> partition


PARTITION MENU:
        a      - change `a' partition
        b      - change `b' partition
			<snip>
partition> print
Current partition table (original sd3):
        partition a - starting cyl      0, # blocks    34080 (32/0/0)
        partition b - starting cyl     32, # blocks   110760 (104/0/0)
        partition c - starting cyl      0, # blocks  2021370 (1898/0/0)
        partition d - starting cyl    136, # blocks    34080 (32/0/0)
        partition e - starting cyl      0, # blocks        0 (0/0/0)
        partition f - starting cyl      0, # blocks        0 (0/0/0)
        partition g - starting cyl    168, # blocks   745500 (700/0/0)
        partition h - starting cyl    868, # blocks  2021370 (1898/0/0)

partition> quit

			<snip>

[khonshu:/ ! ]# newfs -v sd3a
mkfs /dev/rsd3a 34080 71 15 8192 1024 16 10 60 2048 t 0 -1
/dev/rsd3a:     34080 sectors in 32 cylinders of 15 tracks, 71 sectors
        17.4Mb in 2 cyl groups (16 c/g, 8.72Mb/g, 2048 i/g)
super-block backups (for fsck -b#) at:
 32, 17152,
installing boot code
1st level boot = /usr/mdec/bootsd
[khonshu:/ ! ]# newfs -v sd3b
mkfs /dev/rsd3b 110760 71 15 8192 1024 16 10 60 2048 t 0 -1
/dev/rsd3b:     110760 sectors in 104 cylinders of 15 tracks, 71 sectors
        56.7Mb in 7 cyl groups (16 c/g, 8.72Mb/g, 2048 i/g)
super-block backups (for fsck -b#) at:
 32, 17152, 34272, 51392, 68512, 85632, 102752,
[khonshu:/ ! ]# newfs -v sd3d
mkfs /dev/rsd3d 34080 71 15 8192 1024 16 10 60 2048 t 0 -1
/dev/rsd3d:     34080 sectors in 32 cylinders of 15 tracks, 71 sectors
        17.4Mb in 2 cyl groups (16 c/g, 8.72Mb/g, 2048 i/g)
super-block backups (for fsck -b#) at:
 32, 17152,
[khonshu:/ ! ]# newfs -v sd3g
mkfs /dev/rsd3g 745500 71 15 8192 1024 16 10 60 2048 t 0 -1
/dev/rsd3g:     745500 sectors in 700 cylinders of 15 tracks, 71 sectors
        381.7Mb in 44 cyl groups (16 c/g, 8.72Mb/g, 2048 i/g)
super-block backups (for fsck -b#) at:
 32, 17152, 34272, 51392, 68512, 85632, 102752, 119872, 136992, 154112,
 171232, 188352, 205472, 222592, 239712, 256832, 272672, 289792, 306912, 324032,
 341152, 358272, 375392, 392512, 409632, 426752, 443872, 460992, 478112, 495232,
 512352, 529472, 545312, 562432, 579552, 596672, 613792, 630912, 648032, 665152,
 682272, 699392, 716512, 733632,
[khonshu:/ ! ]# newfs -v sd3h
mkfs /dev/rsd3h 2021370 71 15 8192 1024 16 10 60 2048 t 0 -1
write error: 2021369
wtfs: I/O error

Taking a look at that partiton in the format table again:
        partition h - starting cyl    868, # blocks  2021370 (1898/0/0)
So it looks like there's a problem with the second to last block!
Anyone know what this is about?

Also I forgot to umount this drive (all mounted under the c partiton
to /data. I already backed it up, so I don't care what happens to the
contents, but is this bad to do for some other reason?

Finally, should I put my swap space on the faster drive too? I can
have my swap partition on a different drive from my boot partition if
I modify the kernal, right?

			Ed Hartnett
-- 
Edward Hartnett			ejh@khonshu.colorado.edu

Newsgroups: comp.sys.sun.admin