On Tuesday, 02/03/2015 at 01:43 EST, Michael Harding/Oakland/IBM@IBMUS
wrote:
> I have to take exception.

I get that alot, but forgive you.  :-)

> The allocation map like the directory is at heart just another file.
> Changed block(s) in the allocation map get re-written in a different
> location as part of the safe updating of a minidisk's metadata.  It's
size,
> too, is at least partly malleable.  Pulling from another of your posts,
> allocate and format a 200-cylinder minidisk.  That's big enough for the
> allocation map to be larger than one disk block.  It will actually
occupy
> 3: two data and one index block to which the directory points.  Now
recomp
> the disk to 150 cylinders.  The allocation map will now fit in a single
> block and that's all that gets written.  If you later recomp back to 200
> cylinders (as you pointed out, that's do-able) the allocation map will
grow
> back to its original size and its directory entry updated accordingly.

I already said that you can recomp the disk back up to its original size
without problems.  Even so, I got curious (ouch!) and went and looked at
DMSFOR and DMSAUD again, and here's what I got to work:

1. Format the additional cylinders using the same block size as the
original.  Do this with a separate  minidisk, as the FORMAT command
requires that you start on cylinder 0.  This disk must be adjacent to the
old disk.  If you don't do this, then CMS will eventually get I/O errors
on the disk.  Not today, but someday.  N.B. A while back I looked at
updating FORMAT to allow you to format arbitrary extents, with or without
a label.

2. DETACH the current minidisk.

3. Change the MDISK definition for the original disk to include the extra
cylinders and rewrite the directory.

4. LINK the disk.  It now has extra cylinders on the end.  If it doesn't,
go to step 2.

5. Change the ADTMCYL field on disk label to reflect the new cylinder
count, making it look like the disk has been RECOMPed.  ADTMCYL is a
fullword located at offset +24 (decimal) into record 3 of cylinder 0 track
0 (the label).

I used DITTO to change it.  A simple pipe with MDISKBLK READ and WRITE
would easily do it, but be careful since MDISKBLK requires the disk to the
ACCESSed.  (Why?  The blocksize is located on the label, too.)

6. FORMAT vaddr fm <new_size> ( RECOMP

I tested this by using temp disks of different sizes and DDR to copy the
small one to a larger one that I had previously formatted.

Alan Altmark

Senior Managing z/VM and Linux Consultant
Lab Services System z Delivery Practice
IBM Systems & Technology Group
ibm.com/systems/services/labservices
office: 607.429.3323
mobile; 607.321.7556
[email protected]
IBM Endicott

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
----------------------------------------------------------------------
For more information on Linux on System z, visit
http://wiki.linuxvm.org/

Reply via email to