NSRMM(8)
NAME
nsrmm − NetWorker media management command
SYNOPSIS
nsrmm
[ −C ] [ −v | −q ] [ −s server ] [ −f device ]
nsrmm
−m [ −v | −q ] [ −s server ] [ −f device ] [ −r ] [ volume ]
nsrmm
−l [ −v | −q ] [ −s server ] [ −f device ] [ −my ] [ −e expiration ] [ −c capacity ] [ −o mode ] [ −b pool ] [ −R | volume ]
nsrmm
{ −u | −j } [ −v | −q ] [ −s server ] [ −y ] [ −f device | volume.. ]
nsrmm −p [ −v | −q ] [ −s server ] [ −f device ]
nsrmm
{ −d | −o mode } [ −v | −q ] [ −s server ] [ −Py ] [ −S ssid[/cloneid] | −V volid | volume... ]
DESCRIPTION
The nsrmm command provides a command-line interface to manage the media and devices (tapes and disks) used by NetWorker servers.
A volume is a physical piece of media, for example, a tape or disk cartridge. The NetWorker system keeps track of which user files have been saved on which volumes, so they can be more easily recovered. Every volume managed by NetWorker has a volume name (also known as a volume label) selected by an operator. A volume’s name is specified when the volume is first introduced to the system. It may be changed only when a volume is relabeled. The volume should have an external label displaying its volume name for future reference. NetWorker refers to volumes by their volume names, for example, when requesting a volume for recovery.
The NetWorker system automatically manages an index mapping saved user files to volumes. NetWorker also keeps other attributes associated with a volume, including the volume’s expiration date and the expected capacity of the volume.
The NetWorker server requests specific volumes be mounted by their name for recoveries, or any writable volumes for saves. These requests are submitted through the nsr_notification(5) mechanism. The nwadmin(8) console window or the nsrwatch(8) command may be used to monitor pending mount requests. Typically, the requests will also be written to the system console, or logged in a file. The same requests could be used as input to software which controls a jukebox, a device that automatically loads and unloads volumes.
Before the nsrmm command can be used (so before any data can be saved or recovered), at least one device must be configured for the NetWorker server. This is usually done with the nsr_ize(8) command when NetWorker is installed. The NetWorker configuration may be modified with the nwadmin(8) administration menus or the nsradmin(8) command after NetWorker has been installed.
OPTIONS
−b pool
Specifies the pool to which the volume should belong. The pool may name any pool currently registered with nsrd. The possible values can be viewed by selecting the Pools menu item from the Administration menu of nwadmin(8) or via the nsradmin(8) command. The pool name is referenced by nsrd when determining what save sets can reside on the volume. If this option is omitted, the volume is automatically assigned to the Default pool. Specifying a pool name and no volume name causes nsrmm to use the next volume name associated with the specified pool’s label template resource.
−C Display a list of NetWorker configured devices and the volumes mounted on them. This just prints out what the server thinks is mounted, without performing any volume operations, while the −p option described below causes another verification of the label. This is the default option.
−c capacity
Override a volume’s default capacity. NetWorker will normally use built-in default capacities based on the device’s type; this option overrides that. The format of the specification is number multiplier. Multiplier may be one of ‘K’ (1024 bytes), ‘M’ (1000K), or ‘G’ (1000M). Lower-case letters are also accepted, as are extra characters like spaces, or an extra ‘B’ after ‘K’, ‘M’, or ‘G’. Number may be any value, including an integer or real number with up to three decimal places.
−d Delete the indexes for a volume and all of the user files on that volume from the NetWorker databases. This does not actually destroy the volume, it just removes all references to it and the user files contained on it. This option can be used to control the size of the NetWorker databases.
−e expiration
Set the expiration date for labeling. This option overrides the default expiration, which is two years. Expiration is entered in getdate(3) format, with the word forever meaning an archive tape that never expires.
−f device
Specify a device explicitly. When more than one device has been configured, nsrmm will select the first device by default. This option overrides that selection. Device names are usually preceded by /dev, i.e., /dev/nrst0.
−j Eject a volume. This is similar to an unmount operation, but will also physically eject the volume from the device if possible. Many disk devices and some tapes do not support this.
−l Label (that is, initialize) a volume so that NetWorker can recognize and use it. Labeling must be done after the desired volume is physically loaded into the device, either by an operator or a jukebox.
−m Mount a volume. Mounting is done after the desired volume is placed in the device and labeled. Only labeled volumes may be mounted. The labeling and mounting operations may be combined; see the EXAMPLES section.
−o mode
Set the mode of a volume, save set, or save set instance (clone). The mode may be one of [not]recyclable, [not]readonly, [not]full, [not]manual or [not]suspect. The [not]recyclable modes apply to both volumes or save sets, but not clones. The [not]readonly, [not]full and [not]manual modes apply only to volumes. The [not]manual modes are the only valid modes when used with −l. The [not]suspect modes apply only to save set instances, meaning you need to specify it along with −S ssid/cloneid, not just −S ssid by itself (remember that every instance of a save set has a clone id, even the original). See nsrim(8) for a discussion of the per-volume flags. The suspect flag is set automatically when a recover(8) encounters a media error recovering data from a particular save set clone.
−P When used with the −d option, specifying −P will only purge the corresponding file index entries and not modify (delete) the entries in the media database. The scanner(8) command may then be used to recover the file index entries.
−p Verify and print a volume’s label. To confirm that the external volume label matches the internal label, load a volume into a drive and use this option to display the volume name in the label. Verifying a label causes mounted volumes to become unmounted.
−q Quiet mode. This option tells nsrmm to print out as little information as possible while performing the requested operation. Generally, only error messages are printed.
−R Relabel a volume. This option rewrites the volume’s label, and purges the NetWorker indexes of all user files previously saved on the volume. Some of the volume usage information is maintained.
−r Mount a volume read-only. To prevent NetWorker from writing to a volume, specify the read-only flag when mounting the volume. Volumes marked as full and those in the read-only mode (−o readonly) are automatically mounted read-only.
−s server
Specify the NetWorker server to act upon. See nsr(8) for a description of server selection.
−S ssid
This option to change (with −o) or remove (with −d) one save set from the NetWorker databases. The save set is identified via a save set identifier, ssid. To specify a save set instance, or clone, use the format ssid/cloneid. The mminfo(8) command may be used to determine save set and clone identifiers.
−u Unmount a volume. A volume should always be unmounted before it is unloaded from its device.
−V volid
This option to the delete operation will remove one volume from the NetWorker databases. The volume is identified via a volume identifier, or volid. The mminfo(8) command may be used to determine volume identifiers.
−v Verbose mode. This option polls the NetWorker server to print out more information as the operation proceeds.
−y Don’t confirm (potentially destructive) operations before performing them. This option should be used with extreme care.
EXAMPLES
Labeling new tapes:
To introduce a new tape, named mars.001, to the NetWorker system, load the tape in an empty drive, then use the command:
nsrmm −l mars.001
The tape will be labeled with mars.001 and an entry will be made in the appropriate NetWorker indexes. The mminfo(8) command may be used to inspect the volume database. Running:
mminfo −m
will display information about the volumes.
Mounting a tape:
To mount a NetWorker volume, use the −m option. Note that the volume must already have been labeled and loaded in the drive:
nsrmm −m
When mounting, a volume name may also be specified:
nsrmm −m mars.001
However, this name is currently ignored. In a future release, the mount will fail unless the given volume name matches the one read in.
Mounting a volume just makes the volume available to NetWorker. When nsrmmd(8) needs the volume, the label will be read again and confirmed. This prevents accidental data loss. Volumes are also verified and mounted automatically if the server recovers after a crash.
Labeling and Mounting a tape:
A volume may be labeled and mounted with a single nsrmm command by combining the −m and −l options. For example, to label a volume mars.003 and mount it on device /dev/nrst0, run:
nsrmm −m −l −f /dev/nrst0 mars.003
Unmounting or ejecting a volume:
When a volume needs to be unmounted, the −u or −j options are used, depending on whether or not the device can physically eject a volume.
nsrmm −u
When more than one volume is mounted, either the volume name or device may be specified to select the desired volume. For example
nsrmm −j mars.003
will eject the volume named mars.003.
Displaying the current volumes:
The −C option will display the configured devices and the volumes mounted on them. This is the default option.
nsrmm −C
Deleting a volume:
To remove references to a volume and the user files saved on it from the NetWorker indexes, use the −d option. This option does not modify the physical volume and in fact should only be used when the physical volume is destroyed. Deleting a volume will free up space in the NetWorker file index and the NetWorker media index, but not much more than purging it. The amount of space released will depend on the number of user files saved on the volume. To delete the volume mars.003, use the command:
nsrmm −d mars.003
The scanner(8) command may be used to rebuild the database entries.
Purging file index entries:
The file index contains information about each file saved by NetWorker. Due to size constraints, it may be necessary to purge information from the file index. When a volume or save set is deleted, the corresponding file index entries are also removed. It is also possible to preserve a volume’s media database entries while purging the file index. This is done by specifying the −P option when deleting.
To purge all of the file index entries for volume mars.001, run:
nsrmm −d −P mars.001
The scanner(8) command may be used to recover the file index.
SEE ALSO
nsr(8), getdate(3), nsr_layout(5), nsr_device(5), nsr_notification(5), mminfo(8), nwadmin(8), nsrmmd(8), nsradmin(8), nsrim(8), nsr_ize(8), recover(8). scanner(8).
DIAGNOSTICS
type family volume mounted on device, write enabled
Message indicating that the −m (mount) option was successfully performed on a device with the given media type and media family, for example, 8mm tape.
‘saveset’ is not a valid save set id
The given save set identifier is not in the valid format. The format is either a single number, for the save set without reference to its instances, or two numbers separated by a slash (/) character, representing a save set and clone (instance) identifier pair.
duplicate name; pick new name or delete old one
It is illegal to label two tapes with the same name. If you wish to reuse a name, remove that volume from the index with the −d option.
Are you sure you want to over-write volume with a new label?
An attempt is being made to relabel a volume. A positive confirmation will overwrite the existing data on that tape.
Purge file index entries for type family volume? ...
Upon positive confirmation, the file index entries will be removed.
volume not in media index
The media index has no entry associated with volume, so the −m command cannot be done. This problem may be caused by mistyping the volume name when the tape was originally labeled, or deleting it.
No valid family label
The tape or disk in the named device does not have a valid NetWorker label.
NetWorker 4.1.2 — Last change: May 1995