Short answer: consider pre-formatting just one or two reference volumes
using 'dasdfmt' and maybe also 'fdasd -a' then DDR the reference
(outside of Linux), re-labeling as needed.

Get one disk that works, then copy it, changing only what must be changed.


On 11/03/2014 01:25 PM, Shedlock, George wrote:
>    ...
>
> When we create the guest we format and label the volumes using ICKDSF.

So you're pre-formatting the volumes outside of Linux space. Am I
understanding correctly?


> According to the Cookbook one of the first steps in making the disk available 
> to zLinux is to run a dasdfmt command against the disk.

So ... 'dasdfmt' means CDL.
CDL was created for exactly one purpose: compatibility with z/OS.


> According to “Device Drivers, Features, and Commands on Red Hat Enterprise 
> Linux 7”, dasdfmt has an option –k 
>   
> -k or --keep_volser
> keeps the volume serial number when writing the volume label (see VOLSER).
> Keeping the volume serial number is useful, for example, if the volume serial
> number was written with a z/VM tool and should not be overwritten. 

The above suggests CPVOL should work. But I have my doubts. (Perhaps an
IBMer will chime in.)


> However, whenever we try to run dasdfmt with that option we get the following 
> error
>   
> [root@dcvml29 ~]# dasdfmt -b 4096 -y -v -k -f /dev/dasdf
> dasdfmt: VOLSER not found on device /dev/dasdf 

This sounds like either 'dasdfmt' or the driver (or both) got heartburn
over the existing volser.


> I’ve tried various kinds of formats
>   
> CPVOL FMT MODE(ESA) UNIT(7625) VFY(0X0400) VOLID(VH2905) -
> RANGE(0,10016)
>
> INIT UNIT(7625) VFY(VH2905) VOLID(VH2905) -
> CYLRANGE(0,10016) -
> PURGE NOVALIDATE VTOC(000,01,14) INDEX(015,00,15) 
>  
> And using CPFMTXA but nothing I do writes a VOLSER that RedHat will find on 
> the volume.

The CPVOL command in ICKDSF specifically says it initializes  a volume
for use by VM (CP).

I can tell you from experience that "initialize for use by CP" is not
always required in order for CP to mount the disk. (These are clearly
not CP Owned vols.) So ... CP is a bit forgiving here (where MVS and
even Linux might be confused).


> The Cookbook implies (around that same page) but doesn’t come out directly to 
> say that –k doesn’t work as designed.  Do you know of any way that we can 
> format a DASD volume on zVM and have the VOLSER be acceptable to zLinux?

I don't recall having personally tried the "--keep_volser" option.

There are several possibilities. Stick with your basic requirement and
perhaps running 'dasdfmt' and/or 'fdasd' is not actually needed.

CDL (the tools and the driver) puts an MVS-compatible VTOC (and VOLSER)
in the first track.
The rest of the disk is pre-blocked exactly the same as you'd get from
the CMS 'FORMAT' command (except there's no CMS EDF filesystem, because
that's not compatible with MVS). Linux then uses that pre-blocked
storage the same way CMS does.

If physical init is not required (and CKD has been emulated for 20 years
already) then 'DDR' is typically sufficient to get the entire volume
copied from reference source disk to deployment target disk. It will
copy the empty blocks (and the magical CDL track) laying things out
exactly as Linux will want.



-- 

Rick Troth
Senior Software Developer

Velocity Software Inc.
Mountain View, CA 94041
Main: (877) 964-8867
Direct: (614) 594-9768
[email protected] <mailto:[email protected]>

----------------------------------------------------------------------
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