mktag

Creates a tag for a view or VOB

Applicability

Product

Command type

VersionVault

cleartool subcommand

Platform

UNIX®

Linux®

Windows®

Synopsis

  • VersionVault on UNIX® and Linux® —Create a tag for a dynamic view:
    mktag –vie/w –tag dynamic-view-tag [ –tco/mment tag-comment ]
    [ –rep/lace | –reg/ion network-region ] [ –nst/art ]

    [ –nca/exported ]

    [ –hos/t hostname –gpa/th global-storage-pname ] dynamic-view-storage-pname

  • VersionVault on Windows—Create a tag for a dynamic view:
    mktag –vie/w –tag dynamic-view-tag [ –tco/mment tag-comment ]
    [ –rep/lace | –reg/ion network-region ] [ –nst/art ]

    [ –hos/t hostname –gpa/th global-storage-pname ] dynamic-view-storage-pname

  • VersionVault—Create a tag for a snapshot view:
    mktag –vie/w –tag snapshot-view-tag [ –tco/mment tag-comment ]
    [ –rep/lace | –reg/ion network-region ] [ –nst/art ]

    [ –hos/t hostname –gpa/th global-storage-pname

    | –ngpath [ –host hostname ] ] snapshot-view-storage-pname

  • VersionVault on UNIX® and Linux® —Create a VOB tag:
    mktag –vob –tag vob-tag [ –tco/mment tag-comment ]
    [ –rep/lace | –reg/ion network-region ] [ –opt/ions mount-options ]

    [ –pub/lic ] [ –pas/sword tag-registry-password ] [ –nca/exported ]

    [ –hos/t hostname –gpa/th global-storage-pname

    | –ngp/ath [ –hos/t hostname ] ] vob-storage-pname

  • VersionVault on Windows—Create a VOB tag:
    mktag –vob –tag vob-tag [ –tco/mment tag-comment ]
    [ –rep/lace | –reg/ion network-region ] [ –opt/ions mount-options ]

    [ –pub/lic ] [ –pas/sword tag-registry-password ]

    [ –hos/t hostname –gpa/th global-storage-pname

    | –ngp/ath [ –hos/t hostname ] ] vob-storage-pname

Description

For an existing view or VOB, the mktag command creates or replaces an entry in the registry. A view or VOB gets one tag when it is created with mkview or mkvob.

In VersionVault, you can use mktag to create additional tags, enabling access from multiple network regions. Each network region needs its own tag for a view or VOB. A single region cannot have multiple tags for the same VOB. (Multiple tags for a view are valid, but not recommended.) However, a single tag can be assigned to multiple regions with multiple mktag commands. For a discussion of network regions, see the Help.

By default, creating a view tag activates the view on your host by implicitly performing a startview command. This does not occur if your host is not in the tag's assigned network region or if you use the –nstart option. For a dynamic view, creating the view tag also activates the view. However, creating a VOB tag does not activate the VOB; use mount for this purpose.

Restrictions

Identities

In VersionVault on UNIX® or Linux®, you must be the VOB owner to create a private VOB tag. In VersionVault on Windows®, no special identity is required.

Locks

No locks apply.

Mastership

(Replicated VOBs) No mastership restrictions.

Options and arguments

Specifying the kind of tag

Default
None.
–vie/w
Specifies a view tag.
–vob
Specifies a VOB tag.

Specifying the tag

Default
None.
–tag dynamic-view-tag | snapshot-view-tag
A name for the view, in the form of simple file name.
–tag vob-tag
VersionVault. Either a standard full path name, which specifies the location at which the VOB will be mounted; or a name for the VOB, in the form of an absolute single-component path name (for example, /big_vob).
–tco/mment tag-comment
Adds a comment to the tag's entry in the registry. Use the –long option with lsvob or lsview to display the tag comment.

Overwriting an existing tag

Default
None.
–rep/lace
Replaces an existing tag registry entry with a new entry. (No error occurs if the tag does not exist.) You can use this option to change the tag comment and access paths. You cannot use –replace to change an existing tag's name; to do this, delete the tag with rmtag and then use mktag.

This option also enables you to convert private VOBs to public and vice versa, and to change startview behavior. (To change a private VOB to public, you must provide the tag-registry password. To change a public VOB to private, you must be the VOB owner.)

Starting the view

