What is the process to convert CSM file systems from HFS to ZFS?
Release : 6.0
Component : Chorus Software Manager
//SYSIN DD *
Select * from mountpoint;
Select * from userconfig;
/*
ISPSTART CMD(BPXWH2Z -VC /fromstring/tostring/ <dataset mask of HFS datasets to convert>)
So, to convert all of the datasets named MF20.MSM.HFS to MF20.MSM.ZFS, we would use the following:
ISPSTART CMD(BPXWH2Z -VC /HFS/ZFS/ MF20.MSM.HFS)
//SYSIN DD *
UPDATE mountpoint
SET mountpoint.MP_OPTIONS = ' system;ZFS'
WHERE mountpoint.MP_TYPE =’APLROOT’;
UPDATE mountpoint
SET mountpoint.MP_OPTIONS = 'ZFS'
WHERE SUBSTR(mountpoint.MP_DATASET,1,??) =’<HFS HLQ>’ AND
mountpoint.MP_OPTIONS =’HFS’;
UPDATE mountpoint
SET mountpoint.MP_DATASET = '<new ZFS HLQ>' ||
SUBSTR(mountpoint.MP_DATASET,##)
WHERE SUBSTR(mountpoint.MP_DATASET,1,??) =’<HFS HLQ>’;
UPDATE USERCONFIG
SET VALUE='ZFS'
WHERE KEY= ‘mpmFilesystemType’;
UPDATE USERCONFIG
SET VALUE='<new ZFS HLQ>'
WHERE KEY= ’mpmHlq’;
NOTE: The remainder of these parameters will only be required if the allocation attributes will change for the ZFS file system datasets.
UPDATE USERCONFIG
SET VALUE='<new ZFS allocation attribute>'
WHERE KEY= ’mpmAllocation’;
UPDATE USERCONFIG
SET VALUE='<new ZFS volser>'
WHERE KEY= ’mpmVolser’;
UPDATE USERCONFIG
SET VALUE='<new ZFS UNIT>'
WHERE KEY= ’mpmUnit’;
UPDATE USERCONFIG
SET VALUE='<new ZFS StorClass>'
WHERE KEY= ’mpmStorclas’;
UPDATE USERCONFIG
SET VALUE='<new ZFS MgmtClas>'
WHERE KEY= ‘mpmMgmtclas’;
UPDATE USERCONFIG
SET VALUE='<new ZFS Dataclas>'
WHERE KEY= ‘mpmDataclas’;
/*
NOTES on Control Cards
//SYSIN DD *
Select * from mountpoint;
Select * from userconfig;
/*
Verify Content of Mountpoint Table from STDOUT sysout, ensuring MP_DATASET and MP_OPTIONS now reflect ZFS
Verify Content of UserConfig Table from STDOUT sysout, ensuring the HLQ and allocation parameters are correct for ZFS datasets, including the following:
mpmFilesystemType
mpmHlq
mpmAllocation
mpmVolser
mpmUnit
mpmStorclas
mpmMgmtclas
mpmDataclas
//* PORT 22041
//*************************************************************
//* LICENSED MATERIALS - PROPERTY OF IBM
//* 5694-A01
//* COPYRIGHT IBM CORP. 2002, 2008
//*
//* THIS JCL WILL RUN THE BPXWH2Z(HFS TO ZFS MIGRATION)
//* CONVERSION TOOL AS AN ISPF BATCH JOB.
//*
//* CAUTION: THIS IS NEITHER A JCL PROCEDURE NOR A COMPLETE
//* JOB. BEFORE USING THIS JOB STEP, PLEASE INSPECT IT
//* CAREFULLY FOR ANY CHANGES THAT ARE NECESSARY TO MAKE IT
//* FIT FOR YOUR INSTALLATION'S NEEDS.
//*
//* NOTES:
//*
//* 1. ADD THE JOB PARAMETERS TO MEET YOUR SYSTEM REQUIREMENTS
//*
//* 2. RUN ONLY THE STEPS THAT ARE APPLICABLE TO YOUR
//* INSTALLATION.
//*
//* 3. THIS JOB WILL COMPLETE WITH A COMPLETION CODE 0 IF
//* SUCCESSFUL, OR WITH A COMPLETION CODE 8 IF IT
//* ENCOUNTERS ANY ERROR WHILE RUNNING THE TOOL FOR
//* SINGLE HFS DATA SET MIGRATION.
//*
//* 4. FOR MULTIPLE HFS DATA SET MIGRATIONS, THIS JOB WILL
//* COMPLETE WITH A COMPLETION CODE 0 IF SUCCESSFUL, OR
//* WITH A COMPLETION CODE 8 IF NO MIGRATIONS WERE
//* SUCCESSFUL, OR WITH A COMPLETION CODE 4 IF ONE OR
//* MORE MIGRATION IS SUCCESSFUL, BUT ATLEAST ONE FAILED.
//*
//* 5. CHECK THE JOB OUTPUT FOR EXECUTION INFORMATION
//* INCLUDING ERROR DETAILS.
//*
//* 6. THE ZFS DATA SETS CANNOT BE PRE-ALLOCATED WHEN ISPF
//* BATCH JOB METHOD IS USED FOR BPXWH2Z CONVERSION TOOL.
//*
//* 7. SYSEXEC DD SPECIFIES THE BPXWH2Z REXX EXEC LOCATION.
//*
//* 8. SYSTSPRT DD SPECIFIES THE OUTPUT LOG.
//*
//* 9. SYSTSIN DD SPECIFIES THE ISPSTART CMD WITH PARMS.
//*
//* STATUS= HBB7750
//*
//* $P0=MEXXXXX HBB7750 070910 PD2R: INITIAL ISPF BATCH JCL
//*
//***************************************************************
//ISPBTCH EXEC PGM=IKJEFT01,
// DYNAMNBR=40,TIME=1440
//STEPLIB DD DSN=ISP.SISPLPA,DISP=SHR,DCB=BLKSIZE=32760
// DD DSN=ISP.SISPLOAD,DISP=SHR
// DD DSN=SYS1.MIGLIB,DISP=SHR
// DD DSN=SYS1.SCBDHENU,DISP=SHR
// DD DSN=ISF.SISFLOAD,DISP=SHR
//SYSTSIN DD *
ISPSTART CMD(BPXWH2Z -VC /HFS/ZFS/ YOUR.HLQ.FILE.SYSTEM.HFS )
//SYSTSPRT DD SYSOUT=*
//ISPLIST DD SYSOUT=A,DCB=(LRECL=121,BLKSIZE=1210,RECFM=FBA)
//ISPLOG DD SYSOUT=A,DCB=(LRECL=125,BLKSIZE=129,RECFM=VA)
//SYSEXEC DD DSN=SYS1.SBPXEXEC,DISP=SHR
//*
//SYSUADS DD DSN=SYS1.UADS,DISP=SHR
//SYSLIB DD DSN=SYS1.MACLIB,DISP=SHR
//SYSHELP DD DSN=SYS1.HELP,DISP=SHR
//ISPPLIB DD DSN=SYS1.SBPXPENU,DISP=SHR
// DD DSN=ISP.SISPPENU,DISP=SHR
//ISPMLIB DD DSN=SYS1.SBPXMENU,DISP=SHR
// DD DSN=ISP.SISPMENU,DISP=SHR
//ISPSLIB DD DSN=ISP.SISPSENU,DISP=SHR
//ISPTLIB DD DSN=SYS1.SBPXTENU,DISP=SHR
// DD DSN=ISP.SISPTENU,DISP=SHR
//ISPPROF DD DISP=NEW,UNIT=3390,SPACE=(CYL,(1,1,5)),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=3120)
//ISPTABL DD DISP=NEW,UNIT=3390,SPACE=(CYL,(1,1,5)),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=3120)
//SDSFMENU DD DSN=ISF.SISFPLIB,DISP=SHR
To use BPXWH2Z in general, that is, not being related to any specific product use this command from the TSO ready prompt:
ISPSTART CMD(BPXWH2Z -VC /HFS/ZFS/ YOUR.HLQ.FILE.SYSTEM.HFS )
File systems being converted should first be unmounted.
If the file system dataset name such as YOUR.HLQ.FILE.SYSTEM.HFS is just a prefix HLQ for multiple file systems such as YOUR.HLQ.FILE.SYSTEM.HFS.* then they should all be unmounted. If YOUR.HLQ.FILE.SYSTEM.HFS represents just one file system then only one will be converted.
To convert HFS to ZFS manually.
First I allocated the ZFS file system in batch which gives me control using this JCL:
//DEFINRW EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//AMSDUMP DD SYSOUT=*
//SYSIN DD *
DELETE HLQ.HFS2ZFS.ZFS CLUSTER
SET MAXCC=0
DEFINE CLUSTER ( -
NAME(HLQ.HFS2ZFS.ZFS ) -
MANAGEMENTCLASS(MCMPT) -
STORAGECLASS(SCMPT) -
DATACLASS(DCMPT) -
LINEAR CYL(500 10) -
SHAREOPTIONS(3,3) -
)
/*
//*
//*-------------------------------------------------------------------
//* Format the zFS aggregate for RW zFS
//* (compatibility mode aggregates)
//*-------------------------------------------------------------------
//*
//FMTRW EXEC PGM=IOEAGFMT,REGION=0M,
// PARM=('-aggregate HLQ.HFS2ZFS.ZFS -compat')
//SYSPRINT DD SYSOUT=*
//STDOUT DD SYSOUT=*
//STDERR DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//CEEDUMP DD SYSOUT=*
//*
//ETNRWZFS EXEC PGM=IKJEFT01,REGION=4096K,DYNAMNBR=50
//SYSTSPRT DD SYSOUT=*
//SYSTSOUT DD SYSOUT=*
//SYSTSIN DD *
MOUNT FILESYSTEM('HLQ.HFS2ZFS.ZFS') +
TYPE(ZFS) MODE(RDWR) +
PARM('AGGRGROW') +
MOUNTPOINT('/plexc1/u/users/barra01/HFSZFS')
Go into OMVS and do a cd to the path where the HFS file to be converted to ZFS is mounted. For example
cd /plexc1/u/users/barra01/HFS
An HFS file system HLQ.FILE.SYSTEM.HFS is mounted to /plexc1/u/users/barra01/HFS
The new ZFS is mounted to /plexc1/u/users/barra01/HFSZFS as can be seen in the JCL above.
After the cd to the HFS path:
pax -rw -peW -XCM . \ <<<hit enter
/plexc1/u/users/barra01/HFSZFS <<< hit enter
It says running then changed to input. This did the conversion.
Now HLQ.FILE.SYSTEM.HFS which is still HFS and it's ZFS equivalent of HLQ.HFS2ZFS.ZFS