The mkstgloc command creates and registers a named server storage location for view or VOB storage directories. The command initializes a physical directory and writes information describing that directory to the ClearCase registry. For information about the registry, see the IBM Rational ClearCase Administrator's Guide.
You can also use mkstgloc for other purposes:
Before creating a server storage location for a ClearCase view or VOB, determine whether there is file system connectivity between the server storage location's host and its clients in the regions that advertise the server storage location. File system connectivity determines how you can use the server storage location, as follows:
To be accessible to its clients, a ClearCase server storage location needs to be registered with the following information:
In many cases, ClearCase heuristically derives appropriate accessibility information from the stgloc-pname argument. In cases where there is no file system connectivity between the server storage location and its clients, ClearCase derives the host name and host-local path, but because no meaningful global path can be derived, you must specify –ngpath to unset the global path information.
An unusual network configuration may defeat the heuristic by which accessibility information is derived, thereby preventing access to the server storage location by some or all ClearCase clients. In such cases, set the registry information explicitly, following these guidelines:
To create a server storage location on a supported network attached storage (NAS) device, you must specify the option set, –host –hpath –gpath. (NAS devices must be specially configured for use with ClearCase. For more information, see the IBM Rational ClearCase Administrator's Guide.)
You must either specify the –host, –hpath, and –gpath options as a set; or use –ngpath and optionally specify –host and –hpath.
–host hostname: The name of the host where the server storage location is to reside or, if the storage is on a NAS device, the name of the host on which the VOB or view server serving the storage location will run.
–hpath host-storage-pname: A standard full path name to the server storage location that is valid on the specified host.
–gpath global-storage-pname: A standard full path name to the server storage location that is valid in the target network region for all client hosts that are to access the server storage location.
–ngp/ath: Specifies that in the target region there is no global path by which the server storage location can be accessed.
ClearCase on UNIX and Linux. stgloc-pname must specify a location on a host where the ClearCase installation is not client-only. For storage intended for snapshot views or VOBs to be accessed only through snapshot views, stgloc-pname must be a UNC name only if there is a global path to the server storage location (that is, you did not specify –ngpath). For related information, see the description of CCASE_GPATH_HINTS in the env_ccase reference page.
ClearCase on Windows. stgloc-pname must specify a location on a host where the ClearCase installation is not client-only. For storage intended for dynamic views or VOBs they access, stgloc-pname must be a UNC name. For storage intended for snapshot views or VOBs to be accessed only through snapshot views, stgloc-pname must be a UNC name only if there is a global path to the server storage location (that is, you did not specify –ngpath). stgloc-pname must not be within a Windows special share, such as the share that is designated by drive$ and that allows administrators to access the drive over the network.
NAS devices providing storage for ClearCase on UNIX, Linux, or Windows. stgloc-pname must specify a location on the NAS device that is accessible to all ClearCase hosts in the region.
The UNIX system and Linux examples in this section are written for use in csh. If you use another shell, you may need to use different quoting and escaping conventions.
The Windows examples that include wildcards or quoting are written for use in cleartool interactive mode. If you use cleartool single-command mode, you may need to change the wildcards and quoting to make your command interpreter process the command appropriately.
In cleartool single-command mode, cmd-context represents the UNIX system and Linux shells or Windows command interpreter prompt, followed by the cleartool command. In cleartool interactive mode, cmd-context represents the interactive cleartool prompt.
cmd-context mkstgloc –vob stgloc_vob1 ~/stgloc_vob1
Created and advertised Server Storage Location.
Host-local path: peroxide:/export/home/bert/stgloc_vob1
Global path: /net/peroxide/export/home/bert/stgloc_vob1
cmd-context mkstgloc –view stgloc_view1 ~/stgloc_view1
Created and advertised Server Storage Location.
Host-local path: peroxide:/export/home/bert/stgloc_view1
Global path: /net/peroxide/export/home/bert/stgloc_view1
cmd-context mkstgloc –vob –ngpath store1 C:\store1
Created and advertised Server Storage Location.
Host-local path: peroxide: C:\store1
Global path: <no-gpath>
cmd-context mkstgloc -vob -host ccvobsvr1 ^
-gpath \\nasdevice\vobstg\nasvobstg ^
-hpath \\nasdevice\vobstg\nasvobstg ccnasvobstg ^
\\nasdevice\vobstg\nasvobstg
Created and advertised Server Storage Location.
Host-local path: ccvobsvr1:\\nasdevice\vobstg\nasvobstg
Global path: \\nasdevice\vobstg\nasvobstg