[comp.sys.hp] Disktab, newfs SCSI drives on HP9000/370

dave@pmafire.UUCP (Dave Remien) (09/29/89)

OK, all you cognizant HP types out there in netland:

I'm pretty (no, make that totally) confused by the following disktab
stuff on my two 370s, both with HP7959S drives (one with two), running
HP-UX version 6.5. 

Let me explain a bit more:

On my machine with two 7959S drives, I'm trying to split 24 megs of swap
space between the two disks, 12 megs a piece. The disktab entries follow.
(Stock HP).

###############################################
# The HP7959S has 12 surfaces (6 platters)
# Total formatted capacity: 323 MBytes
hp7959S_noswap|HP7959S_noswap:\
        :No swap:ns#16:nt#12:nc#1643:\
        :s0#315456:b0#8192:f0#1024:\
        :se#256:rm#3350:
hp7959S|HP_7959S:\
        :42 MBytes swap:ns#16:nt#12:nc#1419:\
        :s0#272448:b0#8192:f0#1024:\
        :se#256:rm#3350:
hp7959S_16MB|HP7959S_16MB:\
        :16 MBytes swap:ns#16:nt#12:nc#1472:\
        :s0#298906:b0#8192:f0#1024:\
        :se#256:rm#3350:
hp7959S_32MB|HP7959S_32MB:\
        :32 MBytes swap:ns#16:nt#12:nc#1472:\
        :s0#282624:b0#8192:f0#1024:\
        :se#256:rm#3350:

See anything weird about this yet? I'm baffled by the fact that nc for
the 16MB swap and 32MB swap entries are *exactly* the same.  Looking at
the 42MB swap and no swap entries, I'm led to believe that:

a. nc goes down by 5.333 cylinders per MB of swap

and

b. s0 (roughly) goes down by 1024 sectors per MB of swap.

Except for the 16MB swap entry.

OK. I make a new entry for my two 7959S drives that I want to have 12 MB
of swap each like so:

hp7959S_12MB|HP7959S_12MB:\
        :12 MBytes swap:ns#16:nt#12:nc#1578:\
        :s0#303168:b0#8192:f0#1024:\
        :se#256:rm#3350:


Then I turn newfs loose, and it *tells* me that its making a 310MB file
system on my drive. The kicker is from df:

/extra           (/dev/dsk/1s0   ):   511436 blocks        139388 i-nodes
                                      568284 total blocks  139392 total i-nodes
                                          18 used  blocks       4 used i-nodes
                                          10 percent minfree

/                (/dev/dsk/0s0   ):    40612 blocks        129031 i-nodes
                                      568284 total blocks  139392 total i-nodes
                                      470842 used  blocks   10361 used i-nodes
                                          10 percent minfree

Or, if you're a dfspace type,

Disk space ( /extra    ): 249.72 MB of 277.48 MB available (90.00%),
Disk space ( /         ): 19.97 MB of 277.48 MB available ( 7.20%),

Total disk space: 269.70 MB of 554.96 MB available (48.60%).


Which tells me that I've got either a 290961408 byte or a 277.5MB (not
the same, but I haven't gone back thru dfspace to see what it's awking)
file system, but certainly not a 310Mb file system. 

My question is, where did it (my extra 20MB or 30MB) go? What the heck
is going on??????? Is disktab as messed up as I think it is? Am I all
wet?

Anybody?

-- 
Dave Remien - WINCO Computer Eng. Group -{uunet | bigtex}!pmafire!dave- 
"And who's birthday is today?"     "Why, nobody, Hugh" 		(Firesign
"In history, Patty, before they changed the water...."           Theater)

linas@hpuarca.HP.COM (Linas Petras) (10/01/89)

It appears that you have not taken into account the i-nodes that are also 
allocated from the filesystem when it is built. The default inodes for your
disk (~127000) take up disk space also. Try reducing the number of inodes
using the -i option to mkfs or newfs if you want more disc space. Note, however
that reducing the total number of inodes can be dangerous to your health :-)
when the filesystem starts to get close to being full.


Linas Petras
Hewlett Packard Aust Ltd
Australasian Response Center
31 Joseph St, Blackburn.	UUCP:  ...!hplabs!hpcea!hpausla!hpuarca!linas
				INTERNET  linas@hparc0.HP.COM
Victoria 3130., Australia       ACSNET: linas@hpuarca.hp.oz

[ The comments, views, opinions and requests expressed in this note are my own]
[ and have nothing to do with my employeer, nor do I know why I am making them]
[ as I have nothing to say  :-)                                               ]

kinsell@hpfcdj.HP.COM (Dave Kinsell) (10/02/89)

/ hpfcdj:comp.sys.hp / dave@pmafire.UUCP (Dave Remien) / 9:53 am  Sep 29, 1989 /


>On my machine with two 7959S drives, I'm trying to split 24 megs of swap
>space between the two disks, 12 megs a piece. The disktab entries follow.
>(Stock HP).

I think someone's been hacking your disktab.  There's no 16MB entry
shipped on 6.5 systems.


>b. s0 (roughly) goes down by 1024 sectors per MB of swap.

Since ns and nt are constants, you can't always decrease s0 by
exactly 1024 and end up with a whole number for nc.


>OK. I make a new entry for my two 7959S drives that I want to have 12 MB
>of swap each like so:

>hp7959S_12MB|HP7959S_12MB:\
>        :12 MBytes swap:ns#16:nt#12:nc#1578:\
>        :s0#303168:b0#8192:f0#1024:\
>        :se#256:rm#3350:


You don't have ns*nt*nc=s0.  This isn't fatal, but it will waste a
bit of space.


>Then I turn newfs loose, and it *tells* me that its making a 310MB file
>system on my drive. The kicker is from df:

The use of 'Mb' by newfs is unfortunate.  It really means 310 million
bytes, as in 303168*1024=310444032.  This is the total number of bytes
being used by the file system, not the usable storage.  There's a fair
amount of overhead, primarily for inodes.

When allocating swap space on the disc, you need to work in units of 2^20
bytes instead of 10^6 bytes, since the swap mechanism is dealing with
physical RAM.


>My question is, where did it (my extra 20MB or 30MB) go? What the heck
>is going on??????? Is disktab as messed up as I think it is? Am I all
>wet?

Doing a newfs -i 16384  with the standard 7959S entry gives an additional
14 meg of available space.  You would risk running out of inodes if
you did this, if you have a large number of small files.  Something
like 4096 should be fairly safe. 


-Dave Kinsell
 kinsell@hpfcmb.HP.COM


"This is not an official statement of the Hewlett Packard Company.  In
 no way, shape, or form.  They disavow all knowledge of my actions.  In
 fact, they don't even know I spend Sunday afternoons typing this
 stuff."