User Tools

Site Tools


howto:use_ldann_logical_disks

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Last revisionBoth sides next revision
howto:use_ldann_logical_disks [2018/10/23 22:26] – initial commit lrickerhowto:use_ldann_logical_disks [2019/11/15 17:15] mmacgregor
Line 30: Line 30:
 This layered software product installation adds a new DCL command, LD, to SYS$LIBRARY:DCLTABLES.EXE.  To pick up this command for immediate use, you can either logout and log-back-in again, or just issue this command: This layered software product installation adds a new DCL command, LD, to SYS$LIBRARY:DCLTABLES.EXE.  To pick up this command for immediate use, you can either logout and log-back-in again, or just issue this command:
  
-  $ SET COMMAND SYS$LIBRARY:DCLTABLES+  $ SET COMMAND /TABLE=SYS$LIBRARY:DCLTABLES
  
 Once you've got the new LD command at your process's disposal, explore LD HELP this way: Once you've got the new LD command at your process's disposal, explore LD HELP this way:
Line 89: Line 89:
 </code> </code>
  
-This just creates a big file, with no actual contents other than whatever “junk data” was previously in the disk blocks allocated to this file.  Note that, although we've used .DSK as the file extension in this example, you can use whatever file extension you like, as there's no specific file-type enforced... However, stick to a filename and type that is conventional and “obvious.”+This just creates a big file, with no actual contents other than whatever “junk data” was previously in the disk blocks allocated to this file.  Note that, although we've used .DSK as the file extension in this example, you can use whatever file extension you like, as there's no specific file-type enforced.  However, stick to a filename and type that is conventional and “obvious.”
  
 <code> <code>
Line 96: Line 96:
 Directory DSA2:[LRICKER] Directory DSA2:[LRICKER]
  
-SANDBOX.DSK;  50000      13-JUN-2018 13:51:25.30   [STAFF,LRICKER]  (RWED,RWED,,)+SANDBOX.DSK;  50000       2-AUG-2017 08:21:25.30   [STAFF,LRICKER]  (RWED,RWED,,)
  
 Total of 1 file, 50000 blocks. Total of 1 file, 50000 blocks.
Line 102: Line 102:
  
 The LD-container file needs to be created just once, of course -- once created, it can be connected and mounted numerous times, whenever needed.  The container file can also be disconnected from the LD-driver and summarily deleted, if you're sure you're done with it... You can "start over again."  Of course, you can have as many Logical Disks (files) as you practically need. The LD-container file needs to be created just once, of course -- once created, it can be connected and mounted numerous times, whenever needed.  The container file can also be disconnected from the LD-driver and summarily deleted, if you're sure you're done with it... You can "start over again."  Of course, you can have as many Logical Disks (files) as you practically need.
 +
 +==== Connecting Your LDAnnn: Disk ====
  
 Once created, this Logical Disk file next has to be **__connected__** to an actual ''LDAxxx:'' device (based on the LDA0: template device), so we have to find an unused unit number ''xxx'': Once created, this Logical Disk file next has to be **__connected__** to an actual ''LDAxxx:'' device (based on the LDA0: template device), so we have to find an unused unit number ''xxx'':
Line 124: Line 126:
 </code> </code>
  
-On our CLASS8 training system here at PARSEC, we play with numerous Logical Disks, so we've got lots.  Your mileage will vary, and to begin with, you'll likely show no ''LDAnnn:'' devices on your system... This will be your first.  On a system with existing ''LDAnnn:'' devices, pick a totally new, unused unit number.+On our CLASS8 training system here at PARSEC, we play with numerous Logical Disks, so we've got lots.  Your mileage will vary, and to begin with, you'll likely show no ''LDAnnn:'' devices on your system -- this will be your first.  On a system with existing ''LDAnnn:'' devices, pick a totally new, unused unit number.
  
