migrationd.cmd - Oracle HSM sam-migrationd
(1m) command file
∕etc∕opt∕SUNWsamfs∕migrationd.cmd
SUNWsamfs
The Oracle HSM Automated Media Migration feature moves archived files from one set of archival media volumes to another. Archive administrators use this feature prior to replacing worn volumes and obsolete media types.
The administrator enters migration instructions into a command file,
∕etc∕opt∕SUNWsamfs∕migrationd.cmd
. When the Oracle HSM sam-fsd
configuration daemon next starts, it checks the Automated Media Migration
command file for errors. If the file is error-free, sam-fsd
starts the
Automated Media Migration demon, sam-migrationd
. The sam-migrationd
daemon then carries out the instructions in the command file.
Administrators can modify the migrationd.cmd
file at any time. Each new
configuration takes effect when the samd
config
or samcmd
migconfig
command is next run (samd
config
reads all Oracle HSM configuration
files, while samcmd migconfig
reads only the migrationd.cmd
file).
Do not issue either command unless the samu
x
screen shows the
migration status as Stop
.
Take following steps to configure or change migrationd.cmd
:
Edit the migrationd.cmd
file.
Check the samu
x
screen for migration activity. Make sure that
migration status is stop
.
If necessary, use the samcmd migstop
command to change the migration
status to stop
.
To activate the new settings in the migrationd.cmd
file, restart the
Automated Media Migration service. Use the command samcmd
migconfig
or samd
config
.
If a configuration error is detected, error messages are logged to the file
∕var∕opt∕SUNWsamfs∕sammig∕logfile
.
In the migrationd.cmd
file, directives are identified by an =
(equals) character in the second field of a line.
xcopy = on | off | only
Controls xcopy
, the Oracle StorageTek Direct Copy feature that allows
drive-to-drive copying of tape volumes.
on
tells the migration service to prefer StorageTek Direct Copy.
If the source or destination cannot use StorageTek Direct Copy, the migration service automatically makes the copy using Memory Assisted Copy, the Oracle HSM feature that copies tape volumes via memory buffers on the server.
only
tells the migration service to use only StorageTek Direct Copy.
If the source or destination cannot use StorageTek Direct Copy, the migration service cancels migration.
off
tells the migration service to use only Memory Assisted Copy.
The default is off
.
xcopy_eod = on | off
Enables or disables the end-of-data (EOD
) mode of the StorageTek Direct
Copy feature.
on
enables EOD
mode.
The T10000 drive copies the first tape archive (tar
) file
that contains one or more current copies of file system data and all subsequent
tar
files, whether or not they contain current copies of file system
data. Copying continues until the drive encounters the end-of-data (EOD) mark
on the tape.
off
disables EOD
mode.
The T10000 drive copies all tape archive (tar
) files that
contain current copies of file system data and skips those that do not. As a
result, data is partially repacked as it is copied to the destination tape.
The default is off
.
xcopy_minsize =
sizeGuarantees that StorageTek Direct Copy mode copies at least size bytes
before it terminates in response to a stager or archiver request or a
samcmd migidle
command (Memory Assisted Copy mode terminates at the end
of the current tape archive file).
You can specify xcopy_minsize
using any of the following units: k
(kilobytes), M
(megabytes), G
(gigabytes), T
(terabytes),
P
(petabytes), or E
(exabytes).
The default, 1
, terminates StorageTek Direct Copy at the end of the
current tape archive file.
logdir =
pathSets the migrationd
log file directory to path, where path is
the absolute path to the directory that will hold the log file.
A migrationd
log file is created for each source VSN. Each log file
contains an entry for each file migrated. Each entry includes the date, time,
media type, volume, copy number, position and offset on the volume, mount point,
inode and generation number, file name, file type, copy mode (x
for
StorageTek Direct Copy or s
for Memory Assisted Copy), and equipment
ordinal numbers of the source and destination devices. Each file is named
media-type.
VSN.
In the example, the directive specifies that the directory
∕var∕tmp∕miglog∕
will hold the migration logs:
logdir = ∕var∕tmp∕miglog
The second example lists log files as they would appear in the directory following migration:
root@mds:~# ls ∕var∕tmp∕miglog∕ li.SRC200 li.SRC201 li.SRC202 ti.DST500 ti.DST501 root@mds:~#
A log directory is not specified by default.
dbdir =
directory_nameSets the sam-migrationd
inode database directory to path,
where path is the absolute pathname to the directory that will hold the
databases.
The default is ∕var∕opt∕SUNWsamfs∕sammig∕db
.
When the sam-migrationd
daemon finds a migration candidate during a file
system scan, it creates an inode database for the corresponding source volume.
It maintains the inode database until it has migrated all files on the source
volume or stopped on an error, at which point it deletes the database.
For example, the following directive specifies the database home directory
∕var∕tmp∕migdb
:
dbdir = ∕var∕tmp∕migdb
The database file for the StorageTek T10000 (ti
) volume T10K01
resides in the specified directory:
root@mds~# ls ∕var∕tmp∕migdb ti.T10K01 root@mds~#
Each database record is 224 bytes long. One record is created for the each archived file copy on the source VSN. So make sure that you have enough disk space to hold the databases for all of the volumes that you intend to migrate at any one time.
run_time = always |
start_time end_timeSchedules sam-migcopy
, the process that copies archive files from source
to destination media.
always
runs sam-migcopy
continuously.
Volumes are copied in the background, when drives are not required for archiving or staging.
start_time and end_time start and stop the sam-migcopy
process
at the specified times.
start_time and end_time are expressed as number-hours (in 24-hour format) and number-minutes.
The directives samcmd
migstart
, migidle
and migstop
override the specified times.
Use this directive to reserve all drives for archiving and staging during peak hours. This directive does not affect execution of the filesystem scan, inode update and log phases.
sam-migcopy
cannot start at start_time unless sam-migrationd
is in the idle
state. Use samcmd migidle
to to idle
sam-migrationd
.
The default is always
.
bufsize = {
media buffer_size }
Sets the Automated Media Migration buffer size to the optimum size for source media of type media:
media is one of the two-character media-type identifiers listed on the
mcf
(4) man page.
buffer_size is an integer in the range 2-8192
.
The Oracle HSM software multiples the specified buffer_size by the default
block size for for the media type media. For more information on default
block sizes, see the description of dev_blksize
on the defaults.conf
(4) man page.
The default buffer size is 64.
max_drives = { library
eq count }
Sets the maximum number of drives that Automated Media Migration processes can use on a specified media library.
eq is the equipment ordinal number listed for the library in the mcf
(4) man page.
count is the allowed number of drives.
By limiting the number of drives to count, administrators can reserve drives exclusively for archiving and staging. The default value is the number of drives installed in the library.
In the example below, we allocate two of the drives in library 20
and four
of the drives in library 30
to migration:
max_drives = library 20 2 library 30 4
max_copy =
countSets the maximum number of sam-migcopy
processes that can be active at one
time to count, where:
count is an integer in the range 0-
maximum
maximum is the default value (see below).
By default, Oracle HSM allows one migcopy
process for every two drives
configured in the mcf
(4) file.
max_scan =
countSets the maximum number of volumes (VSNs) that can be scanned at one time to count, where:
count is an integer.
Integer values greater than 1
(one) limit the number of volumes scanned to
the number specified.
A value of 0
sets the number of volumes scanned to the total number of
volumes.
The sam-migrationd
daemon scans all file systems configured in the the
mcf
file for copies of data files that need to be migrated from source
volumes. It reads all inodes from the disk cache and compares the volume serial
numbers (VSNs) listed for the archive copies to the VSNs of the volumes that are
to be migrated. These file-system scans can significantly increase metadata
activity.
The default is 4.
vsnpool =
pool_name library
eq media-type media-listDefines a set of archival media volumes that is a source or destination for data migration:
pool_name is the user-assigned identifier for the set.
eq is the equipment ordinal number that identifies the media library in
the mcf
file.
media-type is one of the two-character media type identifiers listed on
the mcf
(4) man page.
media-list is a space-delimited list of volume serial numbers (VSNs) that
identify individual volumes and∕or regular expressions that identify groups or
ranges of VSNs. See the regcmp
(3c) man page for the applicable regular
expression syntax.
The sam-migrationd
daemon will not migrate volumes that need an audit,
are set for recycling, are marked bad
, or are unavailable. It will not
migrate LTFS or other foreign media. It will not migrate volumes when the source
VSN duplicates a destination VSN. It will not migrate cleaning media.
You can only specify volumes once. So, when you use the vsnpool
directive,
enter it before the migrate directive and specify the pools, not the member
volumes, in the migrate directive.
In the example, the first vsnpool
directive groups LTO (type li
)
source media in library 20
. The resulting pool contains individual volumes
SRC120
, SRC121
, and SRC122
. The second vsnpool
directive
groups Oracle StorageTek T10000D (type ti
) destination volumes in library
30
. The resulting pool contains two individual volumes, DST200
and
DST201
, and all volumes with VSNs that start with the string TTP
:
vsnpool = pool1 library 20 li SRC120 SRC121 SRC122 vsnpool = pool2 library 30 ti DST200 DST201 ^TTP
migrate = from
src-type src-list to
dstn-type dstn-listTells the sam-migrationd
daemon to migrate files from the specified source
media to the specified destination media:
src-type and dstn-type are two-character media type identifiers
listed on the mcf
(4) man page.
src-list and dstn-list are space-delimited lists of pool names and∕or volume serial numbers (VSNs) that identify individual volumes that are not part of a pool.
The first directive in the example migrates archive files from LTO (li
)
volumes SRC220
, SRC221
, and SRC222
to Oracle StorageTek
T10000D (ti
) volumes DST500
and DST501
. The second migrates
files from any media in pool1
to any media in pool2
:
migrate = from li SRC220 SRC221 SRC222 to ti DST500 DST501 migrate = from pool1 to pool2
# migrationd.cmd file: run_time = always xcopy = on logdir = ∕var∕tmp∕miglog dbdir = ∕var∕tmp∕migdb bufsize = li 128 max_drives = library 20 4 library 30 4 max_copy = 4 max_scan = 4 vsnpool = pool1 library 20 li SRC120 SRC121 SRC122 vsnpool = pool2 library 30 ti DST200 DST201 ^TTP migrate = from li LIT300 LIT301 to li LIT900 migrate = from pool1 to pool2
The sam-migrationd
daemon does not support manually loaded devices.
Volumes that participate in migration must reside in automated tape libraries.