[comp.unix.ultrix] disk partitioning

farrell@pangea.Stanford.EDU (Phil Farrell) (05/03/91)

In article <JTKOHL.91May1105340@quicksilver.MIT.EDU> jtkohl@MIT.EDU (John T Kohl) writes:
>In article <1005@aerodec.anu.edu.au> tridge@aerodec.anu.edu.au (Andrew Tridgell) writes:
>
>> Basically my questions to the net are :
>
>> 	- what caused the problem in the first case
>
>The symptoms you describe exactly match my experience from about 5 years
>ago with a 4.2BSD filesystem.
>
>The 4.xBSD fsck wants to read its disk blocks in groups of 4.  The
>partition size you have (by default, unfortunately) is not a multiple of
>four.  When reading the last two blocks, fsck gets a short read and gets
>confused.
>
>John Kohl <jtkohl@MIT.EDU>

This brings up the issue of why Digital Equipment insists upon shipping
systems with unreasonable default disk partitioning.  I NEVER use the 
default partitions from DEC - if nothing else, they are never optimized
to be on cylinder group boundaries, as newfs would like, so they often 
end up wasting space - as much as a megabyte on a large partition.  Now
we hear of a more subtle problem with DECs default partitionings.  I would
like DEC to expend a little energy to carefully design its default 
disk partitions (both in the superblock (chpt) and in /etc/disktab) so
they fall on cylinder group boundaries.  Meanwhile, you can do it yourself.
Just remember that newfs wants to put 16 cylinders in a group, and using
the geometry information from /etc/disktab, compute disk partition boundaries
that fall on integral cylinder group boundaries.  Use chpt to change
the on-disk partition table to these more efficient boundaries on your new
disks (it will wipe out anything already on the disk).  For your system 
disk, when you boot the Ultrix installation tape, choose the "System Management"
option instead of Basic or Advanced installation, and you will get a 
"mini" UNIX with a Bourne shell and access to a few basic commands, 
including /etc/chpt.  You can then repartition your system disk, reboot
the installation tape, and do an Advanced Installation to use your new
custom partitions.

-Phil Farrell, Computer Systems Manager
Stanford University School of Earth Sciences
farrell@pangea.stanford.edu

tridge@anu.oz.au (Andrew Tridgell) (05/03/91)

I've now fixed the problem and have given back the loaned disk (It felt
good having 1.2Gb but it couldn't last :-)

I heartily agree with the poster who said that DEC should supply the
disk with sensible partition tables and disktab entries. It is very
sloppy to bung in any old partition entries without considerable thought
as to the consequences.

What I finally did was to chpt the old disk to reduce the g pattition to
a multiple of four, then a newfs and a dump/restore from the new
(loaned) disk. fsck is now happy with our file system, so I can finally
do things remotely. I'm also very glad someone could give me a logical
explanation of the problem (MANY thanks to John Kohl), so I can rest in
peace, knowing ( I hope :-) ) that it isn't going to jump on me again
when I move some more files.

Thanks to everyone who took the time to reply, the help was much
appreciated. (and thanks to DEC for the loan of the disk - doing all
this via tape would have been a real pain)

Andrew


--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Andrew Tridgell                 CSLab, Research School of Physical Science
tridge@aerodec.anu.edu.au       Australian National University
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

paul@caen.engin.umich.edu (Paul Killey) (05/06/91)

Someone, writes

 >The symptoms you describe exactly match my experience from about 5 years
 >ago with a 4.2BSD filesystem.

In many respects, using Ultrix requires a trip in the wayback machine
and some recollection about what was the case in 1985.