| Skip Navigation Links | |
| Exit Print View | |
|
Sun QFS and Sun Storage Archive Manager 5.3 Reference Manual Sun QFS and Sun Storage Archive Manager 5.3 Information Library |
1. User Commands (Man Pages Section 1)
2. Maintenance Commands (Man Pages Section 1M)
3. Library Functions (Man Pages Section 3)
4. Library Functions (Man Pages Section 3X)
5. File Formats (Man Pages Section 4)
NAME
sam-archiverd - SAM-QFS file archive daemon
SYNOPSIS
/opt/SUNWsamfs/sbin/sam-archiverd
AVAILABILITY
SUNWsamfs
DESCRIPTION
The archiver daemon automatically archives SAM-QFS files
when a SAM-QFS file system is mounted. It is started by
sam-fsd, and it cannot be executed from a command line.
Directives for controlling the archiver are read from the
archiver commands file, which is
/etc/opt/SUNWsamfs/archiver.cmd. This file does not have to
be present for the archiver daemon to execute. If the
archiver.cmd file is present, however, it must be free of
errors. Errors in the archiver.cmd file prevent the
archiver daemon from executing. If the archiver.cmd file is
not present, all files on the file system are archived to
the available removable media according to archiver
defaults.
sam-archiverd executes in the directory
/var/opt/SUNWsamfs/archiver. This is the archiver's working
directory. Each sam-arfind daemon executes in a subdirec-
tory named for the file system being archived. Each sam-
arcopy daemon executes in a subdirectory named for the
archive file (rm0 - rmxx) being archived to.
ARCHIVING INTERNALS
Archive Sets are the mechanism that the archiver uses to
direct files in a samfs file system to media during archiv-
ing.
All files in the file system are members of one and only one
Archive Set. Characteristics of a file are used to deter-
mine Archive Set membership. All files in an Archive Set
are copied to the media associated with the Archive Set.
The Archive Set name is simply a synonym for a collection of
media volumes.
Files are written to the media in an Archive File which is
written in tar format. The combination of the Archive Set
and the tar format results in an operation that is just like
using the command find(1) to select files for the tar com-
mand.
In addition, the file system meta data, (directories, the
index of segmented files, and the removable media informa-
tion), are assigned to an Archive Set to be copied to media.
The Archive Set name is the name of the file system. (See
mcf(4)). Symbolic links are considered data files for the
purposes of archiving.
Each Archive Set may have up to four archive copies defined.
The copies provide duplication of files on different media.
Copies are selected by the Archive Age of a file.
Files in an Archive Set are candidates for archival action
after a period of time, the Archive Age, has elapsed. The
Archive Age of a file is computed using a selectable time
reference for each file. The default time reference is the
file's modification time.
For processing files in archive sets with an unarchive age
specified, the unarchive age default time reference is the
file's access time. But, in this case, two other conditions
are recognized: If the modification time is later than the
access time, the modification time is used. And, if an
archive copy was unarchived, the file will be rearchived
only after the file is staged from another copy, i.e the
file was offline at the time a read access was made to the
file.
Since users may change these time references to values far
in the past or future, the time reference will be adjusted
by the archiver to keep it in the range: creation_time <=
time_ref <= time_now.
Scheduling archive copies.
Finding files to archive.
Each file system is examined by an individual sam-arfind.
The examination is accomplished by one of three methods.
The method is selected by the examine = method directive.
(See archiver.cmd(4)). The examination methods are:
1. Continuous archiving. Scanning directories is performed
as files and directories are created and changed.
2. The 'traditional' examination mode. The first time that
sam-arfind executes, all directories are recursively
scanned. This assures that each file gets examined. The
file status "archdone" is set if the file does not need
archiving. All other scans are performed by reading the
.inodes file.
3. Scan only the directory tree. Recursively descend
through the directory tree. If a directory has the "noar-
chive" attribute set, it will not be examined. This allows
the system administrator to identify directories that
contain only files and sub directories that have all archive
copies and no changes will be made to the files or sub
directories. This can dramatically reduce the work required
to examine a file system.
4. Read the .inodes file. If an inode does not have
"archdone" set, determine the file name and examine the
inode. If a large percentage of the files have status
"archdone" set, this method is faster than the scandirs
method.
Determining the Archive Set
In this step, the archiver determines the archive set to
which the file belongs using the file properties descrip-
tions. If the Archive Age of the file has been met or
exceeded, add the file to the archive request (ArchReq) for
the Archive Set. The ArchReq contains a 'batch' of files
that can be archived together. For segmented files, the
segment, not the entire file, is the archivable unit, so the
properties (e.g. minimum file size) and priorities apply to
the segment. The ArchReq-s are files in separate direc-
tories for each filesystem. I.e:
/var/opt/SUNWsamfs/archiver/file_system/ArchReq and you can
display them by using the showqueue(1M) command. An ArchReq
is removed once the files it specifies have been archived.
The characteristics used for determining which Archive Set a
file belongs in are:
directory path portion of the file's name
complete file name using a regular expression
user name of the file's owner
group name of the file's owner
minimum file size
maximum file size
If a file is offline, select the volume to be used as the
source for the archive copy. If the file copy is being
rearchived, select that volume.
Each file is given a file archive priority. The archive
priority is computed from properties of the file and pro-
perty multipliers associated with the Archive Set. The com-
putation is effectively:
ArchivePriority = sum(Pn * Mn)
where: Pn = value of a file property
Mn = property multiplier
Most property values are 1 or 0 as the property is TRUE or
FALSE. For instance, the value of the property 'Copy 1' is
1 if archive copy 1 is being made. The values of 'Copy 2',
'Copy 3' and 'Copy 4' are therefore 0.
Others, such as 'Archive Age' and 'File size' may have
values other than 0 or 1.
The archive priority and the Property multipliers are float-
ing point numbers. The default value for all property mul-
tipliers is 0.
The file properties used in the priority calculation are:
Archive Age seconds since the file's Archive Age
time reference (time_now - time_ref)
Copy 1 archive copy 1 is being made
Copy 2 archive copy 2 is being made
Copy 3 archive copy 3 is being made
Copy 4 archive copy 4 is being made
Copies made number of archive copies previously made
File size size of the file in bytes
Archive immediate immediate archival requested for file
Rearchive archive copy is being rearchived
Required for release
archive copy is required before file may
be released
All the priorities that apply for a file are added together.
The priority of the ArchReq is set to the highest file
priority in the ArchReq.
When the filesystem scan is finished, send each ArchReq to
sam-archiverd.
Composing archive requests.
If the ArchReq requires automatic 'owner' Archive Sets,
separate the ArchReq by owner.
Sort the files according to the 'sort' method. Sorting the
files will tend to keep the files together in the archive
files. The default is no sorting so the files will be
archived in the order encountered during the file system
scan.
Separate the ArchReq into online and offline files. All the
online files will be archived together, and the offline
files will be together.
The priority of each ArchReq created during this process is
set to the highest file priority in the ArchReq. Enter the
ArchReq into the scheduling queue in priority order.
Scheduling from the queue.
When an ArchReq is ready to be scheduled to an sam-arcopy,
the volumes are assigned to the candidate ArchReq-s as fol-
lows:
The volume that has most recently been used for the Archive
Set is used if there is enough space for the ArchReq.
If an ArchReq is too big for one volume, files that will fit
on the volume are selected for archival to that volume. The
remaining files will be archived later.
An ArchReq with a single file that is too large to fit on
one volume, and is larger than 'ovflmin' will have addi-
tional volumes assigned as required. The additional volumes
are selected in order of decreasing size. This is to minim-
ize the number of volumes required for the file.
For each candidate ArchReq, compute the a scheduling prior-
ity by adding the archive priority to the following proper-
ties and the associated multipliers:
Archive volume loaded
the first volume to be archived to is
loaded in a drive
Files offline the request contains offline files
Multiple archive volumes
the file being archived requires more
than one volume
Multiple stage volumes
the file being archived is offline on
more than one volume
Queue wait seconds that the ArchReq has been queued
Stage volume loaded the first volume that contains offline
files is loaded in a drive
Enter each ArchReq into the archive queue in priority order.
Schedule only as many sam-arcopy-s as drives allowed in a
robot or allowed by the Archive Set. When all sam-arcopy-s
are busy, wait for an sam-arcopy to complete. Repeat the
scheduling sequence until all ArchReq-s are processed.
If the Archive Set specifies multiple drives, divide the
request for multiple drives.
Assigning an ArchReq to an sam-arcopy.
Step through each ArchReq-s to mark the archive file boun-
daries so that each archive file will be less than archmax
in size. If a file is larger than archmax, it will be the
only file in an archive file.
Using priorities to control order of archiving.
By default, all archiving priorities are set to zero. You
may change the priorities by specifying property multi-
pliers. This allows you to control the order in which files
are archived. Here are some examples (see archiver.cmd(4)):
You may cause the files within an archive file to be
archived in priority order by using -sort priority.
You may reduce the media loads and unloads with: -priority
archive_loaded 1 and -priority stage_loaded 1.
You may cause online files to be archived before offline
files with: -priority offline -500.
You may cause the archive copies to be made in order by
using: -priority copy1 4000, -priority copy2 3000, -
priority copy3 2000, -priority copy4 1000.
OUTPUT FORMAT
The archiver can produce a log file containing information
about files archived and unarchived. Here is an example:
A 2000/06/02 15:23:41 mo OPT001 samfs1.1 143.1 samfs1 6.6 16384 lost+found d 0 51
A 2000/06/02 15:23:41 mo OPT001 samfs1.1 143.22 samfs1 19.3 4096 seg d 0 51
A 2000/06/02 15:23:41 mo OPT001 samfs1.1 143.2b samfs1 22.3 922337 rmfile R 0 51
A 2000/06/02 15:23:41 mo OPT001 samfs1.1 143.34 samfs1 27.3 11 system l 0 51
A 2000/06/02 15:23:41 mo OPT001 samfs1.1 143.35 samfs1 18.5 24 seg/aa I 0 51
A 2000/06/02 15:23:43 ib E00000 all.1 110a.1 samfs1 20.5 14971 myfile f 0 23
A 2000/06/02 15:23:44 ib E00000 all.1 110a.20 samfs1 26.3 10485760 seg/aa/1 S 0 23
A 2000/06/02 15:23:45 ib E00000 all.1 110a.5021 samfs1 25.3 10485760 seg/aa/2 S 0 23
A 2000/06/02 15:23:45 ib E00000 all.1 110a.a022 samfs1 24.3 184 seg/aa/3 S 0 23
A 2003/10/23 13:30:24 dk DISK01/d8/d16/f216 arset4.1 810d8.1 qfs2 119571.301 1136048 t1/fileem f 0 0
A 2003/10/23 13:30:25 dk DISK01/d8/d16/f216 arset4.1 810d8.8ad qfs2 119573.295 1849474 t1/fileud f 0 0
A 2003/10/23 13:30:25 dk DISK01/d8/d16/f216 arset4.1 810d8.16cb qfs2 119576.301 644930 t1/fileen f 0 0
A 2003/10/23 13:30:25 dk DISK01/d8/d16/f216 arset4.1 810d8.1bb8 qfs2 119577.301 1322899 t1/fileeo f 0 0
Field Description
1 A for archived.
R for re-archived;
U for unarchived.
2 Date of archive action.
3 Time of archive action.
4 Archive media.
5 VSN. For removable media cartridges, this is the
volume serial name. For disk archives, this is
the disk volume name and archive tar file path.
6 Archive set and copy number.
7 Physical position of start of archive file on
media and file offset on the archive file / 512.
8 File system name.
9 Inode number and generation number. The genera-
tion number is an additional number used in addi-
tion to the inode number for uniqueness since
inode numbers get re-used.
10 Length of file if written on only 1 volume. Length
of section if file is written on multiple volumes.
11 Name of file.
12 Type of the file. File is of type c:
d directory
f regular file
l symbolic link
R removable media file
I segment index
S data segment
13 Section of an overflowed file/segment.
14 Equipment number from the mcf of the device on
which the archive copy was made.
SEE ALSO
archiver(1M), archiver.cmd(4), sam-arcopy(1M), sam-
arfind(1M)