-Because it's easy(er) to remember and type, let's use ''LDA77:'' for our experiments.  This will likely be a temporary use for this particular unit number ― if you ever decide to “go to production” or other regular, persistent use for a particular Logical Disk, be sure to more-or-less permanently allocate an ''LDAxxx:'' (unit number) to that LD-file; likely, you'll put all of that into a startup command file for consistency.+Because it's easy(er) to remember and type, let's use ''LDA77:'' for our experiments.  This will likely be a temporary use for this particular unit number -- if you ever decide to “go to production” or other regular, persistent use for a particular Logical Disk, be sure to more-or-less permanently allocate an ''LDAxxx:'' (unit number) to that LD-file; likely, you'll put all of that into a startup command file for consistency.
  
   $ LD CONNECT /LOG DSA2:[LRICKER]SANDBOX.DSK LDA77: LDISK$SANDBOX   $ LD CONNECT /LOG DSA2:[LRICKER]SANDBOX.DSK LDA77: LDISK$SANDBOX
   %LD-I-CONNECTED, Connected $254$LDA77: to DSA2:[LRICKER]SANDBOX.DSK;1   %LD-I-CONNECTED, Connected $254$LDA77: to DSA2:[LRICKER]SANDBOX.DSK;1
      
-We're making consistent use of the ''/LOG'' qualifier for these LD-commands just to show whats happening... this qualifier is optional.+We're making consistent use of the ''/LOG'' qualifier for these LD-commands just to show what's happening... this qualifier is optional.
  
-Note: Experience shows that the LD ''CREATE'' and ''CONNECT'' (and, by extension, the ''DISCONNECT'') commands are particular, picky even, about the colon “:” on the end of the LDAxxx: device name ― Don't omit that colon!+Note: Experience shows that the LD ''CREATE'' and ''CONNECT'' (and, by extension, the ''DISCONNECT'') commands are particular, picky even, about the colon “:” on the end of the LDAxxx: device name -- Don't omit that colon!
  
-Now, ''LDA77:'' is a device that just happens to be “backed by” (or implemented as) a file. Since this file has just been created, it has no valid contents ― and certainly does notyet have a file system in it.  So this:+Now, ''LDA77:'' is a device that just happens to be “backed by” (or implemented as) a file. Since this file has just been created, it has no valid contents -- and certainly does not yet have a file system in it.  So this:
  
 <code> <code>
Line 154: Line 156:
 ...simply shows us a “foreign device,” un-mounted and un-loved.  This device needs to be initialized with a file system. ...simply shows us a “foreign device,” un-mounted and un-loved.  This device needs to be initialized with a file system.
  
-We do this next command ― not surprisingly, an INITIALIZE command ― once (per newly-created LD-device)... Note that this command does not initialize the file, it initialized the __device__.  Whenever we __create__ a new LD-container file and __connect__ it, we need to next initialize its file system (contents). Be sure to give the file system a meaningful volume label; you can choose //either// a Files-11 ODS-2 (default, or ''/STRUCTURE=2'') or ODS-5 (extended file system, ''/STRUCTURE=5'') file system:+==== Initializing Your LDAnnn: Disk ==== 
 + 
 +We do this next command -- not surprisingly, an INITIALIZE command -- once (per newly-created LD-device)... Note that this command does not initialize the file, it initialized the __device__.  Whenever we __create__ a new LD-container file and __connect__ it, we need to next initialize its file system (contents). Be sure to give the file system a meaningful volume label; you can choose //either// a Files-11 ODS-2 (default, or ''/STRUCTURE=2'') or ODS-5 (extended file system, ''/STRUCTURE=5'') file system:
  
   $ INITIALIZE /STRUCTURE=5 LDA77: SANDBOX   $ INITIALIZE /STRUCTURE=5 LDA77: SANDBOX
  
 Note that you can create an ODS-5 Logical Disk (file) on a host-disk that is itself an ODS-2 file structure (or visa-versa); this gives you considerable flexibility! Note that you can create an ODS-5 Logical Disk (file) on a host-disk that is itself an ODS-2 file structure (or visa-versa); this gives you considerable flexibility!
 +
 +==== Mounting Your LDAnnn: Disk ====
  
 Now, let's mount it and then look at the device's structure: Now, let's mount it and then look at the device's structure:
