mmsadm - administration command for the Media Management System
/usr/sbin/mmsadm [-h | -?]
mmsadm discover [-H] [-t library|drive|vol] [-S ACSLS-host[:port]] -a
mmsadm create -t library|drive|mpool|dpool|app|voltype -o option=x [-o option2=y...] name
mmsadm delete -t library|drive|mpool|dpool|app|voltype [-f] name
mmsadm set -t library|drive|mpool|dpool|app|voltype -o option=x [-o option2=y...] name
mmsadm list [-vH] -t library|drive|mpool|dpool|app|voltype -o option=x [-o option2=y...] [-F filter [-F filter2...] [name]
mmsadm passwd [-P file] name
mmsadm online -t library|drive name
mmsadm offline -t library|drive name
mmsadm add-volume -l library -o voltype=type -x vol1[,vol2,...] mpool
mmsadm remove-volume -x [-l library] [-x vol1[,vol2,...]] mpool
mmsadm label [-n] [-A application] [-l library] [-P file]volume[,volume,...]]
mmsadm showreq [-H] [drivename]
mmsadm accept [-r "reason"] requestid
mmsadm reject [-r "reason"] requestid
mmsadm dbbackup directory
mmsadm dbrestore file
mmsadm mount [-n] [-N] [-d drive] [-D density] -A application -l library [-P passwordfile] [-u username] [-b blocksize] [-R] [-M mode[,mode...] volume
mmsadm unmount [-A application] [-P file] [-f] volume|pseudodevice
The Media Management System (MMS) is a software interface that manages removable storage media such as tape libraries, tape drives, media pools, tape volumes, and disk resources that emulate tape drives and tape volumes. It is an implementation of the IEEE 1244 specification for removable media.
The MMS consists of an MM server and database that control various library managers and drive managers. Administrators use mmsadm and its subcommands to configure and maintain storage resources from a variety of vendors. The MMS management commands, such as mmsadm, construct and issue the most frequently-used Media Management Protocol (MMP) commands, handling all events and acknowledgments. The MMP is defined in the IEEE 1244 specification.
The mmsinit(1M) command must be run to initialize MMS on a system before you can use the mmsadm command.
The mmsadm command is RBAC-compliant. (See rbac(5).) Required authorizations vary among individual subcommands and are listed in the descriptions of those subcommands.
The mmsadm supports the subcommands listed below. Each subcommand description includes a description of that subcommand's options and operands. A mmsadm command takes the form:
# mmsadm subcommand [options]
The discover subcommand displays the library, drives, or volumes on an Automated Control System Library Server (ACSLS) server, or the tape drives connected to the local system. Use this command to determine what resources are available and whether they have been configured for use with MMS.
discover requires the solaris.smf.read.mms authorization. The subcommand has the following syntax:
mmsadm discover [-H] [-t library|drive|vol] [-S ACSLS-host[:port]] -a
The subcommand options are described as follows.
-a
-H
-S ACSLS-host[:port]
-t library|drive|vol
-t library
-t drive
-t vol
If this option is not used, library and drive resources are included in the display. The number of volumes can be large so their discovery must be requested explicitly.
The create subcommand configures the resource to be managed by MMS. The set subcommand modifies the attributes of a resource managed by MMS. These subcommands share a common set of options.
ACSLS-controlled libraries and disk archiving libraries are supported. Libraries must be configured before any drive pool and drives managed in that library can be configured, or any volumes managed by the library added to media pools. voltype must be configured before adding volumes to media pools.
The create and set subcommands require the solaris.smf.modify.mms, solaris.smf.value.mms, solaris.mms.*, and solaris.smf.read.mms authorizations, with the exception of changing tracing attributes. If changing the size of trace files or trace level, only solaris.mms.device.log and solaris.smf.read.mms authorizations are required.
These subcommands have the following syntax:
create -t library|drive|mpool|dpool|app|voltype -o option=x [-o option2=y...] name set -t library|drive|mpool|dpool|app|voltype -o option=x [-o option2=y...] name
The subcommand options and operand are described as follows.
-t type
library
drive
mpool
dpool
app
voltype
-o option=x [-o option2=y...]
Library Options:
hwtype=type
For disk archiving libraries, specify DISK.
The following are options for real network attached libraries.
acs=acs_number
lsm=lsm_number
serialno=serial_num
acsls=host[:port]
The following are options for disk archiving libraries.
dkpath=path
dkaltpath=host1@directory1[,host2@directory2]
All libraries have the following options.
msg-level=emergency|alert|critical|error|warning|notice|
information|debug
trace-level=emergency|alert|critical|error|warning|
notice|information|debug
trace-file-size=size
trace-file-size=15M
Drive Options:
hwtype=type
serialno=serial
library=library_name
connection=host,[host]
apps=app1[,app2,...]
msg-level=emergency|alert|critical|error|warning|notice|
information|debug
trace-level=emergency|alert|critical|error|warning|
notice|information|debug
trace-file-size=size
trace-file-size=15M
unload-time=num_minutes
reserve=yes|no
Drive Pool Options
Specifies which applications registered with MMS can use this drive pool. To specify that more than one application can use this pool, enter each application name, separated by commas.
Media Pool Options
apps=app1[,app2,...]
Application Options
retain=num_days
validate-expiration=yes|no
validate-volid=yes|no
validate-filename=yes|no
overwrite-existing=yes|no|ask
System Options
log-level=emergency|alert|critical|error|warning|notice|
information|debug
num-restarts=num
attended=yes|no
num-sockets=num
disk-timeout=seconds
dkvol Options
dirname=path
size=num
readonly=true|false
mpool=pool_name
dkdrive Options
apps=app1[,app2,...]
msg-level=emergency|alert|critical|error|warning|notice|
information|debug
trace-level=emergency|alert|critical|error|warning|
notice|information|debug
trace-file-size=size
trace-file-size=15M
unload-time=num_minutes
voltype Options
mediatype=type
size=num
The create and set subcommands have the following operand.
name
For a library: LIB_type_serial
Example: LIB_L180_MPC02209500
For a drive: DRV_type_serial
Example: DRV_T9940B_479000010675
For a disk archive volume: VOL_xxxxxx
Application names must reflect the name the application itself is going to use when communicating with MMS. Check the application documentation to find this value.
The delete subcommand deletes the entry for the specified resource from the MMS configuration. Use caution when removing media pools, as this might result in data loss. If the resource to be deleted is determined to be in use, the operation will be rejected unless the -f option is specified.
Deleting a library involves deleting all associated drives, and removing volumes managed by this library from media pools. Deleting a library is prohibited if any of its associated drives is actively in use, or any of its volumes have been used by an application.
Deleting a drive is prohibited if it is actively in use.
Deleting a drive pool is prohibited if any of its drives is being used by an application.
Deleting a media pool is prohibited if any of its volumes is being used by an application.
Deleting an application will cause all volumes that have been used by that application to be recycled and made available for reuse. Ensure that all required data has been copied from these volumes before deleting the application.
Deleting a voltype is prohibited if any volumes are assigned that type. The -f option cannot be used to force this operation.
The delete subcommand requires the solaris.smf.value.mms and solaris.mms.* authorizations.
This subcommand has the following syntax:
mmsadm delete -t library|drive|mpool|dpool|app|voltype [-f] name
The subcommand has the following options:
-f
-t library|drive|mpool|dpool|app|voltype
The subcommand has the following operand:
name
The list subcommand displays all of the storage resources or messages that meet the criteria specified in the options, filter, and name parameters. This subcommand is available to any user.
This subcommand has the following syntax:
mmsadm list [-vH] -t library|drive|mpool|dpool|app|voltype -o option[,-o option2,...] [-F filter [-F filter2...] [name]
The list subcommand has all of the options that are supported by the create and set subcommands. See the section on these subcommands for descriptions of those options. In addition to these options, list has the options and operand listed below.
-v
-H
-t type
-o option[,-o option2,...]
% mmsadm list -t drive -o name,state
-F filter [-F filter2...]
# mmsadm list -t drive -F hwtype=LTO4
Each resource type has its own options. All options are listed below. Most options are in common with the create subcommand; see the section on that subcommand for descriptions of these common options. Those options that are supported only by the list subcommand have their descriptions below.
Library Options
Options in common with set:
create-time
state
Drive Options
Options in common with set:
create-time
device-name
last-mount
state
total-mount-time
volume
Media Pool Options
There is one option in common with create, apps.
The following media pool options are unique to list.
create-time
free
size
used
Application Options
All of the application options are in common with create. These options are as follows:
Options in common with set:
active-sessions
Volume Options
All of the volume options are unique to list.
apps
create-time
free
last-mounted
library
mpool
num-mounts
size
total-mount-time
used
voltype
Volume Type Options
Both of the volume type options are unique to list.
mtype
size
The passwd subcommand changes the password for the MMS administrator, MMS Database administrator, or for MMS applications. If the -P option is not specified, the user will be prompted to enter the password.
The passwd subcommand has the following syntax.
mmsadm passwd [-P passwdfile] name
This subcommand requires the solaris.smf.value.mms and solaris.mms.* authorizations.
The passwd subcommand has the following option.
-P passwdfile
The passwd subcommand has the following operand.
name
The online and offline subcommands control whether the specified library or drive is available to clients. If a library is set to offline, all drives and volumes managed by that library are unavailable. If a drive is set to offline, no volume can be mounted or accessed on that drive.
The syntax for the online and offline subcommands is as follows:
mmsadm online -t library | drive name mmsadm offline -t library | drive name
The online and offline subcommands require the solaris.smf.read.mms and solaris.mms.device.state.* authorizations.
The online and offline subcommands have the following option.
-t library | drive
drive
library
The online and offline subcommands have the following operand.
name
The label subcommand labels specified volumes. The subcommand has the following syntax:
mmsadm label [-n] -l library -A application [-P file] volume[,volume,...]
The label subcommand requires the solaris.smf.read.mms and solaris.mms.media.* authorizations.
The label subcommand has the following options.
-l library
-n
-A application
-P file
The label subcommand has the following operand.
volume[,volume,...]
The add-volume subcommand adds new volumes to the specified media pool. The subcommand has the following syntax:
mmsadm add-volume -l library_name -o voltype=type -x vol1[,vol2,...] mpool
The add-volume subcommand requires the solaris.smf.read.mms and solaris.mms.media.* authorizations.
The add-volume subcommand has the following options.
-l library_name
-o voltype=type
-x vol1[,vol2,...]
The add-volume subcommand has the following operand.
mpool
The remove-volume subcommand removes volumes from the specified media pools. If a volume is being used by an application, the force option, -f, is required. If the option is not included in the command, the request is rejected. This subcommand prompts for confirmation unless -f is provided. The subcommand has the following syntax:
mmsadm remove-volume -f -x [-l library] vol1[,vol2,...] mpool
The remove-volume subcommand requires the solaris.smf.read.mms and solaris.mms.media.* authorizations.
The remove-volume subcommand has the following options.
-f
-l library_name
-x vol1[,vol2,...]
The remove-volume subcommand has the following operand.
mpool
The showreq subcommand lists any pending operator requests, each with a request identifier. The subcommand has the following syntax:
mmsadm showreq [-H] [drivename]
The showreq subcommand does not require any authorizations.
The showreq subcommand has the following option.
-H
The showreq subcommand has the following operand.
drivename
The accept subcommand accepts the operator request so that the MMS can proceed with the operation. The subcommand has the following syntax.
mmsadm accept [-r "response text"] requestid
The accept subcommand requires the solaris.mms.request.* and solaris.smf.read.mms authorizations.
The accept subcommand has the following option.
-r "response text"
The accept subcommand has the following operand.
requestid
The reject subcommand rejects the operator request. The subcommand has the following syntax.
mmsadm reject [-r "response text"] requestid
The reject subcommand requires the solaris.mms.request.* and solaris.smf.read.mms authorizations.
The reject subcommand has the following option.
-r "response text"
The reject subcommand has the following operand.
requestid
The dbbackup subcommand creates a backup file containing the contents of the MMS database. This file can be used to restore the MMS database in the case of accidental removal, corruption, or other destructive event. It is strongly suggested this backup file be created on a regular basis, and backed up as part of the system backups. The subcommand has the following syntax.
mmsadm dbbackup directory
The dbbackup subcommand requires the solaris.smf.manage.mms, solaris.smf.value.mms, and solaris.mms.* authorizations.
The dbbackup subcommand has the following operand.
directory
The dbrestore subcommand restores the MMS database from the specified file. The database is restored to the state it was in at the time the file was created by the mmsadm dbbackup command. The subcommand has the following syntax
mmsadm dbrestore filename
The dbrestore subcommand requires the solaris.smf.manage.mms and solaris.smf.value.mms authorizations.
The dbrestore subcommand has the following operand.
filename
The mount subcommand mounts a specified volume. The subcommand has the following syntax.
mmsadm mount [-n] [-N] [-d drive] [-D density] -A application -l library [-P file] [-u username] [-b blocksize] [-R] [-M mode[,mode...] volume
The mount subcommand requires the solaris.mms.io.[read|write|*] authorization.
The mount subcommand has the following options.
-A application
-b blocksize
9940 and 9840
LTO (all models)
The choice of variable or fixed block is specified in the argument to the -M (mode) option. If you specify fixed, then -b is the block size because you can only read and write blocks in the block size you specified.
-d drive
-D density
-l library_name
-M mode[,mode...]
-n
-N
-P file
-R
-u username
The mount subcommand has the following operand.
volume
The unmount subcommand unmounts the specified volume or MMS pseudodevice. The subcommand has the following syntax.
mmsadm unmount [-f] [-l library_name] [-A application] [-P file] volume|pseudodevice
The unmount subcommand requires the solaris.mms.io.[read|write|*] authorization.
The unmount subcommand has the following options.
-A application
-f
-l library_name
-P file
The unmount subcommand has one of the following operands.
pseudodevice
volume
Example 1 Displaying Available Libraries
To display all libraries available to be managed by the MMS, enter:
# mmsadm discover -t library -S my-acsls-server
Example 2 Creating a Library
To create a library in the MMS, enter:
# mmsadm create -t library -o acsls=my-acsls-server -o acs=0 \ -o lsm=1 -o hwtype=L180 -o serialno=7493476 LIB_L180_7493476
Example 3 Creating a Drive
To create a drive in the MMS, enter:
# mmsadm create -t drive -o library=LIB_L180_7493476 \ -o hwtype=LTO2 -o serialno=6453805873 \ -o connection=myhost DRV_LTO2_6453805873
Example 4 Making Library Available
To make a library available for use, enter:
# mmsadm online LIB_L180_7493476
Example 5 Registering an Application
To register an application, enter:
# mmsadm create -t app -P /var/tmp/app_passwd MyBackupApp
Example 6 Allowing an Application to Use a Drive
To allow the MyBackupApp application to use a drive, enter:
# mmsadm set -t drive -o apps=MyBackupApp DRV_LTO2_6453805873
Example 7 Listing Volumes in a Library
To show volumes in library L700_99987004 of type LT03, enter:
# mmsadm list -t vol -o library=L700_99987004 -F mtype=LTO3
Example 8 Listing Unconfigured Volumes
To show volumes not yet configured for the MMS, enter:
# mmsadm discover -t vol -S my_acsls_server
Example 9 Configure an MMS for Three Applications
The following sequence of commands illustrates the process of configuring a Media Management System for three applications, engineering, finance, and backup.
Initialize the MM server and set the administrator password to mmsadm2008 in the password file, mmsadm_passwd:
# mmsinit -P ~/mmsadm_passwd
Create an application for the engineering application:
# mmsadm create -t app -P ~/eng_passwd eng
Create an application for the finance application:
# mmsadm create -t app -P ~/finance_passwd finance
Create an application for the backup application:
# mmsadm create -t app -P ~/backup_passwd backup
Create an L700 library named library1:
# mmsadm create -t library -o acsls=mms-280-1 -o hwtype=L700 \ -o acs=0 -o lsm=0 -o serialno=MPC02201638 library1
Create a drive pool named org_dpool, to be shared between the engineering and finance applications:
# mmsadm create -t dpool -o apps=eng,finance org_dpool
Create a drive pool named shared_dpool, to be shared by the engineering, finance, and backup applications:
# mmsadm create -t dpool -o apps=eng,finance,backup shared_dpool
Create an exclusive drive pool for the backup application named bk_dpool:
# mmsadm create -t dpool -o apps=backup bk_dpool
Add a 9940 drive named drive1 shared by the engineering and finance applications:
# mmsadm create -t drive -o hwtype=9940 -o serialno=479000002009 \ -o library=library1 -o dpool=org_dpool drive1
Add a 9940 drive named drive2 shared by the engineering, finance, and backup applications:
# mmsadm create -t drive -o hwtype=9940 -o serialno=479000001954 \ -o library=library1 -o dpool=shared_dpool drive2
Add an exclusive 9940 drive named drive3 for the backup application:
# mmsadm create -t drive -o hwtype=9940 -o serialno=479000001944 \ -o library=library1 -o dpool=bk_dpool drive3
Create media pool for the engineering and finance applications named org_mpool:
# mmsadm create -t mpool -o apps=eng,finance org_mpool
Create an exclusive media pool for the backup application named bk_mpool:
# mmsadm create -t mpool -o apps=backup bk_mpool
Add three volumes to the engineering and finance media pool:
# mmsadm add-volume -l library1 -o voltype=9940 \ -x 000220,000221,000222 org_mpool
Add two volumes to the backup media pool:
# mmsadm add-volume -l library1 -o voltype=9940 \ -x 000230,000231 bk_mpool
Write a volume label on the volume. The volume becomes owned by the engineering application. The finance or backup applications are, as a result, not able to use the volume:
# mmsadm label -P ~/eng_passwd -l library1 -A eng 000220
Verify that the engineering application owns the volume:
# mmsadm label -P ~/finance_passwd -l library1 -A finance 000220
Write a volume label for the finance application:
# mmsadm label -P ~/finance_passwd -l library1 -A finance 000221
Write a volume label for the backup application:
# mmsadm label -P ~/backup_passwd -l library1 -A backup 000230
Mount media for the engineering, finance and backup applications. The handle returned by the mount command will be used as a normal /dev/rmt entry:
# mmsadm mount -P ~/eng_passwd -l library1 -A eng 000220 # mmsadm mount -P ~/finance_passwd -l library1 -A finance 000221 # mmsadm mount -P ~/backup_passwd -l library1 -A backup 000230
Unmount the media and unload the drives:
# mmsadm unmount -P ~/eng_passwd -U -l library1 -A eng 000220 # mmsadm unmount -P ~/finance_passwd -U -l library1 -A finance 000221 # mmsadm unmount -P ~/backup_passwd -U -l library1 -A backup 000230
Example 10 Configure an MMS for Disk Archiving
The following sequence of commands configures a Media Management System for disk archiving.
Create a test application:
# mmsadm create -t app -P ~/test_passwd test
Create a disk archiving library named dklib1:
# mmsadm create -t library -o hwtype=DISK -o dkpath=/dskpool dklib1
Create a disk archiving media pool named dkcarts:
# mmsadm create -t mpool -o apps=test dkcarts
Create three 100 GB volumes for disk archiving and place the volumes in the media pool:
# mmsadm add-volume -l dklib1 -o voltype=DISK -x 000000,000001,000002 \ -o size=100g dkcarts
Create a disk archiving drive pool named dkdrives:
# mmsadm create -t dpool -o apps=test dkdrives
Create a disk archiving drive and place it in the drive pool:
# mmsadm create -t drive -o hwtype=DISK -o library=dklib1 \ -o dpool=dkdrives dkdrive1
Create volume labels. The volume will be labeled when it is mounted:
# mmsadm label -P ~/test_passwd -n -l dklib1 -A test 000000 # mmsadm label -P ~/test_passwd -n -l dklib1 -A test 000001 # mmsadm label -P ~/test_passwd -n -l dklib1 -A test 000002
Mount the volume 000000. Use the returned tape handle in a subsequent tar command:
# mmsadm mount -P ~/test_passwd -n -l dklib1 -A test 000000
Show the file sizes of the disk archiving volume before creating tar archive:
% ls -la /dskpool/dklib1/000000
Create a disk archiving tar archive:
# tar -cvf <mms_handle> /var > /tmp/out$$ 2>&1
Show the file sizes of the disk archiving volume after creating the tar archive:
% ls -la /dskpool/dklib1/000000
Unmount and unload the volume from the drive:
# mmsadm unmount -P ~/test_passwd -U -l dklib1 -A test 000000
0
>0
See attributes(5) for descriptions of the following attributes:
|
mmsclient(1M), mmsexplorer(1M), mmsinit(1M), mount(1M), attributes(5), mms(5), rbac(5)
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |