Skip Navigation Links | |
Exit Print View | |
![]() |
Sun Storage Archive Manager 5.3 Configuration and Administration Guide Sun QFS and Sun Storage Archive Manager 5.3 Information Library |
2. Configuring Storage Devices for Archiving
3. Performing Additional SAM-QFS Configuration
4. Creating Parameters Files for Network-Attached Automated Libraries
5. Checking the Drive Order in Libraries
7. Managing Automated Libraries and Manually Loaded Drives
8. Managing Vendor-Specific Libraries
11. Archive Directives (archiver.cmd)
12. Archive Set Directives (archiver.cmd)
Archive Set Assignment Directive
File Age search-criterion Arguments: -access and -nftv
File Age search-criterion Arguments: -after
File Size search-criterion Arguments: -minsize and -maxsize
Owner and Group search-criterion Arguments: -user and -group
File Name search-criterion Arguments Using Pattern Matching: -name regex
Release and Stage file-attributes Argument: -release and -stage
Controlling the Size of Archive Files: -archmax Parameter
Setting the Archiver Buffer Size: -bufsize Parameter
Specifying the Number of Drives for an Archive Request: -drivemax, -drivemin, and -drives
Maximizing Space on a Volume: -fillvsns Parameter
Specifying Archive Buffer Locks: -lock Parameter
Making Archive Copies of Offline Files: -offline_copy Parameter
Sorting Archive Files: -sort and -rsort Parameters
Controlling How Archive Files Are Written: -tapenonstop Parameter
Reserving Volumes: -reserve Parameter
Setting Archive Priorities: -priority Parameter
Scheduling Archiving: -startage, -startcount, and -startsize Parameters
The following archive sets are available by default:
Reserved archive set: no_archive and allsets.
The no_archive archive set is defined by default. Files assigned to this archive set are never archived. For example, files in a temporary directory can be assigned to the no_archive archive set.
The allsets archive set defines parameters that apply to all archive sets.
Each file system has a default archive set with the same name that cannot be changed. These archive sets are reserved for control structure information. For each file system, both the metadata and data files are archived. The file system archive set includes the directory and link information and any files that are not included in another archive set.
By default, files are archived as part of the archive set named for the file system. However, you can create archive sets for files that share common criteria such as size, ownership, group, or directory location. If a file does not match one of the specified archive sets, it is archived as part of the default archive set. A file in the file system can be a member of only one archive set. All files in an archive set are copied to the volumes associated with that archive set.
Archive files are compatible with the standard UNIX tar format for data compatibility with the Oracle Solaris OS and other UNIX systems. If a complete loss of your SAM-QFS environment occurs, the tar format allows file recovery using standard UNIX tools and commands.
The characteristics of archive set are controlled by the archive set directives. These directives are arranged in the following categories:
The Assignment directive defines archive sets: the destination of the archive copy, how long the copy is kept archived, and how long the software waits before archiving the data
Copy parameters define how each archive set is archived: The archiving process copies the data necessary for file system operations, including directories, symbolic links, the index of segmented files, and archive media information.
VSN association directives assign volumes to archive sets.
VSN pools directives define a collection of volumes.
You can create archive sets either by editing the archiver.cmd file as described in the following sections, or by using the SAM-QFS Manager software. In the SAM-QFS Manager, an archive policy defines an archive set. For more information, see the SAM-QFS Manager online help.
The archive set assignment directive selects files according to shared characteristics to include in archive sets. Each archive set assignment directive has the following format:
archive-set-name path [search-criterion1 search-criterion2 \ ... ] [file-attribute1 file-attribute2 ...]
|
Example 12-1 Archive set assignment directives.
In this example, all files in the user account hmk are archived in a separate archive set. All files over 1 MB in size in the directories in the xray group are archived in the datafiles archive set. All other files are archived in the system archive set.
hmk_files net/home/hmk -user hmk datafiles xray_group/data -size 1M system .
The following example shows directives that prevent archiving of files in a tmp directory at any level and regardless of the directory in which the tmp directory resides within the file system.
fs = samfs1 no_archive tmp no_archive . -name .*/tmp/
To use the last time a file was opened to define assignment to an archive set, use the -access age characteristic as one of the search-criterion arguments.
This characteristic causes files that have not been accessed within the value of age to be re-archived to different, less-expensive media. For age, specify an integer followed by one of the suffixes shown in the following table.
Table 12-1 File Age Suffixes
|
When determining age, the software validates the access and modification times for files to ensure that these times are greater than or equal to the file creation time, and less than or equal to the time at which the file is examined. For files that have been migrated into a directory, this validation might not result in the desired behavior. Use the -nftv (no file time validation) parameter in these situations to prevent the validation of file access and modification times.
Use the -after date-time characteristic to include files that have been modified or created recently into the same archive set. Only files created or modified after the date indicated are included in the archive set. Specify the date and time in the following format:
YYYY-MM-DD[Thh:mm>:ss][Z]
If the time is not specified, the default time is 00:00:00. If the Z is included, the time is Coordinated Universal Time (UTC). If the Z is not included, the time is local time.
Use the -minsize size and -maxsize size characteristics to restrict membership in an archive set to those over or under a specified size. For size, specify an integer followed by one of the letters shown in the following table.
Table 12-2 -minsize and -maxsize size Suffixes
|
Example 12-2 Using the -minsize and -maxsize Characteristics
This example specifies that all files of at least 500 kilobytes but less than 100 megabytes belong to the archive set big_files. Files bigger than 100 megabytes belong to the archive set huge_files.
big_files . -minsize 500k -maxsize 100M huge_files . -minsize 100M
To restrict membership in an archive group to ownership and group affiliation, use the -user name and -group name characteristics.
Example 12-3 Using the -user and -group Directive
In the following example, all files belonging to user sysadmin belong to archive set adm_set, and all files with the group name of marketing are in the archive set mktng_set.
adm_set . -user sysadmin mktng_set . -group marketing
To specify that file names are used for assignment to an archive set, use -name regex characteristic, which specifies that any complete path matching the regular expression regex is to be a member of the archive set.
All files beneath the selected directory (with their specified paths relative to the mount point of the file system) go through pattern matching. Therefore, you can specify patterns in the -name regex field to match both file names and path names.
The regex argument follows the conventions outlined in the regexp(5) man page. Regular expressions do not follow the same conventions as UNIX wildcards.
Example 12-4 -name Argument
The following directive restricts files in the archive set images to those files ending with .gif:
images . -name .gif$
The following directive selects files that start with the characters GEO for the satellite archive set:
satellite . -name /GEO
The following directive prevents any file ending with .o from being archived:
no_archive . -name .o$
Example 12-5 Pattern Matching With Regular Expression
The archive set assignment directive in the following example does not archive fred.* in the user directories or subdirectories.
# File selections. fs = samfs1 1 1s 2 1s no_archive share/marketing -name fred.
As a result, the following files are not archived:
/sam1/share/marketing/fred.* /sam1/share/marketing/first_user/fred.* /sam1/share/marketing/first_user/first_user_sub/fred.*
The following files are archived:
/sam1/fred.anything /sam1/share/fred.* /sam1/testdir/fred.* /sam1/testdir/share/fred.* /sam1/testdir/share/marketing/fred.* /sam1/testdir/share/marketing/second_user/fred.*
Example 12-6 Pattern Matching With Regular Expression
The archive set assignment directive in the following example does not archive fred.* in the user home directories but it does archive fred.* in the user subdirectories and in the directory share/marketing. In this case, a user home directory is the part of the string from share/marketing/ until the next slash character "/".
# File selections. fs = samfs1 1 1s 2 1s no_archive share/marketing -name ^share/marketing/[^/]*/fred.
The following files are not archived:
/sam1/share/marketing/first_user/fred.*
The following files are archived:
/sam1/share/fred.* /sam1/share/marketing/fred.* /sam1/share/marketing/first_user/first_user_sub/fred.* /sam1/fred.* /sam1/testdir/fred.* /sam1/testdir/share/fred.* /sam1/testdir/share/marketing/fred.* /sam1/testdir/share/marketing/second_user/fred.* /sam1/testdir/share/marketing/second_user/sec_user_sub/fred.*
You can set the release and stage attributes associated with files within an archive set by using the -release and -stage options, respectively. Both of these settings override any existing stage or release attributes.
The -stage option has the following format:
-stage attribute
|
Example 12-7 Archive Sets and File Attributes
The following example shows how you can use file name specifications and file attributes to partially release Macintosh resource directories.
MACS . -name .*/.rscs/ -release p
When the selection of a file for inclusion in an archive set is ambiguous, the archiver uses the following rules:
The membership definition occurring first in the archive set is chosen. Place the most restrictive assignment directives early in the archiver.cmd file.
Membership definitions local to a file system are chosen before any global definitions.
A membership definition that exactly duplicates a previous definition is noted as an error.
The archiver evaluates the file system-specific directives before evaluating the global directives. Therefore, files can be assigned to a local archive set (including the no_archive archive set) instead of being assigned to a global archive. This result has implications for global archive set assignments such as no_archive.
Example 12-8 archiver.cmd File With Membership Conflicts
In the following example, the administrator did not intend to archive any of the .o files across both file systems. However, because the local archive set assignment allfiles is evaluated before the global archive set assignment no_archive, the .o files in the samfs1 and samfs2 file systems are archived.
no_archive . -name .*.o$ fs = samfs1 allfiles . fs = samfs2 allfiles .
Example 12-9 archiver.cmd File Without Membership Conflicts
The following example shows the directives to use to ensure that no .o files are archived in the two file systems.
fs = samfs1 no_archive . -name .*.o$ allfiles . fs = samfs2 no_archive . -name .*.o$ allfiles .