* Help me understand disk partitioning!
@ 1991-07-16 9:07 Tom Ivar Helbekkmo
1991-07-16 11:52 ` Klaus Steinberger
0 siblings, 1 reply; 3+ messages in thread
From: Tom Ivar Helbekkmo @ 1991-07-16 9:07 UTC (permalink / raw)
We've got a few DECstations here, and I'll be upgrading them to Ultrix
version 4.2 shortly. At the same time, I'll be reconfiguring my disks,
moving them around between machines a bit and so on. Thus, I'll need
to repartition a bit, and I figure this would be a good time to get it
right! :-)
I'll be using RZ24s, RZ55s, RZ57s, Wren VIs and Wren VIIs. I'll have
to make /etc/disktab entries for the non-DEC disks, but the RZ ones
are already there, so should be no problem, right? Wrong -- I think!
Here's my reasoning so far:
I'll want to redefine the partition sizes somewhat from the standard
ones, because I like to be able to have genvmunix, vmunix and my old
vmunix (prior to the last rebuild) all in the root directory, just to
be sure, and I want to have a bit of free space even then. When doing
this, I understand that it's important to keep partition boundaries
at cylinder boundaries on disk. Here's the first question already:
How come the 'a' partition has 32768 512-byte blocks by default on all
these RZ disks? Won't that miss cylinder boundaries for some of them?
Looks that way to me... Hmmm...
Anyway, let's do some calculations. Looking at the RZ24 entry, it
says the disk has 38 secs/track, 8 tracks/cyl and 1348 cylinders.
Also, the 'c' partition is said to be 409792 sectors. Yup, 38*8*1348
is 409792, so that looks good. The cylinder size is then 304 sectors,
and if I want to get an even number of 8192 byte blocks in a cylinder
group, there can be any number of cylinders per group (within the
filesystem restrictions, of course), because there are exactly 19
such blocks per cylinder. No problem, and I've obviously understood
how to do this! Or so I thought, anyway, until I looked at the next
disk...
The RZ55 has 36 secs/track, 15 tracks/cyl and 1224 cylinders, for a
total of 649040 sectors per disk. But wait! 36*15*1224 is 660960!
Hmmm... The difference is 11920 sectors. Where might they be? How
about spare sectors per track, or cylinder, or something? Nope, I
guess not, since 11920 doesn't divide into either of 36, 15 or 1224.
Further attempts to reason about this have me completely stymied!
The same thing goes for RZ57 disks. Looking at the Wren disks, I
see I also have the same problem there. The Wren VI has 31 secs/track,
15 tracks/cyl and 1632 cylinders, while the Wren VII has 71 secs/track,
15 tracks/cyl and 1931 cylinders. Hooking up the disks gives me
1295850 sectors total for the VI, and 2026965 sectors for the VII,
as indicated by '/etc/chpt -q /dev/rrz1c'. I can't make these numbers
into anything that adds up correctly.
Any help will be immensely appreciated! I guess my reasoning must
be faulty, so if someone would point out where I'm going wrong, and
how this should be done, I'll be very happy indeed! :-)
-tih
--
Tom Ivar Helbekkmo, NHH, Bergen, Norway. Telephone: +47-5-959205
Postmaster for domain nhh.no. Internet mail: tih@barsoom.nhh.no
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Help me understand disk partitioning!
1991-07-16 9:07 Help me understand disk partitioning! Tom Ivar Helbekkmo
@ 1991-07-16 11:52 ` Klaus Steinberger
1991-07-16 13:30 ` Stefan Esser
0 siblings, 1 reply; 3+ messages in thread
From: Klaus Steinberger @ 1991-07-16 11:52 UTC (permalink / raw)
tih@barsoom.nhh.no (Tom Ivar Helbekkmo) writes:
>The same thing goes for RZ57 disks. Looking at the Wren disks, I
>see I also have the same problem there. The Wren VI has 31 secs/track,
>15 tracks/cyl and 1632 cylinders, while the Wren VII has 71 secs/track,
>15 tracks/cyl and 1931 cylinders. Hooking up the disks gives me
>1295850 sectors total for the VI, and 2026965 sectors for the VII,
>as indicated by '/etc/chpt -q /dev/rrz1c'. I can't make these numbers
>into anything that adds up correctly.
I don't know about the RZ57, but the Wren VII uses Zone Bit Recording,
so you have a different number of sectors depending on the track.
(On the outside there are more sectors than on the inside!)
So there is not a sector/track number, only a estimate. The real number
of sectors on the overall disk can only be get by the SCSI size command.
That's that you get by '/etc/chpt ........'
Sincerely,
Klaus Steinberger
--
Klaus Steinberger Beschleunigerlabor der TU und LMU Muenchen
Phone: (+49 89)3209 4287 Hochschulgelaende
FAX: (+49 89)3209 4280 D-8046 Garching, Germany
BITNET: K2@DGABLG5P Internet: k2@bl.physik.tu-muenchen.de
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Help me understand disk partitioning!
1991-07-16 11:52 ` Klaus Steinberger
@ 1991-07-16 13:30 ` Stefan Esser
0 siblings, 0 replies; 3+ messages in thread
From: Stefan Esser @ 1991-07-16 13:30 UTC (permalink / raw)
The logical structure of SCSI disks doesn't closely represent the physical
sector layout. There are typically 1 to 3 alternate sectors per cylinder and
1 or 2 reserved cylinders, in case there are more than 3 bad sectors in any
cylinder.
[Ultrix lets you display these parameters with the command:
'rzdisk -g current /dev/rrz0c'
^-- insert appropriate device, use partition 'c'!]
This is the reason for some other problems, not only does Ultrix loose blocks
by trying to align partitions to cylinder boundaries, but in fact the resulting
file systems are (nearly) guaranteed not to begin or end on a cylinder
boundary. Ultrix calculates sectors per cylinder by multiplying sectors by the
number of heads, but without subtracting the alternate sectors...
That makes it look like you can't access the inner 20 tracks of the drive.
There are some more bad things that happen because of the wrong idea the
kernel has about the disk layout. These confuse the optimisation heuristics
of the Berkeley Fast File System. The result is a lot of head movement
between adjacent cylinders. The file system tries to put adjacent file blocks
into one cylinder as long as possible. But because of the alternate blocks,
the cylinder boundary is at another place than the kernel expects it to be.
So, the kernel put the blocks in the upper half of one and the lower of the
other cylinder.
It would be nice if DEC did something about this...
Stefan
--
Stefan Esser, Institute of Nuclear Physics, University of Cologne, Germany
se@IKP.Uni-Koeln.DE [134.95.192.50]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1991-07-16 13:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1991-07-16 9:07 Help me understand disk partitioning! Tom Ivar Helbekkmo
1991-07-16 11:52 ` Klaus Steinberger
1991-07-16 13:30 ` Stefan Esser
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox