DFSMS, z/OS System Managed Storage
DFDSSSMS is a policy based storage management system used by IBM mainframes. SMS was designed to:
- Make storage more efficient
- Automate data management
- allow users to allocate data by service requirements, without needing to know the physical implementation of those requirements
By and large, those design requirements were met. These pages will not tell you everything about DFSMS, there are plenty of IBM manuals out there. What they will give you, is a general introduction, then some hints and tips on how to make SMS work.
SMS can decide what files look like, when they migrate between various types of storage, what type of performance they should get and what storage they are initially allocated to. These policies are determined by four constructs, the Data Class, Management Class, Storage Class and Storage Group, managed by ACS routines. Each of these constructs are detailed in the five sub-pages. To change the constructs, you need to use either ISMF or console commands. The following two sections discuss these in general terms
Changing DFSMS with ISMF
The Interactive System Management Facility is an
ISPF menu driven application used to control SMS.
If you use the Data Set or Volume options from the menu, then ISMF can be used for space monitoring and dataset reporting, and also to delete, backup, release free space, migrate, recall, copy and change the security access to datasets.
Your site will probably have ISMF as a menu item somewhere, but the TSO command TSO ISMF seems to work everywhere. The first time you use ISMF you will see a restricted panel like
Select one of the following options and press Enter: 0 ISMF Profile - Change ISMF User Profile 1 Data Set - Perform Functions Against Data Sets 2 Volume - Perform Functions Against Volumes 3 Management Class - Specify Data Set Backup and Migration Criteria 4 Data Class - Specify Data Set Allocation Parameters 5 Storage Class - Specify Data Set Performance and Availability 9 Aggregate Group - Specify Data Set Recovery Parameters L List - Perform Functions Against Saved ISMF Lists R Removable Media Manager - Perform Functions Against Removable Media X Exit - Terminate ISMF
Most people have been using SMS for so long, they forget that if new users want to see the full Storage Users menu list, you must take option '0', then option '0' again to change the user mode. You will then see a panel like
Specify the following: User Mode . . 1 (To specify your choice of session, type in a: 1 For an End User (EU) 2 For a Storage Administrator (SA) in the User Mode Field and Press Enter to Verify Your Selection.)
change your user mode to '2 For a Storage Administrator (SA)', press enter, then use PF3 until you get right out of ISMF. Go back in again, and you will see the full set of options. Most sites restrict access to this, either by restricting access to the change user panel (DGTDPPF5) with RACF, or with some local coding.
So what does ISMF do? Most of the options are self explanatory, and have good help screens behind them. Options 1 and 2 are used to report on datasets and volumes. Options 3-6 are used to change the SMS constructs, details of this are in the construct subpages.
Option 7 is used to manage the ACS routines, the menu system should be easy
to follow, and is discussed on the ACS
routines page. A couple of tips are;
When you translate or validate the ACS routines, you have to specify the output file for the messages. When you come out of the validation page, you get a message.
Specify Output Listing Disposition: Enter "/" to select option Print Output Listing Delete Output Listing
Its always best to select the Delete option. Why? Because it will probably be a few months before you do this again. By then, your output listing file will have migrated off to tape, and your screen will be locked up while you wait for it to come back.
The display option will tell you who last updated each of the four routines. This is useful when things go wrong, especially if it wasn't you.
SMS has three control datasets, the Active Control Dataset (ACDS) the Source Control Dataset (SCDS) and the Communications Dataset (CommsDS). The CommsDS is used to communicate SMS information between LPARS and contains information like storage pool occupancy statistics, SMS status and the name of the ACDS.
Updates are normally made to the SCDS, tested then promoted to the ACDS at activation time. This is explained more in the ACS routine page.
Option 8 is used to manage the control datasets. Your control datasets are defined in SYS1.PARMLIB(IGDSMS00) If you are not using the default '00' IGDSMS member, the actual member will be set in the ID Member in SYS1.PARMLIB(IEFSSN00)
SUBSYS SUBNAME(SMS) INITRTN(IGDSSIIN) INITPARM('ID=00,PROMPT=DISPLAY')
Finally, naming standards for SMS constructs. There are two opposing views here, and both have their merits.
- Make the naming standards meaningful, then you can tell what the construct does by its name. For example, you want a production management class which stays on primary disk for 7 days unused, migrates to ML1 for 10 days, then goes to ml2 for 2 years (or 730 days). A possible name for the management class is P071002Y. You can easily work out from the name exactly what that management class does. However, if you decide you want to change it to stay on ML1 for 20 days, you need to change the name, then run IDCAMS ALTERS to bind all existing files to the old name.
- Make the naming standards vague, and use ISMF to find out what they do. So you could call the above management class M0000001. The name means absolutely nothing, and you can change the attributes at will, without any issues.
Which is best? I like names which have some meaning, but there are times when too much meaning is a bad idea. For management classes, I would probably go for something like PRYEAR2, which simply means the file gets deleted after 2 years non-use, and the rest of the migration timings can be changed without affecting the name. Data classes are almost fixed by definition, so I'd probably make the dataclasses names meaningful. Storage classes can also be meaningful, while storage groups are usually a mixture of specific and general purpose, so the names should reflect that mixture.
Changing DFSMS with console commands
First, you need to issue these commands from a z/OS console or an ISPF console log screen. Console commands are often restricted, so you may not have the correct access level to allow you to issue the commands below.
is the display command that I find most useful. It will list out all the volumes defined to a storage pool, and show their status for every LPAR
will list out the names of the three SMS control datasets and the active LPARS in the SMS complex
will list out the cache statistics for SMS device
will show the status of SMS managed tape or optical libraries
SETSMS is used to change SMS runtime parameters
will refresh the SMS data in storage with the data in the ACDS
will activate a new SMS configuration, as changed in the SCDS file
VARY SMS is used to change the status of SMS constructs. You can specify one
LPAR, you can select ALL LPARS or the command will just default to the
LPAR that you are logged in to.
The first command will change the status of a volume called 'volser' to be in 'QUIESCE NEW' status for all LPARS, which means that existing allocations will work and extend as normal, but z/OS will not allocate any new files to this volume.
The second command will change the status of a volume called 'volser' to be in 'DIS NEW' status for all LPARS, which means that existing allocations will work, but will not get any new extents. Also, z/OS will not allocate any new files to this volume.
The third command will change the status of a volume called 'volser' to be in 'ENABLE' status for an LPAR called SYSB, which means that the volume is fully available for all new and existing allocations.
The final command will change the status of an entire storage group to be in 'QUIESCE NEW' status for the current LPAR.
V SMS,VOL(volser,ALL),Q,N V SMS,VOL(volser,ALL),D,N V SMS,VOL(volser,SYSB),E V SMS,SG(poolname),Q,N
The following two commands are used to process logical z/OS volumes, and while they are not SMS commands, they are very useful and this seems to be a good place to mention them
DEVSERV is used to display the status of volumes
Querying a disk address by volume name
Devserv qdasd,vol=zwc908 IEE459I 10.49.30 DEVSERV QDASD 647 UNIT VOLSER SCUTYPE DEVTYPE CYL SSID SCU-SERIAL DEV-SERIAL 1976 ZWC908 2105800 2105000 3339 E702 0175-28755 0175-28755
Querying disks by address, and getting path, PPRC and disk type status. This command will list 16 addresses starting with address 1970, but only the first two addresses are shown in the sample output. There is a wealth of information in this display including; There are two paths to these disks, D8 and C4, and both are enabled as indicated by the '+' symbol. These are both 3390-9 disks and are in SIMPLEX state, that is they are not mirrored. Cache fast write and Dasd Fast Write are both active and neither disk has pinned data.
devserv paths,1970,16 IEE459I 10.52.38 DEVSERV PATHS 733 UNIT DTYPE M CNT VOLSER CHPID= PATH STATUS RTYPE SSID CFW TC DFW PIN DC-STATE CCA DDC ALT CU-TYPE 1970,33909 ,A,000,OMV001,D8=+ C4=+ 2105 E802 Y YY . YY. N SIMPLEX 70 70 2105 1971,33909 ,A,010,SRES10,D8=+ C4=+ 2105 E802 Y YY. YY. N SIMPLEX 71 71 2105
Querying disks by address, and getting SMS status. The SYSRES volume is not SMS managed.
devserv sms,1970,16 IGD001I 10:53:35 DEVSERV SMS 741 UNIT DTYPE M VOLSER VOLSTAT STORGRP SGSTAT 1970,33909 ,A,OMV001,ENABLED SGOMVS ,ENABLED 1971,33909 ,A,SRES10,PRIV/RSDNT, VOLUME NOT MANAGED BY SMS 1972,33909 ,O,BW0903,ENABLED SGHPS ,ENABLED 1973,33909 ,O,BW0904,ENABLED SGHPS ,ENABLED 1974,33909 ,A,OMV002,ENABLED SGOMVS ,ENABLED
Querying address and getting the PAV status. Both these addresses are real disks, they are not PAV aliases
DEVSERV QP,1970,16 IEE459I 10.55.28 DEVSERV QPAVS 788 HOST SUBSYSTEM CONFIGURATION CONFIGURATION --------------- --------------------- UNIT UNIT UA NUM. UA TYPE STATUS SSID ADDR. TYPE ----- -- ---- ------ ---- ---- ---------- 01970 70 BASE E702 70 BASE 01971 71 BASE E702 71 BASE
Querying tape systems and getting a list of all defined tape drives
DEVSERV QT,TYPE=ALL IEE459I 10.57.26 DEVSERV QTAPE 829 UNIT DTYPE DSTATUS CUTYPE DEVTYPE CU-SERIAL DEV-SERIAL ACL LIBID 0B37 3490 ON-NRD 3490A20 3490B40 XX10-12037 XX10-12037 0C00 3590L ON-RDY 3590A60 3590E1A* 0178-35790 0178-35790 I 17440 0C01 3590R ON-RDY 3590A60 3590E1A* 0179-35791 0179-35791 I 17441
Querying tape libraries to get a list of defined libraries
DEVSERV QLIB,LIST IEE459I 10.59.03 DEVSERV QLIB 859 The following are defined in the ACTIVE configuration: *19966 *17440 *32991 *17441 *02001 *02002
Querying tape libraries, and getting a list of libraries complete with defined tape drives
DEVSERV QLIB,LISTALL IEE459I 10.59.27 DEVSERV QLIB 879 The following are defined in the ACTIVE configuration: LIBID PORTID DEVICES 19966 08 0E36* 0E34* 0E33* 0E35* 0E32* 0E37* 0E30* 0E31* 06 0E20* 0E22* 0E23* 0E24* 0E21* 0E25* 0E26 0E27 07 0E28* 0E29* 0E2A* 0E2B* 0E2C* 0E2D* 0E2E 0E2F LIBID PORTID DEVICES 17440 06 0A31* 0A33* 0A32* 0A34* 0A35* 0A30* 0A36 0A37 07 0A38* 0A39* 0A3B* 0A3A* 0A3C* 0A3D* 0A3E 0A3F 08 0A40* 0A41* 0A42* 0A43* 0A44* 0A45* 0A46* 0A47*
Querying a range of tape drives by unit address using the display command
D U,,,0A36,4 IEE457I 11.01.06 UNIT STATUS 929 UNIT TYPE STATUS VOLSER VOLSTATE 0A36 359L OFFLINE /REMOV 0A37 359L OFFLINE /REMOV 0A38 359L OFFLINE /REMOV 0A39 359L A-PND 04=GTA PRIV/REMOV
The 04=GTA means that 0A39 is online and in use to another LPAR
Querying a range of disk volumes by unit address using the display command
D U,,,1970,1 IEE457I 11.02.45 UNIT STATUS 950 UNIT TYPE STATUS VOLSER VOLSTATE 1970 3390 A OMV001 PRIV/RSDNT
Varying volumes on and off line to all attached LPARS using the route command. This is useful for initialising volumes, but you must check the syslog after issuing the command and make sure the volume comes offline to every LPAR before proceeding
RO *ALL,V B10B,OFFLINE RO *ALL,V B10B,ONLINE
Varying a range of volumes offline to current LPAR (be very careful with this one!)