Default
Starts the view_server process on the host where the view storage location resides, if it is not already running. For a dynamic view, creating a view tag also makes the view active on your host, making the view tag appear as a directory entry in the view-root directory.
–nst/art
Suppresses starting of the view_server process.

Marking a view or VOB for export

Default
The view tag or VOB tag is not marked for export.
–nca/exported
Marks the view tag or VOB tag in the registry as an export view or VOB. See the mkview and mkvob reference pages for more information. This option applies to dynamic view environments only.

To mark a view tag for export, you must create the tag in the view server host's default region. You cannot use this option when creating view tags in a nondefault region.

Specifying a network region

Default
Creates a tag in the local host's network region. (Use the hostinfo –long command to list a host's network region.) For a discussion of network regions, see the Help.
–reg/ion network-region
Creates the tag in the specified network region. An error occurs if the region does not already exist. An error occurs if the VOB already has a tag in the specified network region.

Specifying mount options

Default
No mount options are included in the VOB registry entry for a new VOB tag.
–opt/ions mount-options
(VOB tags only. You must be root (UNIX® and Linux®) or a member of the VersionVault administrators group to use this option.) Specifies mount options to be used when the VOB is activated through this VOB tag. See the mkvob and mount reference page for syntax details.

Public versus private VOB

Default
Creates a private VOB tag (does not apply to view tags). An error occurs if you are not the VOB owner.
–pub/lic
Creates a public VOB tag. For a discussion of public and private VOBs, see the mkvob reference page.
–pas/sword tag-registry-password
Specifies the VOB tag password, which is required to create a public tag or to create a private tag when you include suid as an argument to –options.

In these cases, if you do not include a password, you are prompted for it. The value you specify is checked against the tag registry password; an error occurs if there is no match. For more information, see the Help.

Note: The VOB tags for a given VOB must all be private, or all be public.

Specifying client accessibility information

Default
Derived from dynamic-view-storage-pname or snapshot-view-storage-pname for a view tag or from vob-storage-pname for a VOB tag.
–hos/t hostname –gpa/th global-pname –ngp/ath
See the mkstgloc reference page for general information on these options; note, however, that the view or VOB for which you are making a tag need not necessarily reside in a server storage location created with mkstgloc.

To create a tag for a VOB or view that resides on a supported network attached storage (NAS) device, you must specify the option set, –host –gpath. (NAS devices must be specially configured for use with VersionVault. See the Help for details.)

The information you provide is written to the registry exactly as you specify it.

Specifying the path to the VOB or view storage

Default
None.
dynamic-view-storage-pname, snapshot-view-storage-pname, vob-storage-pname
Specifies the path to an existing storage directory for a view or a VOB (the directory may be in a server storage location; see mkstgloc).

VersionVault. The path name must specify a location on a host where the VersionVault installation is not client-only. For storage intended for snapshot views or VOBs to be accessed only through snapshot views, the path name must be a UNC name only if there is a global path to the server storage location (that is, you have not specified –ngpath).

VersionVault on Windows®. For storage intended for dynamic views or VOBs they access, the path name must be a UNC name.

NAS devices providing storage for VersionVault on UNIX®, Linux®, or Windows®. The path name must specify a location on the NAS device that is accessible to all VersionVault hosts in the region.

VersionVault on Windows®. The path name 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.

Examples

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.

  • On a UNIX® or Linux® system, assign the new view tag view5 to an existing view storage area for the network region europe.

    cmd-context mktag -view -tag view5 ^
    -region europe /net/gw/host3/view_store/view5.vws

  • On a Windows® system, register an existing VOB with a public VOB tag for the network region europe.

    cmd-context mktag -vob -tag \us_east1 -region europe -public ^
    -password tagPword \\earth\vb_store\vob1.vbs

  • On a Windows® system, convert a private VOB to a public VOB, by replacing its private VOB tag with a public one.

    cmd-context  mktag -vob -tag \publicvob -replace -public ^
    -pass tagPword \\saturn\vobs\private.vbs

  • On a UNIX® or Linux® system, mark an existing view and VOB for export.

    cmd-context  mktag -view -tag bugfix -replace \
    -ncaexported /net/neon/views/bugfix.vws

    cmd-context  mktag -vob -tag /vobs/dev -replace \
    -ncaexported /net/pluto/vobstore/dev.vbs