How to Add Disk Space to a MUSIC/SP System ========================================== File: addspace.txt Author: Dave Edwards Original: Mar 4, 2005 Last update: Oct 18, 2006 When you add files to a MUSIC/SP system, for example from a distribution .arc file via the MFREST utility, you must have enough free, unfragmented disk space in the MUSIC/SP Save Library for the new files. If you need to add space, this file tells you how to do it. A MUSIC/SP system consists of 1 or more disk volumes, usually of type FBA (Fixed-Block Architecture, 512-byte blocks, IBM device type 3370). If you are using a mainframe emulator such as Hercules or Sim390, each volume is a PC file. For example, volume MUSICX may be file musicx.vol. This correspondence is defined in your emulator's configuration file. You can run the UCB utility in MUSIC/SP to list the available volumes. Device numbers, defined in MUSIC's nucleus but with no assigned volume, are listed without any volume name. Here is sample output of UCB: ------------------------- UCB sample output ----------------------- ucb *In progress UCB - Unit Control Blocks for Disk/Tape Number of UCBs: 14 UCB length: 40 (dec), 0028 (hex) Seq Addr Dev# Flg1,2,3 Type Volume Errs DevBlk 0 873EE8 201 A0 81 20 08 FBA MUSICX 0 873BB8 1 873F10 202 A0 00 00 08 FBA 0 2 873F38 203 A0 00 00 08 FBA 0 3 873F60 204 A0 00 00 08 FBA 0 4 873F88 205 A0 00 00 08 FBA 0 5 873FB0 206 A0 00 00 08 FBA 0 6 873FD8 301 A0 00 00 08 FBA 0 7 874000 302 A0 00 00 08 FBA 0 8 874028 303 A0 00 00 08 FBA 0 9 874050 304 A0 00 00 08 FBA 0 10 874078 305 A0 00 00 08 FBA 0 11 8740A0 306 A0 00 00 08 FBA 0 12 8740C8 100 80 20 00 02 Tape 0 13 8740F0 101 80 20 00 02 Tape 0 ------------------------- End of sample output -------------------- There are 2 types of user files in MUSIC/SP: UDS (User Data Set) files, which are similar to MVS direct-access data sets and have an entry in the volume's VTOC (Volume Table of Contents); and Save Library (SL) files. SL files are the ones you normally work with. They are stored in the Save Library, which consists of an index (MUSIC/SP system data set SYS1.MUSIC.UIDX) and 1 or more User Library data sets (SYS1.MUSIC.ULnn, where nn=01,02,...). The Save Library can be spread over several volumes if necessary, although it is best to keep it all on 1 or 2 volumes, since it must be treated as a single unit for backup purposes. Each ULnn data set can be from 8MB to about 57MB in size. 57MB is also the maximum size of a Save Library file (but fragmentation may further limit the size). Note that most files are stored in a somewhat compressed format; for example, a file of 1000 80-byte records (about 80K) could use considerably less than 80K in the SL. You can check the state of free space in the Save Library by running the LIBSPACE utility. Here is sample output: ------------------------- LIBSPACE sample output ------------------ libspace *In progress LIBSPACE UTILITY ---------------- SAVE LIBRARY SPACE STATUS FRI MAR 04, 2005 (2005/ 63) 09:40 NUMBER OF LIBS= 3 TOTAL SUM OF MAP FREE LARGEST 5 FRAG. LARGEST 5 LIB# DEB# FLAG LEN SPACE FREE EXTS INDEX FREE EXTENTS 1 19 00 516 54K 54K 0.00 52 2 2 20 00 516 946K 946K 0.00 936 8 2 3 21 00 1544 8976K 8946K 0.00 7930 448 372 188 8 TOTAL FREE SPACE: 9976K BYTES TOTAL USED SPACE: 30952K BYTES ------------------------- End of sample output -------------------- From this listing you can see that the Save Library has 3 UL data sets (UL01, UL02, UL03), and that the total free space is about 9.9MB. A new SL file is allocated a max of 5 extents initially (it can grow to a total of 15 extents later), therefore you can see from the 6th column ("Sum of largest 5 free extents") that the largest file that can be allocated is 8946K = 8.7MB. To add more space, you would need to add data set UL04 (SYS1.MUSIC.UL04), which could be up to about 57MB, and 57MB is a good choice. Some other limits to keep in mind: The max number of ULnn data sets in the Save Library is about 170. (After UL99, the naming is UL100, UL101, etc.) The max size of an FBA volume in MUSIC/SP is 1GB = 1024MB = 1048576K = 2,097,152 512-byte blocks. Therefore the theoretical max size of a SL is about 170 x 57MB = 9.4GB, and it would require at least 10 volumes. A 4GB system exists at McGill. The first step in adding a ULnn data set to the Save Library is to provide enough free space for it on the chosen volume. Let's assume we want to add UL04, size 57MB, on volume MUSICX. You can list all the data sets and free space on a volume by the DSKDMP (Disk Dump) utility in MUSIC/SP. When prompted, enter the command listv,v='vvvvvv' where vvvvvv is the volume name. Here is sample output: ------------------------- DSKDMP sample output -------------------- dskdmp *In progress Enter parameters, END, or HELP. Defaults are: VOLUME = SYSRES TYPE = 1 READ DATA DISK UCB = 0 CC = 0, 0 HH = 0, 0 R = 1, 1 LEN = 16 ? LISTV,V='MUSICX' VOLUME= MUSICX START END BLOCKS XTNT BLKSIZ DATA SET NAME 2 31 30 1 FREE SPACE 32 95 64 1 140 VTOC 96 1631 1536 1 512 SYS1.MUSIC.NUCLEUS 1632 1663 32 1 6400 SYS1.MUSIC.DSLIST 1664 1983 320 1 80 SYS1.MUSIC.CATALOG 1984 17983 16000 1 2048 SYS1.MUSIC.LOADLIB 17984 18303 320 1 512 SYS1.MUSIC.CODTABL 18304 18463 160 1 4096 SYS1.MUSIC.CODINDX 18464 25503 7040 1 512 SYS1.MUSIC.UIDX 25504 41727 16224 1 512 SYS1.MUSIC.UL01 41728 43647 1920 1 512 SYS1.MUSIC.SUBMIT 43648 46847 3200 1 4096 SYS1.MUSIC.ACCT 46848 50847 4000 1 512 SYS1.MUSIC.BATCHIN 50848 54047 3200 1 512 SYS1.MUSIC.BATCHOT 54048 70367 16320 1 512 SYS1.MUSIC.SCRATCH 70368 89567 19200 1 4096 SYS1.MUSIC.PAGE1 89568 108767 19200 1 4096 SYS1.MUSIC.SWAP1 108768 109023 256 2 FREE SPACE 109024 125247 16224 1 512 SYS1.MUSIC.UL02 125248 174399 49152 1 512 SYS1.MUSIC.UL03 174400 188415 14016 3 FREE SPACE TOTAL FREE SPACE - 14302 BLOCKS ? /CANCEL *Terminated *Go ------------------------- End of sample output -------------------- A system data set such as ULnn must be allocated in a single extent. From the listing, the largest extent is 14016 blocks = 7008K. The actual max size for a ULnn data set is 114528 blocks = 57264K = 55.9MB, therefore you need to enlarge the volume file by at least 114528 - 14016 = 100512 blocks = 50256K = 49.1MB = 51,462,144 bytes. The beauty of FBA is that you can enlarge the volume file, by writing zeros at the end of the file, without disturbing the existing data and without having to change the VTOC (Volume Table of Contents). To do this, shut down Sim390 (or Hercules), and execute wipezero.exe in a Windows Command-prompt window. wipezero.exe can be downloaded from the Sim390 web site (file winprogs.zip). Suppose we decide to enlarge musicx.vol by 52MB = 54,525,952 bytes. To be safe, we make a backup copy of the volume file, before using Wipezero. Here is the sample output: ------------------------- Wipezero sample output ------------------ C:\data>copy musicx.vol musicx_backup.vol 1 file(s) copied. C:\data>wipezero musicx.vol Will write zeros to file musicx.vol Original file size: 92.00 MB = 96468992 bytes Enter byte displacement for zeroing (max 2**32-1), or 0 (start of file), or e (end of file): e Using displacement: 92.00 MB = 96468992 bytes Enter number of zero bytes to be written: 54525952 Using length 54525952 Enter y to start zeroing: y File area zeroed C:\data> ------------------------- End of sample output -------------------- Now start up MUSIC and use DSKDMP to list the new volume. There is now enough space for the new ULnn data set: ------------------------- DSKDMP sample output -------------------- VOLUME= MUSICX START END BLOCKS XTNT BLKSIZ DATA SET NAME 2 31 30 1 FREE SPACE 32 95 64 1 140 VTOC 96 1631 1536 1 512 SYS1.MUSIC.NUCLEUS 1632 1663 32 1 6400 SYS1.MUSIC.DSLIST ...lines omitted... 125248 174399 49152 1 512 SYS1.MUSIC.UL03 174400 294911 120512 3 FREE SPACE TOTAL FREE SPACE - 120798 BLOCKS ------------------------- End of sample output -------------------- At this point, we can use the Admin Facility to create and initialize the new ULnn data set (SYS1.MUSIC.UL04 in our example), and update the system catalog. If you are not already in Admin, type admin to start it. From the main menu, choose item 4 (System tailoring tasks), then item 10 (Additional tasks), then item 2 (Add an additional Save Library dataset). When prompted, enter musicx as the volume name, and 3579 as the number of tracks (on an FBA volume, 1 logical track is 32 blocks). This creates the maximum size UL data set (about 57MB), which is the recommended size. Here is the dialog: ------------------------- Admin sample output --------------------- The system presently has 03 Save Library datasets, defined, according to the System Catalog. Enter the volume name where you wish a new Save Library dataset to be allocated, or EXIT to terminate the request To display a list of volume names enter LIST. To display a list of volume names and free space enter SHOW. ? musicx On this device the smallest recommended size (8mb) will take 507 tracks. The biggest (57mb) will take 3579 tracks. (On an FBA device, 1 track is 32 blocks; 1 block is 512 bytes.) Enter the size of the Save Library dataset in tracks or EXIT ? 3579 Formatting the Save Library dataset SYS1.MUSIC.UL04 Initializing the new Save Library Dataset Updating the System Catalog to reflect the additional library Catalog updated and will be used at next IPL of system ------------------------- End of sample output -------------------- (In case you're interested, the utilities invoked by Admin for the above are FORMAT, ULINIT, and EDTCAT. If you wish to do the above manually, without using Admin, see the MUSIC/SP Administrator's Reference manual (type manx to access it).) At this time, you should re-IPL MUSIC, for the update to take effect. During the IPL, you should see the console message: M067 New Save Lib Data Set added - Lib No.=004 LIBSPACE now shows the extra free space: ------------------------- LIBSPACE sample output ------------------ libspace *In progress LIBSPACE UTILITY ---------------- SAVE LIBRARY SPACE STATUS FRI MAR 04, 2005 (2005/ 63) 11:14 NUMBER OF LIBS= 4 TOTAL SUM OF MAP FREE LARGEST 5 FRAG. LARGEST 5 LIB# DEB# FLAG LEN SPACE FREE EXTS INDEX FREE EXTENTS 1 19 00 516 54K 54K 0.00 36 8 6 2 2 2 20 00 516 904K 904K 0.00 894 8 2 3 21 00 1544 9016K 8978K 0.00 7930 448 372 196 32 4 22 00 3584 57248K 57248K 0.00 57248 LIBS WITH HIGHEST FRAGMENTATION INDEX: 3 TOTAL FREE = 9016K FRAG. INDEX = 0.00 4 TOTAL FREE = 57248K FRAG. INDEX = 0.00 TOTAL FREE SPACE: 67222K BYTES TOTAL USED SPACE: 30954K BYTES ------------------------- End of sample output -------------------- Other notes: - Another way to provide more usable space in the Save Library is to reorganize (defragment) the free space in one or more ULnn data sets. This can be done via the MFMOVE utility, or by Admin --> 4 --> 10 --> 8 (Reorganize Save Library free space). You may need to do this periodically, perhaps once every one or two months, if LIBSPACE shows that free space has become overly fragmented. - During Save Library operations, such as the MFREST archive restore utility, errors may be reported, using various MFIO (MUSIC File Input/Output) error codes. To see descriptions of all the error codes, type "/help file" and choose topic 12 (File errors, MFIO error numbers).