Line 217: Line 223:
  
 And where did those logical names “''DISK$SANDBOX''” and "''SANDBOX''" come from? (Left as an exercise to the reader...) And where did those logical names “''DISK$SANDBOX''” and "''SANDBOX''" come from? (Left as an exercise to the reader...)
 +
 +==== Using Your LDAnnn: Disk ====
  
 With this disk initialized (once only) and mounted (whenever we want and need to do so), we can now treat it just like any other disk device (or, more properly, //volume//) and examine its contents. With this disk initialized (once only) and mounted (whenever we want and need to do so), we can now treat it just like any other disk device (or, more properly, //volume//) and examine its contents.
Line 242: Line 250:
 because that previous ''INITIALIZE'' command did not use the ''/SYSTEM'' qualifier, this LD-volume is owned by the __user__, not by ''[SYSTEM]'' (or ''[1,4]''). This may or may not be a problem for a particular use case, so just be aware of the options involved here, just like for any other disk/device/volume. because that previous ''INITIALIZE'' command did not use the ''/SYSTEM'' qualifier, this LD-volume is owned by the __user__, not by ''[SYSTEM]'' (or ''[1,4]''). This may or may not be a problem for a particular use case, so just be aware of the options involved here, just like for any other disk/device/volume.
  
-Let's use this new volume ― exercise it with a few file commands:+Let's use this new volume -- exercise it with a few file commands:
  
 <code> <code>
Line 292: Line 300:
 Now we've got a backup save-set for safety, just in case we want to recover our sandbox disk in the future. Now we've got a backup save-set for safety, just in case we want to recover our sandbox disk in the future.
  
-==== Clean-up ====+==== Clean-up -- Dismount, Disconnect, even Delete, etc. ====
  
 Well, since this is just a practice session, how do we get rid of the evidence? How do we clean up? Just like this... Well, since this is just a practice session, how do we get rid of the evidence? How do we clean up? Just like this...
Line 307: Line 315:
 </code> </code>
  
-Dismounting an LD-disk is just dismounting a disk device. Read about the LD ''DISCONNECT /ABORT'' qualifier ― usually unneeded, unless there are pesky multi-user connections that won't “let go”.  The ''DELETE'' command makes the sandbox file good and truly gone. But easily recreated...+Dismounting an LD-disk is just dismounting a disk device. Read about the LD ''DISCONNECT /ABORT'' qualifier -- usually unneeded, unless there are pesky multi-user connections that won't “let go”.  The ''DELETE'' command makes the sandbox file good and truly gone. But easily recreated...
  
 ==== Summary of Use Cases ==== ==== Summary of Use Cases ====
  
-To summarize ― Logical Disks are good for:+To summarize -- Logical Disks are good for:
  
-  * Practicing VMS file commands, etc. ― As a learning tool, having one or more sandbox disks available for users (and yourself) to practice in makes it easy and stress-free to learn (“No, you can‟t break anything... play to your heart's content...”). +  * Practicing VMS file commands, etc. -- As a learning tool, having one or more sandbox disks available for users (and yourself) to practice in makes it easy and stress-free to learn (“No, you can‟t break anything... play to your heart's content...”). 
-  * Containers for isolation, development and testing ― Need an ODS-5 disk structure without changing the underlying host-ODS-2 disk (or visa versa)?  Create a logical disk with the target file system structure.+  * Containers for isolation, development and testing -- Need an ODS-5 disk structure without changing the underlying host-ODS-2 disk (or visa versa)?  Create a logical disk with the target file system structure.
   * Containers for installing a layered product or complete application suite into... without disrupting production use of the real/released-version of that software package. Do you see how the principles of rapid deployment might benefit from this tool/resource?   * Containers for installing a layered product or complete application suite into... without disrupting production use of the real/released-version of that software package. Do you see how the principles of rapid deployment might benefit from this tool/resource?
 +  * Providing very-fine-grained security protection (protection masks, ACLs) both to the LD-container file itself, and to any/all files it contains.
   * Any other purpose where containers can be used to isolate, enclose and protect packages of software, project use, or other special-purpose scenarios.   * Any other purpose where containers can be used to isolate, enclose and protect packages of software, project use, or other special-purpose scenarios.
  
howto/use_ldann_logical_disks.txt · Last modified: 2022/12/09 18:50 by mmacgregor

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki