Maintenance Commands archive_audit(1M)
NAME
archive_audit - Generate an archive audit
SYNOPSIS
/opt/SUNWsamfs/sbin/archive_audit [ -f audit_file ] [ -V ] [
-d ] [ -c archive_copy_number ]... root_path
AVAILABILITY
SUNWsamfs
DESCRIPTION
archive_audit generates an audit of all archived files and
removable media files (excluding archiver and stager remov-
able media files, and removable media files created for
disaster recovery which have not yet been referenced) in the
Sun StorEdge SAM-FS or Sun SAM-QFS directory root_path by
media type and VSN. The audit results are written to the VSN
audit file. An optional summary of all archive VSNs is
written to standard output.
Note that archive_audit will not be able to distinguish
removable media files used by the stager daemon in filesys-
tems which have been created in systems prior to Sun
StorEdge SAM-FS 4.0 and upgraded, so these sizes will be
counted in the totals. Also, removable media files created
by a user for disaster recovery purposes may duplicate space
on a volume assigned to an archive copy, in which case the
space will be accounted for twice.
OPTIONS
-c archive_copy_number
Only archive copies for the indicated
archive_copy_number will be examined. Multiple -c
archive_copy_number options may be given; then
archive copies for any of the archive_copy_numbers
will be examined.
-d Only damaged archive copies are listed in the VSN
audit file.
-f audit_file
The name of the VSN audit file. If -f is not
specified, or if audit_file is "-", then the out-
put is written to standard out. Archive_audit
appends to the audit_file.
-V Verbose. Write the optional summary to standard
output. Each file is summarized in the following
format:
media VSN n files, s bytes, d damaged copies.
Where media is the media type, VSN is the VSN, n is the
number of files on that VSN, and s is the number of bytes of
data archived on that VSN. d is the number of damaged
archive copies on that VSN.
VSN AUDIT FILE
The VSN audit file contains a 1-line entry for each section
on an archived file or removable media file. Each entry has
this information:
media vsn status copy section position size file seg_num
The format for the line is
"%s %s %s %d %d %llx.%llx %lld %s %d\n".
media is the archive media.
VSN is the archive VSN.
status is the archive copy status. Status is 4 dashes with
3 possible flags: S = Stale, r = rearchive, D = damaged.
copy is the number (1..4) of the archive copy residing on
that VSN. or zero if the file is a removable media file,
section is the section number (0..n),
position is position and file offset.
size is the size of the file/section.
file is the path name of the archived file or the removable
media file.
seg_num is the segment number of the archived segment of the
file. seg_num is 0 if it is a segmented file's index inode
or if the entry is a directory or a non-segmented file.
Data segments of a segmented file are numbered sequentially
beginning with 1.
The following is an example of the archive_audit line:
lt DLT000 ---- 1 0 4ffd.9fa5e 169643 /sam5/QT/rainbow.sgi 6
The first two fields indicate the media type and the volume
serial name on which the archive copy or removable media
file resides.
The next field consists of four dashes as follows:
Dash 0 - Stale or active entry
S the archive copy is stale. This means the file
was modified and this archive copy is for a
previous version of the file.
- the archive copy is active and valid.
Dash 1 - Archive status
r The archiver will rearchive this copy.
- This archive copy will not be rearchived.
Dash 3 - Damaged or undamaged status
D the archive copy is damaged. This archive
copy will not be staged.
- the archive copy is not damaged. It is a can-
didate for staging.
The next field shows copy number, 1..4, for the archive copy
or zero for the removable media file.
The next field shows section number, 0..n, for a multi-
volume archive file or removable media file.
The first hex number, 4ffd, is the position of the beginning
of the archive file on the media. The second hex number,
9fa5e, is the file byte offset divided by 512 of this copy
on the archive file. For example, 1 means this is the first
file on the archive file because it is offset by 512 bytes,
which is the length of the tar header.
The next field shows section size (file size if only 1 sec-
tion) for an archive file or the file size for a removable
media file.
The eighth field is the name of the archive file or remov-
able media file.
The last field shows the number of the archived file's seg-
ment. This field is 0 if the archive copy is of the seg-
mented file's index inode or if the archived file is not
segmented.
EXIT STATUS
The following exit values are returned:
0 Audit completed successfully.
6 Nonfatal: An issue encountered with rootpath's
filename or the path.
7 Nonfatal: Closing of a subdirectory under the
rootpath failed.
10 Nonfatal: sam_segment_vsn_stat for a file failed.
11 Nonfatal: sam_vsn_stat for a file failed.
12 Nonfatal: sam_readrminfo for a file failed.
13 Nonfatal: idstat for a file failed.
14 Nonfatal: getdent for a directory failed.
15 Nonfatal: Invalid segment size for a file encoun-
tered.
30 Fatal: Command line argument errors.
31 Fatal: Audit file issues were encountered.
32 Fatal: An issue with the root path or a subdirec-
tory was encountered.
35 Fatal: Malloc errors terminated archive_audit.
SEE ALSO
sam-archiverd(1M), mcf(4)
Sun Microsystems Last change: 09 Sep 2003
Maintenance Commands archiver(1M)
NAME
archiver - Sun StorEdge SAM-FS and Sun SAM-QFS file archiver
command file processor
SYNOPSIS
/opt/SUNWsamfs/sbin/archiver directive [value]
/opt/SUNWsamfs/sbin/archiver [-A] [-a] [ -c archive_cmd ]
[-f] [-l] [ -n filesystem ] [-v]
AVAILABILITY
SUNWsamfs
DESCRIPTION
The archiver command has two functions. It is used by the
archiver daemon (sam-archiverd) to process the archiver com-
mand file. The command file used by the archiver daemon is
/etc/opt/SUNWsamfs/archiver.cmd. This file does not have to
be present for the archiver 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 from execut-
ing. 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.
The second function allows you to use the command with the
options to evaluate the archiver commands file, archive_cmd.
No archiving is performed when the command is used in this
manner. When options are used, information about archiving
operations is written to standard output. It is recommended
that you test your archiver commands file each time it is
changed because any error found prevents the archiver from
running. If an archive_cmd file is not specified,
/etc/opt/SUNWsamfs/archiver.cmd is assumed.
Sample default output:
Reading archiver command file "example1.cmd"
Notify file: /etc/opt/SUNWsamfs/scripts/archiver.sh
Archive media:
media:sg bufsize: 4 archmax: 512.0M Volume overflow not selected
media:mo bufsize: 4 archmax: 4.8M Volume overflow not selected
Archive libraries:
Device:mo20 drives_available:0 archive_drives:1
Device:tp30 drives_available:0 archive_drives:3
Archive file selections:
Filesystem samfs1 interval: 300
Logfile: /var/opt/SUNWsamfs/archiver.log
samfs1 Metadata
copy:1 arch_age:240
big path:. minsize: 500.0k
copy:1 arch_age:30
copy:2 arch_age:7200
all path:.
copy:1 arch_age:30
Archive sets:
allsets
reserve: set//
allsets.1
.reserve: set//
allsets.2
archmax: 5G
.reserve: set//
allsets.3
.reserve: set//
allsets.4
.reserve: set//
all.1
.reserve: set//
media: mo
Total space available: 2.1G
big.1
.reserve: set//
media: sg
Total space available: 77.5G
big.2
.archmax: 5G
.reserve: set//
media: sg
Total space available: 77.5G
samfs1.1
.reserve: set//
media: mo
Total space available: 2.1G
Archive Set parameters set by the archiver command file are
listed for all Archive Sets. Parameters defined by allsets
and allsets.n are preceeded by the '.' character.
OPTIONS
-A Turn on all list options except -a.
-a List archive detail for files.
The -a option produces a line of output for each
file found in an inodes scan of a file system.
The line lists present and future archive activity
for the file. The line is in a fixed format con-
sisting of space (' ') separated fields as fol-
lows:
1 A single character that identifies the file type:
'l' Symbolic link
'R' Removable media file
'I' Segment index
'd' Directory
'f' Regular file
'b' Block special
'?' Other
2 The name of the file quoted using '"'.
The '"' and '\' characters in the file name are represented
by '\"' and '\\'.
3 inode.gen Inode and generation number
4 Archive Set name. If the file is not to be archived, '-'.
5 - 8 Archive information for the four possible copies.
If no archive copy required '-'
If archived, 'media.VSN'
If not archived, the time at which archiving will begin
'yyyy-mm-ddThh:mm:ss' (ISO 8601)
If the copy is to be unarchived, the time for unarchiving
'/yyyy-mm-ddThh:mm:ss'
The '-a' option will clear any previously set
option, except a file system name set by '-n'.
This allows a user to generate only the archive
activity information to standard out. This could
be used as input to sort, a spreadsheet or data-
base.
-c archive_cmd
The name of the archiver command file to be
evaluated. Default is
/etc/opt/SUNWsamfs/archiver.cmd.
-f List file system content. Sample output:
Filesystems:
qfs1 mount: /qfs1
Examine: noscan Interval: 2h
Logfile:/var/opt/SUNWsamfs/archiver/log
Producing statistics
File type Count Percent Bytes Percent Bytes
All 411,958 100.00% 8.3G 100.00% 8935481659
offline 26 0.1% 264.1M 3.10% 276878242
archdone 19,962 4.85% 1.9G 22.58% 2018002292
copy1 658 0.16% 1.8G 21.74% 1942851010
copy2 0
copy3 0
copy4 0
Regular 411,479 99.88% 8.3G 99.84% 8921596219
offline 26 0.01% 264.1M 3.10% 276878242
archdone 19,492 4.73% 1.9G 22.50% 2010445172
copy1 189 0.05% 1.8G 21.66% 1935297986
copy2 0
copy3 0
copy4 0
Segmented 0 0.00% 0 0.00% 0
offline 0
archdone 0
copy1 0
copy2 0
copy3 0
copy4 0
Directories 473 0.11% 13.2M 0.16% 13881344
offline 0
archdone 469 0.11% 7.2M 0.08% 7553024
copy1 469 0.11% 7.2M 0.08% 7553024
copy2 0
copy3 0
copy4 0
Symbolic links 5 0.00% 0 0.00% 0
offline 0
archdone 0
copy1 0
copy2 0
copy3 0
copy4 0
Removable media 1 0.00% 4.0k 0.00% 4096
offline 0
archdone 1 0.00% 4.0k 0.00% 4096
copy1 0
copy2 0
copy3 0
copy4 0
Column 2 is the number of files. Column 3 is the
percent of the total number of files. Column 4 is
the total size in bytes. Column 5 is the percent
of the total size. Column 6 is the exact total
size in bytes.
-l List input lines. Sample output:
1: logfile = /var/opt/SUNWsamfs/archiver.log
2: interval = 5m
3: big . -minsize 500k
4: 1 30s
5: 2 2h
6: all .
7: 1 30s
8: params
9: allsets -reserve set
10: allsets.2 -archmax 5G
11: endparams
12: vsns
13: samfs1.1 mo .*
14: all.1 mo .*
15: big.1 sg .*
16: big.2 sg .*
-n filesystem
List file system content (same as -f) for a single
filesystem.
-v List VSNs. Only lists VSNs with space available.
Sample output:
Archive libraries:
Device:mo20 drives_available:0 archive_drives:1
Catalog:
mo.mo0001 capacity: 1.2G space: 1.1G -il-o-------
mo.mo0002 capacity: 1.2G space: 1.0G -il-o-------
Device:tp30 drives_available:0 archive_drives:3
Catalog:
sg.004977 capacity: 20.0G space: 18.0G -il-o-b-----
sg.004978 capacity: 20.0G space: 0 -il-o-b-----
sg.004979 capacity: 20.0G space: 10.4G -il-o-b-----
sg.004975 capacity: 20.0G space: 18.0G -il-o-b-----
sg.004970 capacity: 20.0G space: 18.0G -il-o-b-----
sg.004971 capacity: 20.0G space: 13.1G -il-o-b-----
.
.
.
Archive sets:
allsets
reserve: set//
allsets.1
.reserve: set//
allsets.2
archmax: 5G
.reserve: set//
allsets.3
.reserve: set//
allsets.4
.reserve: set//
all.1
.reserve: set//
media: mo
Volumes:
mo0001
mo0002
Total space available: 2.1G
big.1
.reserve: set//
media: sg
Volumes:
004977
004979
004975
004970
004971
Total space available: 77.5G
big.2
.archmax: 5G
.reserve: set//
media: sg
Volumes:
004977
004979
004975
004970
004971
Total space available: 77.5G
samfs1.1
.reserve: set//
media: mo
Volumes:
mo0001
mo0002
Total space available: 2.1G
SEE ALSO
archiver.cmd(4), sam-archiverd(1M), sam-arcopy(1M), sam-
arfind(1M)
Sun Microsystems Last change: 06 Feb 2007
Maintenance Commands archiver.sh(1M)
NAME
archiver.sh - Sun StorEdge SAM-FS or Sun SAM-QFS archiver
exception notification script
SYNOPSIS
/etc/opt/SUNWsamfs/scripts/archiver.sh prg_name pid severity
msg_no msg
AVAILABILITY
SUNWsamfs
DESCRIPTION
The archiver executes the
/etc/opt/SUNWsamfs/scripts/archiver.sh script when it
encounters abnormal or exceptional events. You can
substitute a site-specific version of this script by using
the archiver's notify directive in the archiver.cmd(4) file.
For all events, the /etc/opt/SUNWsamfs/scripts/archiver.sh
script logs events to syslog using the /usr/bin/logger
command. In addition, the emerg, alert, crit, and err
keywords generate email to the root account, echoing the
message string.
OPTIONS
The archiver executes /etc/opt/SUNWsamfs/scripts/archiver.sh
and any scripts defined by the user through the notify
directive with the following arguments:
prg_name The name of the program that is calling this
script.
pid The process ID of the program that is calling this
script.
severity A keyword that identifies the severity and the
syslog level of the event. The keywords are as
follows: emerg, alert, crit, err, warning,
notice, info, and debug.
msg_no The message number as found in the message
catalog.
msg The text of the translated message string.
SEE ALSO
archiver(1M), archiver.cmd(4)
Sun Microsystems Last change: 12 Jan 2004
Maintenance Commands auditslot(1M)
NAME
auditslot - Audit slots in a robot
SYNOPSIS
/opt/SUNWsamfs/sbin/auditslot [ -e ] eq:slot[:partition] [
eq:slot[:partition]...]
AVAILABILITY
SUNWsamfs
DESCRIPTION
auditslot will send a request to the robot specified by the
equipment identifier eq to audit the media in the specified
slot. The slots must be in use and occupied (that is, the
media cannot be mounted in a drive). If slot contains a
two-sided optical cartridge, then both sides will be
audited.
OPTIONS
-e If slot is tape, skip to EOD and update space avail-
able. Caution: Skip to EOD is not interruptible and
under certain conditions can take hours to complete.
FILES
mcf The configuration file for Sun StorEdge
SAM-FS and Sun StorEdge QFS environments
SEE ALSO
export(1M), import(1M), move(1M), mcf(4), sam-robotsd(1M)
Sun Microsystems Last change: 3 Apr 2000
Maintenance Commands backto(1M)
NAME
backto - Restores configuration files to an existing
release's condition
SYNOPSIS
backto level
AVAILABILITY
SUNWsamfsr
SUNWqfsr
DESCRIPTION
The Sun SAM-FS and Sun SAM-QFS upgrade process moves certain
files, for example license files, to new locations. If you
revert to a previous release, use the backto script to
restore these files to their previous locations and formats.
Run this script before you remove the current release
package.
This command accepts the following options:
level Meaning
4.2 Use this argument to revert to the 4.2 releases.
4.3 Use this argument to revert to the 4.3 releases.
Because some files have paths or arguments added that do not
work on earlier systems, these files are not moved directly.
For such files, either go back to the previous version of
the file or edit the most current release's version of the
file to remove path changes and new features.
Sun Microsystems Last change: 28 Jul 2005
Maintenance Commands build_cat(1M)
NAME
build_cat - Build a media changer catalog file
SYNOPSIS
/opt/SUNWsamfs/sbin/build_cat [ -t media ] file catalog
/opt/SUNWsamfs/sbin/build_cat [ -t media ] - catalog
AVAILABILITY
SUNWsamfs
DESCRIPTION
build_cat will build a catalog file from file. If '-' is
substituted for file, standard input will be used. If nei-
ther file or '-' is given, the usage message is emitted and
build_cat exits.
Each line in the input file describes one piece of media in
the catalog. The first four fields are required. The
remaining fields should not be supplied except if generated
by the dump_cat utility. Manually creating or editing of
these fields can produce undesirable results.
The fields, in order, on each line are:
Index The index of this entry within the catalog. The
index must be an incrementing integer starting at
zero.
vsn The volume serial name of the media. If there is
no volume serial name then the character "?"
should be used.
bar code The bar code or volser for the media. If there is
no bar code then the string NO_BAR_CODE should be
used.
media type
The media type for this media (see mcf(4)).
ptoc-fwa The next position to be used to write data to the
media.
access count
The number of times the media has been mounted.
capacity The capacity of the device in 1024-byte units.
space avail
The amount of space left in 1024-byte units.
flags The flags field from the catalog entry, in numeric
form.
sector size
The tape block size or optical disk sector size.
label time
The time that the medium was labeled.
slot The slot containing the volume within the
automated library.
partition The partition or side of a magneto-optical car-
tridge. The value of partition is 0 for tapes, 1
or 2 for m-o cartridges.
modification time
The time the medium was last modified.
mount time
The time the medium was last mounted.
reserve time
The time the volume was reserved. A value of 0
means no reservation.
reservation
The volume reservation - archive-
set/owner/filessystem.
information field
Information about this volume supplied by the
user.
OPTIONS
-t media
Set the media type of the catalog to media (see mcf(4).
If the media option is specified, the media type field
from the input file must match the media type specified
by media. If the media option is not specified, no
enforcement of media type is performed.
STRANGE MEDIA
build_cat can be used to generate a catalog which contains a
combination of usual Sun StorEdge SAM-FS or Sun SAM-QFS
media and so-called foreign media. Foreign media are those
which are in non-SAM-FS format. The migration toolkit (SAM-
migkit) provides hooks for the site to use to enable Sun
StorEdge SAM-FS and Sun SAM-QFS file systems to stage (and
optionally re-archive) data from strange media.
When building a catalog for foreign media, the -t media
option must be used to set the physical media type. For
example, if the library contains DLT tapes, you would use -t
lt on the command line. In the input file, for each volume
which is strange, specify a media type beginning with 'z'.
SEE ALSO
dump_cat(1M), export(1M), import(1M), mcf(4), sam-
robotsd(1M)
Sun Microsystems Last change: 27 Sep 2000
Maintenance Commands chmed(1M)
NAME
chmed - Set or clear library catalog flags and values
SYNOPSIS
/opt/SUNWsamfs/sbin/chmed +flags specifier
/opt/SUNWsamfs/sbin/chmed -flags specifier
/opt/SUNWsamfs/sbin/chmed -capacity capacity specifier
/opt/SUNWsamfs/sbin/chmed -space space specifier
/opt/SUNWsamfs/sbin/chmed -time time specifier
/opt/SUNWsamfs/sbin/chmed -count count specifier
/opt/SUNWsamfs/sbin/chmed -vsn vsn specifier
/opt/SUNWsamfs/sbin/chmed -mtype media specifier
/opt/SUNWsamfs/sbin/chmed -I information specifier
AVAILABILITY
SUNWsamfs
WARNING
chmed sets or clears flags and values in a library catalog
entry. These values are critical to the operation of Sun
StorEdge SAM-FS and Sun SAM-QFS environments and should be
modified by administrators only in unusual circumstances.
Administrators should exercise caution in using this power-
ful command, as there is no checking to ensure that the
catalog remains consistent.
ARGUMENTS
These arguments are used in various combinations by the dif-
ferent forms of the command.
capacity is the total number of bytes that the volume can
contain. The capacity may be specified with 'k', 'M', 'G',
'T', 'P', and 'E' multipliers. e.g. 2.43G or 0.7G.
The updated capacity is interpreted in units of 1024k
blocks. For example, if '1023' is specified, a value of 0k
capacity is displayed. If '1023k' is specified, the updated
capacity is displayed as 1023k.
The space may also be specified in octal or hexadecimal
using '0' or '0x' respectively. However, fractional values
and multipliers are not allowed when using octal or hexade-
cimal representation. For example, '0400000' or '0x800000'.
count is the number of times a volume has been mounted since
import, or the number of times a cleaning cartridge may be
mounted before it is considered exhausted.
eq gives the equipment number (as defined in the mcf file)
for the robot being operated on.
flags is a string of one or more of the following case-
sensitive characters. Each character specifies one flag in
the catalog entry. The characters are the same as the flags
that are shown in the "flags" column of the robot VSN cata-
log:
A needs audit
C slot contains cleaning cartridge
E volume is bad or expired cleaning media
N volume is not in SAM format
R volume is read-only (software flag)
U volume is unavailable
W volume is physically write-protected
X slot is an export slot
b volume has a bar code
c volume is scheduled for recycling
f volume found full or foul by archiver
d volume has a duplicate vsn
l volume is labeled
o slot is occupied
p high priority volume
NOTE: The f flag can mean that the volume is 100% full or
that there is a problem with the tape. This can happen when
a new tape is imported into the library with a partial
label, or with a tape that does not have an EOD.
I is an information field to hold information on a volume. A
maximum of 128 characters is allowed and these characters
must be enclosed in quotation marks. An example is:
"Warehouse A, room 310, shelf 3"
media specifies the media type. Valid values include (among
others) mo and lt, for magneto-optical and DLT tape, respec-
tively. See mcf(4) for the complete list of media types
supported by Sun StorEdge SAM-FS and Sun SAM-QFS file sys-
tems.
space is the total number of bytes remaining to be written
on the volume. The space may be specified with 'k', 'M',
'G', 'T', 'P', and 'E' multipliers. e.g. 200.5M or 0.2005G.
The updated space is interpreted in units of 1024k blocks.
For example, if '1023' is specified, a value of 0k space is
displayed. If '1023k' is specified, the updated space is
displayed as 1023k.
The space may also be specified in octal or hexadecimal
using '0' or '0x' respectively. However, fractional values
and multipliers are not allowed when using octal or hexade-
cimal representation. For example, '0400000' or '0x800000'.
specifier identifies the volume to be affected by the chmed
command, in one of two forms: media_type.vsn or
eq:slot[:partition].
time is the time the volume was last mounted in a drive.
Several formats are allowed for time. Examples are:
"2000-09-19"; "2000-07-04 20:31"; 23:05; "Mar 23"; "Mar 23
1994"; "Mar 23 1994 23:05"; "23 Mar"; "23 Mar 1994"; "23 Mar
1994 23:05".
Month names may be abbreviated or spelled out in full.
Time-of-day is given in 24-hour format. Years must use all
four digits. If the time contains blanks, the entire time
must be enclosed in quotation marks.
vsn gives the VSN of the volume to be affected.
DESCRIPTION
The first form sets (+flags) and the second clears (-flags)
the flags for for the given volume.
The third and fourth forms set the capacity and space,
respectively, for the given volume.
The fifth form sets the last-mounted time for the volume.
The sixth form sets the mount-count value for the volume.
The final two forms sets the media type and vsn, respec-
tively, for the given volume.
NON-SAM MEDIA
chmed can be used to modify existing catalog entries so that
they denote so-called non-SAM media. Non-SAM media are
those that are in non-SAM-FS format. The migration toolkit
(SAMmigkit) provides hooks for the site to use to enable Sun
StorEdge SAM-FS and Sun SAM-QFS file systems to stage (and
optionally re-archive) data from the non-SAM media.
When a non-SAM volume is imported to a library, it probably
will not be found to have an ANSI-standard label. The
volume's VSN will show as nolabel. The following chmed com-
mands can be used to assign a media type, VSN, and non-SAM
status to the volume (assuming it is in slot 5 of equipment
30):
chmed -mtype lt 30:5
chmed -vsn TAPE1 30:5
chmed +N 30:5
If you have many non-SAM cartridges, you can use build_cat
to bulk load a catalog.
EXAMPLES
chmed -RW lt.TAPE0
chmed +c lt.CYCLE
chmed -capacity 19.5G lt.TAPE0
chmed -space 8.2G lt.TAPE0
chmed -time "Mar 23 10:15" lt.TAPE0
chmed -time "Nov 28 1991 10:15" lt.TAPE0
chmed -vsn TAPE1 30:5
SEE ALSO
build_cat(1M), mcf(5), sam-recycler(1M), samu(1M)
Sun Microsystems Last change: 02 Jun 2004
Maintenance Commands cleandrive(1M)
NAME
cleandrive - Clean drive in media changer
SYNOPSIS
/opt/SUNWsamfs/sbin/cleandrive eq
AVAILABILITY
SUNWsamfs
DESCRIPTION
cleandrive requests that tape device eq be loaded with a
cleaning cartridge.
Sun StorEdge SAM-FS and Sun SAM-QFS environments support the
use of a cleaning tape, if cleaning tapes are supported by
the hardware and if your media library has barcodes enabled.
If you request that a tape drive be cleaned, then a cleaning
tape is inserted automatically.
Cleaning tapes must have a VSN starting with the letters CLN
in the label or must have the word CLEAN in the label. Mul-
tiple cleaning tapes are allowed in a system.
Cleaning tapes are only useful for a limited number of
cleaning cycles. The number of remaining cycles can be
viewed in the samu (1M) VSN catalog display under the count
field. Both Sun StorEdge SAM-FS and Sun SAM-QFS environ-
ments track the number of cleaning cycles used for each
cleaning tape. If the media changer supports the export
operation, Sun StorEdge SAM-FS and Sun SAM-QFS file systems
will export the tape when the number of remaining cycles
equals zero. A DLT cleaning tape has 20 cycles and an Exa-
byte cleaning tape has 10 cycles. Each time a cleaning tape
is imported, the cleaning cycle is reset to the highest
number of cycles for that type of tape.
FILES
mcf The configuration file for Sun StorEdge
SAM-FS and Sun SAM-QFS environments
SEE ALSO
mcf(4), sam-robotsd(1M), samu(1M)
Sun Microsystems Last change: 02 Jun 2004
System Administration Commands clri(1M)
NAME
clri, dcopy - clear inode
SYNOPSIS
clri [-F FSType] [-V] special i-number
dcopy [-F FSType] [-V] special i-number
DESCRIPTION
clri writes zeros on the inodes with the decimal i-number on
the file system stored on special. After clri, any blocks
in the affected file show up as missing in an fsck(1M) of
special.
Read and write permission is required on the specified file
system device. The inode becomes allocatable.
The primary purpose of this routine is to remove a file that
for some reason appears in no directory. If it is used to
zap an inode that does appear in a directory, care should be
taken to track down the entry and remove it. Otherwise, when
the inode is reallocated to some new file, the old entry
will still point to that file. At that point, removing the
old entry will destroy the new file. The new entry will
again point to an unallocated inode, so the whole cycle is
likely to be repeated again and again.
dcopy is a symbolic link to clri.
OPTIONS
-F FSType Specify the FSType on which to operate.
The FSType should either be specified here
or be determinable from /etc/vfstab by
matching special with an entry in the
table, or by consulting /etc/default/fs.
-V Echo the complete command line, but do not
execute the command. The command line is
generated by using the options and arguments
provided by the user and adding to them
information derived from /etc/vfstab. This
option should be used to verify and validate
the command line.
USAGE
See largefile(5) for the description of the behavior of clri
and dcopy when encountering files greater than or equal to 2
Gbyte ( 2**31 bytes).
FILES
/etc/default/fs Default local file system type
/etc/vfstab List of default parameters for each
file system
ATTRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
____________________________________________________________
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|_____________________________|_____________________________|
| Availability | SUNWcsu |
|_____________________________|_____________________________|
SEE ALSO
fsck(1M), vfstab(4), attributes(5), largefile(5)
NOTES
This command might not be supported for all FSTypes.
SunOS 5.10 Last change: 16 Sep 1996
Maintenance Commands dev_down.sh(1M)
NAME
dev_down.sh - Sun StorEdge SAM-FS or Sun SAM-QFS device down
notification script
SYNOPSIS
/etc/opt/SUNWsamfs/scripts/dev_down.sh prg_name pid
log_level msg_no eq
AVAILABILITY
SUNWsamfs
DESCRIPTION
The /etc/opt/SUNWsamfs/scripts/dev_down.sh script can be
executed by the sam-robotsd(1M) daemon when a device is
marked down or off.
To enable this feature, copy
/opt/SUNWsamfs/examples/dev_down.sh to
/etc/opt/SUNWsamfs/scripts/dev_down.sh and modify it to take
the desired action for your installation.
As released, the /opt/SUNWsamfs/examples/dev_down.sh script
sends email to root with the relevant information.
OPTIONS
This script accepts the following arguments:
prg_name The name of the program that is calling this
script.
pid The process ID of the program that is calling this
script.
log_level Log priority level. An integer number such that
0 < log_level < 7. 0 is highest priority, and 7
is lowest priority.
msg_no The message number as found in the message
catalog.
eq The Equipment Ordinal of the device.
EXAMPLE
The following is an example
/etc/opt/SUNWsamfs/scripts/dev_down.sh file:
#!/bin/sh
#
# /etc/opt/SUNWsamfs/scripts/dev_down.sh - Take action in the
# event a device is marked down by the SAM software.
#
# arguments: $1: caller
# $2: caller's pid
# $3: logging level
# $4: message catalog number
# $5: device identifier
#
# Change the email address on the following line to send
# email to the appropriate recipient.
/usr/ucb/mail -s "Sun StorEdge SAM-FS Device downed" root < 128 kilobytes
By default, n=0 on a Sun StorEdge QFS shared file
system. By default, n=0 on file systems with an
ma Equipment Type with any striped group (gx)
components.
NOTE: The system sets stripe=0 if mismatched
striped groups exist.
For more information on file system types, see the
mcf(4) man page.
sync_meta=n
Specifies whether or not the metadata is written
to the disk every time it changes, as follows:
o If sync_meta=0, metadata is held in a buffer
before being written to disk. This delayed
write delivers higher performance. This is the
default for Sun StorEdge QFS and SAM-QFS file
systems that are not mounted as multireader
file systems or as Sun StorEdge QFS shared file
systems.
o If sync_meta=1, metadata is written to disk
every time it changes. This slows performance,
but it ensures data consistency. This is the
default for Sun StorEdge QFS file systems that
are mounted as multireader file systems or as
Sun StorEdge QFS shared file systems. In a Sun
StorEdge QFS shared file system, this is the
setting that must be in effect if failover
capability is required.
worm_capable
The worm_capable option allows Write Once Read
Many (WORM) files to be stored in SAM-QFS
filesystems. Enabling this feature allows the
WORM flag to be set on files and directories. Once
the WORM flag is set, a file's data and path are
immutable and the file can not be deleted until
its retention period expires. In addition, the
volume on which the WORM file resides can not be
deleted using sammkfs. The SAM-QFS WORM package
(SUNWsamfswm) must be installed to use this
feature.
worm_lite The worm_lite option is similar to the
worm_capable mount option but eases the
restrictions regarding actions that can be taken
on WORM-enabled volumes and retained files. WORM
lite enabled volumes can be deleted using sammkfs.
Retained files can be removed before their
retention period expires and their retention
period can be shortened (must have root
privileges). File data and path remain immutable.
The SAM-QFS WORM package (SUNWsamfswm) must be
installed to use this feature.
worm_emul The worm_emul option is similar to the
worm_capable mount option and enables WORM
"Emulation mode". The difference with this option
is the trigger used to retain files is the
transition from a writable to read-only file.
File data and path are immutable after appying the
WORM trigger. A file retained in this mode can
not be deleted until it's retention period
expires. Volumes containing WORM emulation mode
files can not be deleted using sammkfs. The
SAM-QFS WORM package (SUNWsamfswm) must be
installed to use this feature.
emul_lite The emul_lite option is similar to the
worm_capable mount option and enables WORM
"Emulation Lite mode". The trigger to retain
files is the transition from a writable to read-
only file. Retained files can be removed before
their retention period expires and their retention
period can be shortened (must have root
privileges). Data and path changes to a file are
immutable after applying the trigger. Emulation
lite enabled volumes can be deleted using sammkfs.
The SAM-QFS WORM package (SUNWsamfswm) must be
installed to use this feature.
def_retention=n
def_retention option sets the default retention
period. This option requires the SAM-QFS WORM
package (SUNWsamfswm) be installed and a WORM
mount option enabled. This option sets the
default retention period for files which have the
WORM feature enabled with no supplied retention
period. The retention period can take three
forms. A value of permanent (or 0)specifies
permanent retention. A value of the form MyNdOhPm
where M, N, O, P are arbitrary non-negative
integers; y, d, h, m specify the number of years,
days, hours, and minute(s) respectively. Note
that combinations of this form are allowed, and
specifiers may be omitted, e.g., 5y, 3d1h, 4m.
The final form is a simple integer value in
minutes for n, an integer 1 < n < 2147483647 (231
- 1). If this option is not supplied, a 30 day
(43,200 minute) default retention period is used.
The SAM-QFS WORM package (SUNWsamfswm) must be
installed to use this feature.
rd_ino_buf_size=n
rd_ino_buf_size sets the size of buffer to n. This
is the buffer which is used to read the .inodes
file into buffer cache. For n, specify an integer
such that 1024 < n < 16384. n is in units of
bytes and rounded down to the nearest power of 2.
The default is 16384 bytes.
wr_ino_buf_size=n
wr_ino_buf_size sets the size of the buffer to n.
This is the buffer which is used to synchronously
write an inode through to the disk. For n,
specify an integer such that 512 < n <
rd_ino_buf_size. n is in units of bytes and
rounded down to the nearest power of 2. The
default is 512 bytes.
I/O OPTIONS
The following options are available for Sun StorEdge QFS and
SAM-QFS file systems. They allow changing the type of I/O
for a file based on I/O size and history. Note that if
direct I/O is specified for a file, these options are
ignored and all I/O to regular files is direct, if possible.
Well-aligned I/O occurs when the file offset falls on a
512-byte boundary and when the length of the I/O transfer is
at least 512 bytes.
dio_rd_consec=n
Sets the number of consecutive I/O transfers with
a buffer size greater than the specified lower
limit (which is dio_rd_form_min for aligned reads
or dio_rd_ill_min for misaligned reads) to n
operations. By default, n=0, which means that no
default direct reads occur based on I/O sizes.
Also, by default, dio_rd_form_min and
dio_rd_ill_min are ignored.
dio_rd_form_min=n
Sets the read well-aligned lower limit to n 1024-
byte blocks. By default, n=256, 1024-byte blocks.
If n=0, automatic I/O type switching for well-
aligned reads is disabled.
dio_rd_ill_min=n
Sets the read misaligned lower limit to n 1024-
byte blocks. By default, n=0, which disables
automatic I/O type switching for misaligned reads.
dio_wr_consec=n
Sets the number of consecutive I/O transfers with
a buffer size above the specified lower limit
(which is dio_wr_form_min for aligned writes or
dio_wr_ill_min for misaligned writes) to n
operations. By default, n=0, which means that no
default direct writes occur based on I/O sizes.
Also, by default, dio_wr_form_min and
dio_wr_ill_min are ignored.
dio_wr_form_min=n
Sets the write well-aligned lower limit to n
1024-byte blocks. By default, n=256 1024-byte
blocks. Setting n=0 disables automatic I/O type
switching for well-aligned writes.
dio_wr_ill_min=n
Sets the write misaligned lower limit to n 1024-
byte blocks. By default, n=0, which disables
automatic I/O type switching for misaligned
writes.
atime= -1 | 0 | 1
The file system is mounted by default with cached
access time recording (atime = 0). This means
access time updates to disk are deferred until the
file system is unmounted or when it coincides with
updates to the ctime or mtime. See stat(2). If
atime = 1, the file system will always update
access time on disk. If atime = -1, the file
system will not update access time except when it
coincides with updates to the ctime or mtime. See
stat(2). The atime = -1 option reduces disk
activity on file systems where access times are
unimportant (for example, a Usenet news spool).
Note, atime = -1, should not be set when SAM is
enabled.
The POSIX standard requires that access times be
marked on files. Note, for atime = 0 (the
default), the current access time may not be
updated on disk in case of an interruption.
noatime The noatime is added to be compatible with other
file systems. If noatime is specified, atime = -1
will be set. This means the file system will not
update access time except when it coincides with
updates to the ctime or mtime. See stat(2).
Note, noatime, should not be set when SAM is
enabled.
forcedirectio
Specifies direct I/O as the default I/O mode.
This means that data is transferred directly
between the user's buffer and disk. The
forcedirectio option should be specified only if
the file system is used for large block aligned
sequential I/O. For more information, see the
directio(3C), setfa(1), sam_setfa(3), and
sam_advise(3) man pages. The default I/O mode is
buffered (uses the page cache).
nodio_szero | dio_szero
The dio_szero option causes uninitialized areas of
sparse files written with direct I/O to be zeroed
when the area is accessed. This makes the sparse
file behavior the same as that for paged I/O. By
default, sparse files written by direct I/O do not
have the uninitialized areas zeroed for
performance reasons. The default is nodio_szero.
force_nfs_async
Causes the file system to cache nfs data written
to the server even if nfs has requested that the
data be written synchronously through to disk.
The force_nfs_async option is only useful if the
file system is mounted as a nfs server and the
clients have set the nfs mount option noac. The
default nfs noac behavior without force_nfs_async
causes data to be synchronously written through to
disk. Caution, the force_nfs_async option violates
the nfs protocol and should be used with care.
Data may be lost in the event of a server
interruption. Also, data is cached on the server
and will not be immediately seen by all the
clients if there are multiple nfs servers.
Multiple nfs servers can be enabled with Shared
QFS.
sw_raid Causes the file system to align the writebehind
buffer. This option should be set if the software
raid feature of packages such as Solstice
DiskSuite is being used on this file system. This
option is off by default.
readahead=n
Sets the maximum readahead value to n. The
readahead option specifies the maximum number of
bytes that can be read ahead by the file system.
n is in units of kilobytes and must be a multiple
of 8. For n, specify an integer such that 0 < n <
16777216. The default is 1024 (1,048,576 bytes).
writebehind=n
Sets the maximum writebehind value to n. The
writebehind option specifies the maximum number of
bytes that can be written behind by the file
system. n is in units of kilobytes and must be a
multiple of 8. For n, specify an integer such
that 0 < n < 16777216. The default is 512
(524,288 bytes).
flush_behind=n
Sets the maximum flush_behind value to n. When
enabled, modified pages that are being written
sequentially are written to disk asynchronously to
help the Solaris VM layer keep the pages clean.
This option sets the maximum flush_behind value to
n. n is in units of kilobytes. For n, specify an
integer such that 0 < n < 8192. The default is 0,
which disables flush behind.
wr_throttle=n
Sets the maximum number of outstanding write bytes
for one file to n kilobytes. If n = 0, there is
no limit. The default is 16,384 kilobytes.
qwrite Enables simultaneous reads and writes to the same
file from different threads. Specify this option
only if users of the file system handle multiple
simultaneous transactions to the same file. For
example, this is useful for database applications.
This option improves I/O performance by queuing
multiple requests at the drive level.
By default, qwrite is not enabled, and the file
system disables simultaneous reads and writes to
the same file. This is the mode defined by the
UNIX vnode interface standard that gives exclusive
access to only one writer and forces other writers
and readers to wait.
The qwrite option is disabled for NFS reads or
writes of the file system.
noabr | abr
For Oracle RAC with SAM-QFS AIO only. Disable
(enable) Application Based Recovery of software
mirrors. Applies only to SAM-QFS filesystems
built on Solaris Volume Manager mirrored volumes
that likewise support Application Based Recovery.
Default is enabled.
nodmr | dmr
For Oracle RAC with SAM-QFS AIO only. Disable
(enable) Directed Mirror Reads of software
mirrors. Applies only to SAM-QFS filesystems
built on Solaris Volume Manager mirrored volumes
that likewise support directed mirror reads.
Default is enabled.
STORAGE AND ARCHIVE MANAGEMENT OPTIONS
The following options can be used when mounting a
SAM-QFS file system. These options pertain to the storage
and archive management facilities of these file systems.
high=n Sets the high-water mark for disk cache
utilization to n percent. When the amount of
space used on the disk cache reaches n percent,
the SAM-QFS file systems start the releaser
process. For more information, see the sam-
releaser(1M) man page. The default is 80.
low=n Sets the low-water mark for disk cache utilization
to n percent. When the amount of space used on
the disk cache reaches n percent, the SAM-QFS file
system starts the releaser process, which stops
releasing disk space. The default is 70.
partial=n Sets the default partial release size for the file
system to n kilobytes. The partial release size
is used to determine how many bytes at the
beginning of a file marked for partial release
should be retained on disk cache when the file is
released. The user can override the default on a
file-by-file basis by specifying a size when
marking a file for partial release. For more
information, see the release(1) man page.
For n, specify an integer from 8 to whatever has
been set for the maxpartial option. For more
information on maxpartial, see the maxpartial
option in this list. The default is 16.
maxpartial=n
Sets the maximum partial release size for the file
system to n kilobytes. The partial release size
cannot be set larger than this maxpartial setting.
For n, specify an integer such that 0 < n <
2097152. The default is 16.
partial_stage=n
Sets the partial stage size for the file system to
n kilobytes. For a partial release file, this
value specifies the offset in the file past which
access results in the entire file being staged to
disk. For n, specify a integer from 0 to whatever
has been set for the maxpartial option. The
default is equal to whatever has been set for the
partial option.
stage_n_window=n
Sets the stage -n buffer size for the file system
to n kilobytes. This option applies to files that
are read directly from the archive media. This
attribute is set by using the stage(1) command's
-n option. For a file with this attribute, this
is the size that is staged in to the application's
buffer at any one time. For n, specify an integer
such that 64 < n < 2097152. The default is 256.
If the total number of outstanding stage_n buffers
is less than physical memory, the access is not
NFS, and the stage_n_window is less than 1%
physical memory, then the buffer is allocated in
pageable memory. Otherwise, blocks are allocated
for the buffer from the file system. Note, the
SAM-QFS shared file system does not support stage
-n from a client.
stage_retries=n
Sets the number of stage retries attempted per
archive copy when certain errors are encountered.
For n, specify a number such that 0 < n < 20.
Setting n=0 prevents a retry from being initiated.
The default is 3.
stage_flush_behind=n
Sets the maximum stage flush behind value to n
kilobytes. Stage pages that are being staged are
written to disk asynchronously to help the Solaris
VM layer keep pages clean. For n, specify an
integer such that 0 < n < 8192. The default is 0,
which means that stage flush behind is disabled.
hwm_archive
Invokes the archiver when the amount of data in
the file system increases above the high-water
mark.
SHARED FILE SYSTEM OPTIONS
The following options are supported for Sun StorEdge QFS,
Sun SAM-QFS, and Sun StorEdge SAM-FS shared file systems.
Both file system equipment types ms and ma are supported.
For a description of the ma and ms file systems, see the
mcf(4) man page. For a description of the Sun StorEdge QFS
shared file system, see the Sun StorEdge QFS Configuration
and Administration Guide.
The stripe width is set by default to round robin (using the
stripe=0 mount option).
shared Specifies that the file system being mounted is a
Sun StorEdge QFS shared file system. The shared
option must be specified in the /etc/vfstab file
because it is used in the boot initialization
sequence.
bg Specifies that if the first mount attempt fails,
the system should retry the mount in the
background. If bg is not specified, the mount
continues in the foreground.
retry=n Specifies the number of times to retry the mount
operation. For n, specify an integer such that 0
< n < 20000. By default, n=10000.
minallocsz=n
Sets the minimum block allocation value for the
Sun StorEdge QFS shared file system to n. Specify
n in units of kilobytes and as a multiple of 8
kilobytes. The minallocsz option specifies the
minimum number of bytes that are allocated ahead
of a write for a Sun StorEdge QFS shared file
system. For n, specify an integer such that 16 <
n < 2097152. By default, n=8 * allocation_unit
(DAU). See sammkfs(1M) command's -a option.
maxallocsz=n
Sets the maximum block allocation value for the
Sun StorEdge QFS shared file system to n. Specify
n in units of kilobytes and as a multiple of 8
kilobytes. The maxallocsz option specifies the
maximum number of bytes that are allocated ahead
of a write for a Sun StorEdge QFS shared file
system. For n, specify an integer such that 16 <
n < 4194304. By default, n=128 * allocation_unit
(DAU). See sammkfs(1M) command's -a option.
rdlease=n Sets the read lease time for the Sun StorEdge QFS
shared file system to n seconds. The rdlease
option specifies the maximum number of seconds
that a file can be read before reacquiring the
read lease. For n, specify an integer such that
15 < n < 600. By default, n=30.
wrlease=n Sets the write lease time for the Sun StorEdge QFS
shared file system to n seconds. Only one host
can write to a file at any one time unless the
mh_write option is set on the metadata server. If
the mh_write option is set on the metadata server,
multiple hosts can write to and read from the same
file at the same time. If multiple hosts are
writing, the last write is the one that is
effective. The wrlease option specifies the
maximum number of seconds that a file can be
written before reacquiring the write lease. For
n, specify an integer such that 15 < n < 600. By
default, n=30.
aplease=n Sets the append lease time for the Sun StorEdge
QFS shared file system to n seconds. Only one
host can append to a file at any one time. The
aplease option specifies the maximum number of
seconds that one host can append to a file before
reacquiring the append lease. For n, specify an
integer such that 15 < n < 600. By default, n=30.
mh_write Enables simultaneous reads and writes to the same
file from multiple hosts. If mh_write is used,
the Sun StorEdge QFS shared file system switches
all hosts into directio. The application must use
page aligned memory buffers and well formed sector
I/O (512 bytes). Caution, if the application does
not adhere to these alignment rules, data
correctness is not guaranteed.
This option is effective only on the metadata
server host. If this option is specified when
mounting the file system on a client host, it is
ignored. If the client host becomes the metadata
server in the future, however, this option becomes
effective. For this reason, it is recommended to
use this mount option on the metadata host and all
potential metadata server hosts. If the mh_write
option is not specified on the metadata server,
only one host can write at any one time to a
single file.
min_pool=n
Sets the minimum number of shared file system
threads to keep around. The number of threads
grows and shrinks dynamically based on load. This
parameter tells the system to keep at least that
many threads in the active pool. For n, specify
an integer such that 8 < n < 2048. The default
n=64. For Linux the default n=8. NOTE: The
min_pool parameter must be set in samfs.cmd file.
It is ignored if set in the /etc/vfstab file or on
the mount(1M) command.
nstreams=n
* No longer used. *
meta_timeo=n
Allow attributes and directory data to be cached
by a host system for up to n seconds before
checking for consistency with the metadata server.
The default n=3.
Example 1. With the default setting of
meta_timeo=3, the file system verifies attribute
and directory consistency with the metadata server
at least every 3 seconds. For instance, a new
file created on one host may not be seen by an
ls(1) command on another host for up to 3 seconds.
Example 2. If meta_timeo=0, the file system
verifies attribute and directory consistency with
the metadata server before each use. The cattr
mount option can be used with meta_timeo=0 to
ensure that changes made by other hosts currently
modifying a file are also immediately visible.
Example 3. If meta_timeo=3, with the nocattr
mount option (default), the file system verifies
attribute consistency if it has not been checked
in the past 3 seconds; however, attribute changes
made by a client host which is currently modifying
a file may not be detected until the client lease
time has expired.
Example 4. If meta_timeo=3, with the cattr mount
option, the file system verifies attribute
consistency if it has not been checked in the past
3 seconds, and also ensures that attribute changes
made by other hosts are detected within that time
interval.
cattr | nocattr
Enable (disable) attribute consistency checking.
If cattr is set, the file system ensures that
attribute changes made by a host which is
modifying a file are visible to other hosts within
the meta_timeo interval. (Directories are not
affected by cattr; directory modifications are
always visible within the time interval set by
meta_timeo.)
With the default setting of nocattr, attribute
changes made by a host (in particular, file size
and modification time) may not be visible to other
hosts until the write or append lease time has
expired.
Note that enabling cattr may adversely affect
performance, as additional network traffic is
required.
lease_timeo=n
The read, write, and/or append lease for a single
file is relinquished if it is not being used after
n seconds. lease_timeo varies from -1 to 15
seconds. If lease_timeo is >=0, the lease is
relinquished if it is not being used after n
seconds. If lease_timeo is set to -1, the lease
is not relinquished and the lease expires based on
the lease time. Note, the read and write lease is
not relinquished if mh_write is set because
multiple reader/writer hosts are enabled. The
default n is 0.
MULTIREADER FILE SYSTEM OPTIONS
The following options support the single-writer, multireader
file system. This file system is mounted on one host system
as a single-writer file system that updates the file system.
In addition, this file system can be mounted on one or more
host systems as a multireader file system.
These options can be specified only on Sun StorEdge QFS file
systems. The writer option cannot be used if you are
mounting the file system as a Sun StorEdge QFS shared file
system, however, the reader option is supported. Note,
sync_meta should be set to 1 if the reader option is used in
a Sun StorEdge QFS shared file system.
A major difference between the multireader file system and
Sun QFS shared file system is that the multireader host
reads metadata from the disk, and the client hosts of a Sun
StorEdge QFS shared file system read metadata over the
network.
The system administrator must ensure that only one host in a
multireader file system has the file system mounted with the
writer mount option enabled.
writer Sets the file system to type writer. There can be
only one host system that has the file system
mounted with the writer option at any one time.
If writer is specified, files are flushed to disk
at close and directories are always written
through to disk. The option atime = 1 is set for
writer.
Prior to the 4.0 release, the writer option was
specified as the shared_writer option. The older
syntax is supported for backward compatibility.
reader Sets the file system to type reader. This mounts
the file system as read only. There is no limit
to the number of host systems that can have the
same file system mounted with the reader option.
By default, each lookup checks the inode and
refreshes the inode pages if the inode has been
modified by the writer host. If the invalid
option is set to a value greater than 0, the inode
is checked for modification only after it has aged
invalid seconds after the last check; for more
information, see the invalid option.
Prior to the 4.0 release, the reader option was
specified as the shared_reader option. The older
syntax is supported for backward compatibility.
invalid=n When specified in conjunction with the reader
option, holds cached attributes for the
multireader file system at least n seconds after
file modification. Caution, it is possible to
read stale data if invalid is set to a nonzero
value. For n, specify an integer such that
0 < n < 60. By default, n=0.
Example 1. If invalid=0, which is the default,
the file system always checks to see if the inode
is stale. That is, it checks to see if the inode
has been changed by the writer host.
Example 2. If invalid=30, the file system checks
the inode 30 seconds after the last check. This
means that if you issue an ls(1) command, you
might not see a new file for 30 seconds after it
has been created on the writer host. This also
means that if you open an existing file, for
example with the cat(1) command, you might not see
any changes made to the file on the writer host in
the past 30 seconds.
refresh_at_eof
When specified in conjunction with the reader
option, the current file size is refreshed when
the read buffer exceeds the end of file.
SUN STOREDGE QFS OPTIONS
The following options are supported only for Sun StorEdge
QFS and SAM-QFS file systems on ma Equipment Type file
systems. For more information on the ma file system
Equipment Type, see the mcf(4) man page.
mm_stripe=n
Sets the metadata stripe width for the file system
to n 16-kilobyte disk allocation units (DAUs). By
default, mm_stripe=1, which writes one DAU of
metadata to one LUN before switching to another
LUN. If mm_stripe=0, the metadata is round
robined across all available metadata LUNs.
FILES
/etc/mnttab Table of mounted file systems.
/etc/vfstab List of default parameters for each file
system.
/etc/opt/SUNWsamfs/samfs.cmd
List of default and global parameters
for SAM-QFS file systems. For more
information, see the samfs.cmd(4) man
page.
SEE ALSO
release(1), setfa(1), ssum(1).
mount(1M), mountall(1M), sam-releaser(1M), sammkfs(1M),
umount_samfs(1M).
mount(2).
sam_setfa(3), sam_advise(3), directio(3C).
mcf(4), mnttab(4), samfs.cmd(4), vfstab(4).
NOTES
If the directory upon which a file system is to be mounted
is a symbolic link, the file system is mounted on the
directory to which the symbolic link refers, rather than on
top of the symbolic link itself.
The mount parameters can be provided in the samfs.cmd file,
in the /etc/vfstab file, and on the mount(1M) command.
Specifications in the /etc/vfstab file override the
directives in the samfs.cmd file, and options to the
mount(1M) command override specifications in the /etc/vfstab
file.
Sun Microsystems Last change: 18 Jul 2006
Maintenance Commands move(1M)
NAME
move - Move a cartridge in a library
SYNOPSIS
/opt/SUNWsamfs/sbin/move eq:src_slot dst_slot
/opt/SUNWsamfs/sbin/move mediatype.vsn dst_slot
AVAILABILITY
SUNWsamfs
DESCRIPTION
move will send a request to the library specified by eq to
move the cartridge in src_slot to the slot dst_slot. For
the form mediatype.vsn, eq and src_slot are determined from
the catalog entry. All other volumes on the cartridge are
moved.
The source slot must be in use and occupied (that is, not
loaded in a drive) and the destination slot must not be in
use.
Some libraries do not support moving cartridges between
storage slots. Generally, if the automated library is SCSI
attached, the move(1M) command is supported. If the
automated library is network attached, the move(1M) command
is not supported.
If src_slot and dst_slot are the same, and the cartridge is
double-sided, the cartridge will be turned over (flipped).
FILES
mcf The configuration file for Sun StorEdge SAM-FS and
Sun SAM-QFS environments
SEE ALSO
export(1M), import(1M), mcf(4), sam-robotsd(1M)
Sun Microsystems Last change: 30 Nov 2000
Maintenance Commands nrecycler.sh(1M)
NAME
nrecycler.sh - Sun StorEdge SAM-FS or Sun SAM-QFS nrecycler
post-processing script
SYNOPSIS
/etc/opt/SUNWsamfs/scripts/nrecycler.sh gen_media vsn slot
eq specific_media fs_name [ vsn_modifier ]
AVAILABILITY
SUNWsamfs
DESCRIPTION
The sam-nrecycler(1M) process executes the
/etc/opt/SUNWsamfs/scripts/nrecycler.sh script after it has
finished draining a cartridge of all known active archive
images and recycling is complete.
As released, /etc/opt/SUNWsamfs/scripts/nrecycler.sh sends
email to root with the relevant information.
OPTIONS
This script accepts the following arguments:
gen_media Generic media type. Specify od for
magneto-optical media. Specify tp for tape media.
This argument is used to construct the name of the
appropriate media labeling command, either
odlabel(1M) or tplabel(1M).
vsn The volume serial name (VSN) of the cartridge
being processed.
slot The slot location of the media in the library.
eq The Equipment Ordinal of the library in which the
media cartridge is located.
specific_media
The specific media type. For information on
specific media types, see the mcf man page. This
information is supplied to the chmed(1M) command
if needed.
fs_name Either hy, which represents the historian, or the
family set name of the library.
vsn_modifier
The VSN modifier. Used only for magneto-optical.
EXAMPLE
The following is an example
/etc/opt/SUNWsamfs/scripts/nrecycler.sh file:
#!/bin/csh -f
#
# /etc/opt/SUNWsamfs/scripts/nrecycler.sh - post-process a VSN after nrecycler h
as
# drained it of all known active archive copies.
#
# Arguments are:
# $1 - generic media type "od" or "tp" - used to construct the name
# of the appropriate label command: odlabel or tplabel
#
# $2 - VSN of cartridge being post-processed
#
# $3 - Slot in the library where the VSN is located
#
# $4 - equipment number of the library where the VSN is located
#
# $5 - actual media type ("mo", "lt", etc.) - used to chmed
# the media if required
#
# $6 - family set name of the physical library, or the string
# "hy" for the historian library. This can be used to
# handle recycling of off-site media, as shown below.
#
# $7 - VSN modifier, used for optical and D2 media
#
#
#
# It is a good idea to log the calls to this script
#echo `date` $* >> /var/opt/SUNWsamfs/nrecycler.sh.log
# As an example, if uncommented, the following lines will relabel the VSN,
# if it exists in a physical library. If the VSN is in the historian
# catalog (e.g., it's been exported from a physical library and moved
# to off-site storage), then email is sent to "root" informing that the
# medium is ready to be returned to the site and reused.
#
#set stat=0
#if ( $6 != hy ) then
# /opt/SUNWsamfs/sbin/chmed -R $5.$2
# /opt/SUNWsamfs/sbin/chmed -W $5.$2
# if ( $5 != "d2" ) then
# if ( $1 != "od" ) then
# /opt/SUNWsamfs/sbin/${1}label -w -vsn $2 -old $2 $4:$3
# if ( $status != 0 ) then
# set stat = 1
# endif
# else
# /opt/SUNWsamfs/sbin/${1}label -w -vsn $2 -old $2 $4:$3:$7
# if ( $status != 0 ) then
# set stat = 1
# endif
# endif
# else
# /opt/SUNWsamfs/sbin/${1}label -w -vsn $2 -old $2 $4:$3:$7
# if ( $status != 0 ) then
# set stat = 1
# endif
# endif
#else
# mail root <> /var/opt/SUNWsamfs/nrecycler.sh.log
#if ( $stat != 0 ) then
# exit 1
#else
# exit 0
#endif
#
#
# These lines would inform "root" that the VSN should be removed from the
# robotic library:
#
#mail root <> /var/opt/SUNWsamfs/nrecycler.sh.log
#exit 0
# The default action is to mail a message reminding you to set up this
# file. You should comment out these lines (through and including the /eof
# below) after you've set up this file.
#
mailx -s "Robot $6 at hostname `hostname` recycle." root <> /var/opt/SUNWsamfs/nrecycler.sh.log
exit 0
The example first checks to see if the VSN is in a physical
library. If it is, the example script first clears the
read-only and write-protect catalog bits. It then issues a
tplabel(1M) or odlabel(1M) command to relabel the cartridge
with its existing label. Relabeling has the effect of
clearing all the expired archive images from the cartridges,
thus enabling the archiver to re-use the cartridge.
Labeling also clears the recycle bit in the VSN's catalog
entry.
If the VSN is in the historian catalog, the script sends an
email message to root. Note that a cartridge in a manually
mounted drive is shown in the historian catalog as well, so
you may want to see if the VSN is currently in a drive and
relabel it if necessary.
SEE ALSO
odlabel(1M), sam-nrecycler(1M), tplabel(1M).
Sun Microsystems Last change: 02 Jun 2004
Maintenance Commands odlabel(1M)
NAME
odlabel - Label optical media
SYNOPSIS
odlabel -vsn vv... -[new | old vv...] [-info] aa...]
[-w] [-V] [-erase] eq[:slot:side]
AVAILABILITY
SUNWsamfs
DESCRIPTION
odlabel labels the volume in the optical cartridge specified
by eq[:slot:side]. eq is the equipment ordinal. If eq is a
library, slot is the slot in the library containing the car-
tridge. side is the side (1 or 2) of a two-sided cartridge.
A VOL (volume) and a PAR (partition) label are written.
These labels conform to ISO standard IEC13346. The data
portion follows ISO standard TC97SC23.
-vsn vv... specifies the volume serial name of the optical
disk being labeled (up to 31 characters).
If the media being labeled was previously labeled, the VSN
must be specified by -old vv.... The "old" VSN is compared
with the VSN on the media to assure that the correct media
is being relabeled.
If the media is not labeled (i.e., blank), -new must be
specified to prevent the previous label comparison from
being made.
OPTIONS
-info aa...
Specifies the "Implementation Use" string in the
label (up to 127 characters).
-V Verbose, lists label information written.
-erase Erases the media completely before a label is
written. This is a security feature that is nor-
mally not necessary. Complete media erasure will
take a long time to perform since all data in the
media is erased.
-w Wait for the labeling operation to complete. If
an error occurs, it will be reported along with a
completion code of 1. All labeling errors are
also logged. Note: Canceling a command that is
waiting for completion will not cause the opera-
tion itself to be canceled.
Sun Microsystems Last change: 21 Jun 2000
Maintenance Commands rearch(1M)
NAME
rearch - Marks archive entries to be rearchived
SYNOPSIS
rearch [-f] [-M] [-o] -m media -v vsn filename ...
rearch [-f] [-M] [-o] -c n filename ...
rearch [-f] [-M] [-o] -m media -v vsn -r dirname [filename
...]
rearch [-f] [-M] [-o] -c n -r dirname [filename ...]
AVAILABILITY
SUNWsamfs
DESCRIPTION
The rearch command marks archive entries for one or more
files or directories to be rearchived. You must specify
either a copy number or both a media type and a VSN number.
In addition, you must specify either a file name or both a
directory name and a file name.
OPTIONS
This command accepts the following options:
-c n Specifies the archive copy number. If one or more
-c n options are specified, only those archive
copies (1 to 4) are marked. The default is all
copies.
-f Suppresses errors.
-M Rearchives metadata only. This includes
directories, the segment index, and removable
media files. Regular files and symbolic links are
not rearchived.
-m media Specifies the media type. If specified, archive
copies on the specified media are marked. This
option must be specified in conjunction with the
-v vsn option. For more information on media
types, see the mcf(4) man page.
-o Requires the file to be online before its archive
entry is deleted. If the file is offline, the
command stages the file onto disk before deleting
any entries.
-v vsn Marks archive copies on VSN vsn for rearchiving.
This option must be specified in conjunction with
the -m media option.
-r dirname
Recursively rearchives the archive entries of the
specified dirname and its subdirectories. The
rearch flag for archive entries of files in the
directories and subdirectories is set. If no -r
dirname option is specified, at least one filename
must be specified.
filename ...
Specifies one or more files for rearchiving. If
you are using the first form of the command,
either a filename or an asterisk (*) is required.
If you are using the third or fourth forms of the
command, and you do not specify a filename, you
must use the -r option and specify a dirname.
SEE ALSO
mcf(4).
Sun Microsystems Last change: 08 Jan 2003
Maintenance Commands recover.sh(1M)
NAME
recover.sh - Recovers files archived after last
samfsdump(1M) was taken
SYNOPSIS
/opt/SUNWsamfs/examples/recover.sh /mount_point
AVAILABILITY
SUNWsamfs
DESCRIPTION
The recover.sh script recovers files using the information
in the archiver log. This script can be useful in a
disaster recovery situation when a file system has been lost
and is recovered from a saved samfsdump(1M) file. If files
were archived for the first time after the dump was taken,
there is no record of them in the dump. This script can be
used to reload those files from the archive copy by using
the star(1M) program.
USAGE
Step 1. Edit the archiver log file and extract the
relevant portion.
In this editing session, you should eliminate
entries for second, third, or fourth archive
copies from this file because otherwise the files
are recovered multiple times, which wastes time.
You should also eliminate directory entries.
Directory entries are noted by a d in field 12 of
the archiver log.
After the file is edited, save the edited file to
a temporary file. For example, save this file to
/tmp/arlog.in.
Step 2. Copy the script from its default location to a
temporary location.
Use a command such as the following to copy the
script to a temporary location:
server# cp /opt/SUNWsamfs/examples/recover.sh /tmp/recover.sh
Step 3. Edit a working copy of the script and modify it
for your site.
Edit the copy and change the value of BLK_SIZE
from 128 to the block size in kilobytes for the
VSNs in question.
Step 4. Run the recover.sh script.
This creates a new script to actually do the work
of recovering the files. In the following
example, the Sun StorEdge SAM-FS mount point is
/sam1.
server# /tmp/recover.sh /sam1 < /tmp/arlog.in > /tmp/recover.out
If you have multiple drives and want to recover
from more than one VSN at a time, you can split
this script into pieces first. The following line
appears at the end of the work for each VSN:
"# ----------- end of files for vsn " XXX " ----
-----"
The XXX is replaced with the VSN's bar code label.
Step 5. Create a temporary directory to which the
recovered files can be written.
Create this directory in a Sun StorEdge SAM-FS or
Sun SAM-QFS file system. Although this could be
your mount point, it is probably better to recover
to a temporary directory in the Sun StorEdge
SAM-FS or Sun SAM-QFS file system first, and then
move the files to their final location after
recovery is complete and everything looks as
expected. For example:
server# mkdir /sam1/recover
Step 6. Change to the temporary directory to receive the
recovered files.
Use the cd(1) command to change to the directory
in which you want the files recovered.
server# cd /sam1/recover
server# sh -x /tmp/recover.out
Step 7. Run the recover.out script.
The /tmp/recover.out shell script is created in
the previous step. It can be used to recover all
the files listed in the /tmp/arlog.in file.
Run the recover.out script. If you have split the
scripts, you may have to run it multiple times.
WARNINGS
Improper use of this script can damage user or system data.
Please refer to the Sun QFS, Sun SAM-FS, and Sun SAM-QFS
Disaster Recovery Guide or contact technical support before
using this script.
NOTES
If used with the SAM-Remote clients or server, the recovery
must be performed on the server to which the tape library is
attached.
Do not run multiple recovery scripts at the same time.
FILES
This script resides in the following location:
/opt/SUNWsamfs/examples/recover.sh
SEE ALSO
archiver(1M), request(1M), star(1M).
Sun Microsystems Last change: 14 Jan 2004
Maintenance Commands sam-recycler(1M)
NAME
sam-recycler - Recycles Sun StorEdge SAM-FS and Sun SAM-QFS
volumes
SYNOPSIS
/opt/SUNWsamfs/sbin/sam-recycler [-c] [-C] [-d] [-E]
[-n] [-s] [-v] [-V] [-x] [-X] [family_set | archive_set]
AVAILABILITY
SUNWsamfs
DESCRIPTION
The sam-recycler command invokes the recycler. The recycler
removes expired archive copies and frees up archive volumes.
Often, the recycler is invoked through root's crontab(1)
file at an off-peak time. However, the recycler can be
invoked at any time.
You can specify that only a specific library or archive set
be recycled. You can recycle by library only when archiving
to tape or magneto optical cartridges in a library. Note
that you cannot recycle by library if you are using disk
archiving.
If you want to recycle by archive set, you must name the
archive sets to be recycled in the
/etc/opt/SUNWsamfs/archiver.cmd file.
You can provide directives to the recycler through lines
entered in the /etc/opt/SUNWsamfs/recycler.cmd file and in
the /etc/opt/SUNWsamfs/archiver.cmd file. If no directives
are present and no family_set or archive_set is specified on
the command line, recycling does not occur. The following
are the default recycler settings:
o The maximum data quantity to recycle (-dataquantity) is 1
gigabyte (1G).
o The high water mark (-hwm) is 95.
o The VSN gain (-mingain) is 50.
o The number of volumes (-vsncount) to recycle is 1.
o Automatic email is not sent.
NOTE: Extreme care must be taken when configuring the
recycler if you are using disk archiving in an environment
with multiple SAM-QFS servers. The diskvols.conf file for
each SAM-QFS server must point to a unique set of disk
volume resource specifications (disk archiving target
directories). If any of these are shared between different
SAM-QFS servers, then running the recycler from one SAM-QFS
server will destroy the disk archive data that is being
managed by the other SAM-QFS server.
OPTIONS
The following options determine the volumes to be recycled
and the content of the recycler log file.
-c Displays the extrapolated capacity of each volume.
This is the volume's capacity assuming the compression
observed on the volume so far continues for the rest of
the volume. This option produces an additional line
for each volume with the heading Alpha:.
-C Suppresses listing of initial catalog(s).
-d Displays messages during the volume selection phase of
processing. These messages indicate why each volume
was, or was not, selected for recycling.
-E Specifies that the volume section of the recycler's log
file list only volumes that are not 100% free.
-n Prevents any actions from being taken. This option
causes /opt/SUNWsamfs/sbin/sam-recycler to behave as if
-recycle_ignore were specified in the
/etc/opt/SUNWsamfs/archiver.cmd file for all archive
sets.
-s Suppresses the listing of individual volumes in the
initial catalog section.
-v Displays information about which files are resident on
the volume that is marked for recycling. If no path
name can be calculated for the inode, it lists the
inode. These files are on volumes that are being
drained. Using this option can consume a lot of CPU
cycles.
-V Suppresses the volume section in the listing.
-x Displays messages for expired archive copies. These
are copies that are older than the time the volume upon
which the copies reside was labeled. Such copies
generate an error message when staged. The data for
those copies is irrecoverable. These archive copies
must be unarchived. If any such copies are discovered,
the recycler stops. This is the default behavior.
Also see the -X option.
-X Inhibits the messages that indicate the existance of
expired archive copies. Typically, if the recycler
detects expired archive copies, it stops. Use this
options if you want the recycler to continue in the
presence of expired archive copies. Also see the -x
option.
family_set | archive_set
Recycles only the named family_set or archive_set.
This is an optional argument. If a family_set is
specified, the library associated with the family set
is recycled. The family set is the fourth field in a
server's mcf file. If an archive_set is specified,
that archive set is recycled. The archive_set
specified must include the copy number, as stated in
the /etc/opt/SUNWsamfs/archiver.cmd file. For example,
arset.1.
If no family_set or archive_set name is specified, the
recycler recycles according to specifications in the
/etc/opt/SUNWsamfs/archiver.cmd and the
/etc/opt/SUNWsamfs/recycler.cmd files. It examines
each library and archive set specified.
Regardless of a specification, only archive sets and
family sets that have a current usage that is less than
the high-water mark are recycled.
OPERATION
The recycler splits its work into two phases: volume
selection and volume recycling.
Phase 1 - Volume Selection
The recycler selects volumes for recycling based
on the amount of space used by expired archive
copies as a percentage of total space on a volume.
For each library or archive set being recycled,
the volumes with the highest percentages of
expired copies are selected to bring the media
utilization in the library or archive set below
the configured high-water-mark. This assumes that
each volume selected would contribute at least
VSN-minimum-percent-gain percent of its total
space if it were recycled. If no such volumes
exist, the library or archive set cannot be
recycled. Ties in expired space are resolved by
selecting the volumes with the least amount of
unexpired space. For more information on setting
a high water mark, see the recycler.cmd(4) man
page.
A few conditions can prevent a volume from being
selected. A volume cannot be recycled if it
contains data associated with a removable media
file created by the request(1) command. In
addition, it cannot be recycled if it is listed in
the /etc/opt/SUNWsamfs/recycler.cmd file's
no_recycle section.
After volumes have been selected, they are
recycled.
Phase 2 - Volume Recycling
Volume recycling differs depending upon whether
the archive media is a disk volume or whether it
is a removable cartridge in a library. Archiving
to disk volumes is described first.
When a disk volume is selected for recycling, the
volume is not marked for recycling. Additional
archive copies can be written to it. Expired
archive copies on the disk volume are identified
and removed. Valid archive copies are left alone.
When a tape or magneto optical volume is selected
for recycling, the system prevents additional
archive copies from being written to it. If you
are recycling to cartridges in a library, all
files with active archive copies in volumes on the
cartridges are marked to be re-archived. The
archiver moves these copies to other volumes. In
subsequent runs, the recycler checks these volumes
and post-processes them when all valid archive
copies have been relocated.
The recycler checks to see if there are volumes
that were selected for recycling that have not yet
been post-processed. If such volumes exist, and
they are now devoid of active archive copies, the
sam-recycler command invokes the
/etc/opt/SUNWsamfs/scripts/recycler.sh(1M), which
post-processes these volumes with arguments
including the generic media type (tp or od), the
VSN, the element address in the library, and the
equipment number of the library in which the
volume resides. The script can relabel the
cartridge using either the original VSN or a new
VSN; or it can export the cartridge from the
library; or it can perform another user-defined
action.
The /etc/opt/SUNWsamfs/scripts/recycler.sh(1M)
script clears the recycling flag to indicate that
recycling has completed on the volume. The
odlabel(1M) and tplabel(1M) commands clear this
flag after the cartridge has been relabeled.
RECYCLER OUTPUT
The recycler log is divided into several sections.
The first section describes each library catalog and archive
set. The header contains the family set name or archive set
name and the vendor, product, and catalog path name. Then,
the capacity and remaining space for each volume appears, in
bytes, with suffixes k, M, G, and T representing kilobytes,
megabytes, gigabytes, and terabytes, respectively. In this
log file, a kilobyte=1024 bytes, a megabyte=1024*1024 bytes,
and so on. Then, a summary, containing the total capacity
and total space remaining is shown in bytes and as a
percentage of space used. The recycling parameters set in
the recycler and archiver command files are also shown.
The second section is a series of tables, one for each
library and archive set that has associated volumes. The
name of the library or archive set is shown just to the
right of the ----Percent---- label. A volume can be
associated with only one library or archive set. Attempts
to assign a volume to multiple archive sets are marked with
a in multiple sets label. The following fields are
displayed:
Field Name Meaning
Status A phrase giving the volume's recycle status,
as follows:
empty VSN The volume is empty of both
expired and current archive
images
full VSN The volume has no free space,
but it does have current
archive images.
in multiple sets
The volume matches multiple
archive sets in the
/etc/opt/SUNWsamfs/archiver.cmd
file.
new candidate The volume was chosen for
recycling during this recycler
run.
no-data VSN The volume contains only
expired archive images and
free space.
no_recycle VSN The volume is listed in the
no_recycle section of the
/etc/opt/SUNWsamfs/recycler.cmd
file.
archive -n files
The volume contains archive
images for files now marked as
archive -n.
old candidate The volume was already marked
for recycling before this
recycler run.
request files The volume contains archive
images for removeable media
files.
partially full The volume contains both
current archive images and
free space.
shelved VSN The volume is not currently
located in any library.
Archives Count The number of archive copies that are
contained on this volume.
Archives Bytes The number of bytes of archive copies
contained on this volume.
Percent Use The percentage of space in use on this volume
by current archive copies. It is estimated
by summing up the sizes of the archive copies
on the medium. Because of compression, this
value can overstate the amount of space
actually used by these images. This is the
amount of data that would need to be moved if
the volume were selected for recycling.
Percent Obsolete
The percentage of space used on this volume
for which no archive copies were found. This
is the space that can be reclaimed by
recycling this cartridge.
The Percent Obsolete value is calculated as
follows:
100% - In Use - Free
Because In Use can overstate the actual space
used (because of compression), the sum of In
use + Free can exceed 100%, which renders
Percent Obsolete to be a negative value.
Although aesthetically unpleasing, this does
not cause any problems in the operation of
the recycler.
Percent Free The percentage of free space remaining on
this volume. This value comes directly from
the library catalog. It gives the percent of
the volume's total capacity that is available
to hold new archive images.
For media that supports data compression, a best-guess value
of the average compression is calculated from the ratio of
the number of physical tape blocks consumed on the volume
(that is, the difference of capacity - space) to the logical
number of tape blocks written to the volume. The latter
value is kept in the catalog. This ratio is then used to
adjust the In Use value before it is written to the log
file.
The first volume to appear in the log file, for each library
or archive set, is the one most in need of recycling.
Here is an example recycler log file:
========== Recycler begins at Thu Feb 5 13:40:20 1998 ===========
3 catalogs:
0 Family: hy Path: /tmp/y
Vendor: SAM-FS Product: Historian
EA ty capacity space vsn
(no VSNs in this media changer)
Total Capacity: 0 bytes, Total Space Available: 0 bytes
Media utilization 0%, high 0% VSN_min 0%
1 Family: ad40 Path: /var/opt/SUNWsamfs/catalog/ad40
Vendor: ADIC Product: Scalar DLT 448
EA ty capacity space vsn
0 lt 19.2G 0 DLT3
1 lt 17.7G 17.6G DLT4N
5 lt 17.7G 17.6G DLT6
Total Capacity: 54.6G bytes, Total Space Available: 35.2G bytes
Media utilization 35%, high 75% VSN_min 50%
2 Family: arset0.1 Path: /etc/opt/SUNWsamfs/archiver.cmd
Vendor: SAM-FS Product: Archive set
EA ty capacity space vsn
0 lt 0 0 DLT5
1 lt 19.2G 0 DLT3
2 lt 0 0 DLT2
3 lt 17.7G 17.6G DLT4N
4 lt 17.7G 17.6G DLT6
Total Capacity: 54.6G bytes, Total Space Available: 35.2G bytes
Media utilization 35%, high 80% VSN_min 50%
Send mail to root when this archive set needs recycling.
6 VSNs:
---Archives--- -----Percent-----
-----Status----- Count Bytes Use Obsolete Free Library:Type:VSN
shelved VSN 677 648.9M :lt:DLT0
---Archives--- -----Percent----- arset0.1
-----Status----- Count Bytes Use Obsolete Free Library:Type:VSN
no-data VSN 0 0 0 100 0 ad40:lt:DLT3
empty VSN 0 0 0 0 0 (NULL):lt:DLT2
empty VSN 0 0 0 0 100 ad40:lt:DLT6
full VSN 4 32.1k 0 0 0 (NULL):lt:DLT5
partially full 4 40.8k 0 0 100 ad40:lt:DLT4N
Recycler finished.
========== Recycler ends at Thu Feb 5 13:40:41 1998 ===========
Here is the corresponding archiver.cmd file:
interval = 2m
no_archive .
fs = samfs1
arset0 testdir0
1 1s
2 1s
3 1s
4 1s
no_archive .
fs = samfs2
no_archive .
vsns
arset0.1 lt DLT3 DLT4N DLT6 DLT1
arset0.2 lt DLT3 DLT4N DLT6 DLT1
arset0.3 lt DLT3 DLT4N DLT6 DLT1
arset0.4 lt DLT3 DLT4N DLT6 DLT1
samfs1.1 lt DLT3
samfs2.1 lt DLT4N
endvsns
params
arset0.1 -drives 4 -recycle_hwm 80 -recycle_mingain 50
endparams
Here is the corresponding /etc/opt/SUNWsamfs/recycler.cmd
file:
logfile = /var/tmp/recycler.log
ad40 75 50
no_recycle mo ^OPT003
RECYCLING HISTORIAN CARTRIDGES
The recycler recycles volumes listed in the historian's
catalog. The volumes listed in the historian catalog have
been exported from a library or have been or are currently
in a manually-mounted device.
The /etc/opt/SUNWsamfs/scripts/recycler.sh(1M) script is
passed the name hy, signifying volumes that reside in the
historian catalog so that it can cope with the possibility
of the volumes being recycled residing in an off-site
storage facility. Typically, the
/etc/opt/SUNWsamfs/scripts/recycler.sh(1M) script sends
email to the administrator when this occurs to remind the
administrator to bring the off-site volume back on site so
that it can be reused. Volumes do not need to be on site to
be drained of archive copies unless such a volume contains
the only available archive copy of an off-line file.
RECYCLING BY ARCHIVE SET
When the recycler recycles by archive set, it treats each
archive set as a small library that holds just the volumes
assigned to the archive set in the
/etc/opt/SUNWsamfs/archiver.cmd file. The volumes that are
identified as belonging to a recycling archive set are
removed from the recycler's version of the catalog for the
library that physically contains the volume. Thus, only the
volumes that are not part of an archive set remain in the
library catalog.
To enable recycling for a given archive set, it must have
one of the recycling options specified in the
/etc/opt/SUNWsamfs/archiver.cmd file. For more information,
see the archiver.cmd(4) man page.
MESSAGES
Consider the following message:
Jan 22 10:17:17 jupiter sam-recycler[3400]: Cannot ioctl(F_IDSCF)
Cannot find pathname for filesystem /samfs1 inum/gen 406/25
The preceding message means that the recycler could not set
the rearchive flag for a file. When this happens, the
recycler typically emits a message containing the path name,
as follows:
Jan 22 10:17:17 jupiter sam-recycler[3400]: Cannot ioctl(F_IDSCF)
/samfs1/testfile
However, in the first message, you see text beginning with
Cannot find pathname.... This means that the recycler
failed in its attempt to convert the inode number (in the
preceding example message, it is inode number 406) and
generation number (here, 25) into a path name in the /samfs1
file system.
The most likely reason for this to occur is that the file
was deleted between the time that the recycler determined it
needed to be rearchived and the time the recycler actually
issued the system call to set the rearchive flag.
SEE ALSO
chmed(1M), odlabel(1M), recycler.sh(1M). sam-archiverd(1M),
tplabel(1M).
archiver.cmd(4), mcf(4), recycler.cmd(4).
Sun Microsystems Last change: 10 Jan 2007
Maintenance Commands recycler.sh(1M)
NAME
recycler.sh - Sun StorEdge SAM-FS or Sun SAM-QFS recycler
post-processing script
SYNOPSIS
/etc/opt/SUNWsamfs/scripts/recycler.sh gen_media vsn slot eq
specific_media fs_name [ vsn_modifier ]
AVAILABILITY
SUNWsamfs
DESCRIPTION
The sam-recycler(1M) process executes the
/etc/opt/SUNWsamfs/scripts/recycler.sh script after it has
finished draining a cartridge of all known active archive
images and recycling is complete.
As released, /etc/opt/SUNWsamfs/scripts/recycler.sh sends
email to root with the relevant information.
OPTIONS
This script accepts the following arguments:
gen_media Generic media type. Specify od for
magneto-optical media. Specify tp for tape media.
This argument is used to construct the name of the
appropriate media labeling command, either
odlabel(1M) or tplabel(1M).
vsn The volume serial name (VSN) of the cartridge
being processed.
slot The slot location of the media in the library.
eq The Equipment Ordinal of the library in which the
media cartridge is located.
specific_media
The specific media type. For information on
specific media types, see the mcf man page. This
information is supplied to the chmed(1M) command
if needed.
fs_name Either hy, which represents the historian, or the
family set name of the library.
vsn_modifier
The VSN modifier. Used only for magneto-optical.
EXAMPLE
The following is an example
/etc/opt/SUNWsamfs/scripts/recycler.sh file:
#!/bin/csh -f
#
# /etc/opt/SUNWsamfs/scripts/recycler.sh - post-process a VSN after recycler h
as
# drained it of all known active archive copies.
#
# Arguments are:
# $1 - generic media type "od" or "tp" - used to construct the name
# of the appropriate label command: odlabel or tplabel
#
# $2 - VSN of cartridge being post-processed
#
# $3 - Slot in the library where the VSN is located
#
# $4 - equipment number of the library where the VSN is located
#
# $5 - actual media type ("mo", "lt", etc.) - used to chmed
# the media if required
#
# $6 - family set name of the physical library, or the string
# "hy" for the historian library. This can be used to
# handle recycling of off-site media, as shown below.
#
# $7 - VSN modifier, used for optical and D2 media
#
#
#
# It is a good idea to log the calls to this script
#echo `date` $* >> /var/opt/SUNWsamfs/recycler.sh.log
# As an example, if uncommented, the following lines will relabel the VSN,
# if it exists in a physical library. If the VSN is in the historian
# catalog (e.g., it's been exported from a physical library and moved
# to off-site storage), then email is sent to "root" informing that the
# medium is ready to be returned to the site and reused.
#
#set stat=0
#if ( $6 != hy ) then
# /opt/SUNWsamfs/sbin/chmed -R $5.$2
# /opt/SUNWsamfs/sbin/chmed -W $5.$2
# if ( $5 != "d2" ) then
# if ( $1 != "od" ) then
# /opt/SUNWsamfs/sbin/${1}label -w -vsn $2 -old $2 $4:$3
# if ( $status != 0 ) then
# set stat = 1
# endif
# else
# /opt/SUNWsamfs/sbin/${1}label -w -vsn $2 -old $2 $4:$3:$7
# if ( $status != 0 ) then
# set stat = 1
# endif
# endif
# else
# /opt/SUNWsamfs/sbin/${1}label -w -vsn $2 -old $2 $4:$3:$7
# if ( $status != 0 ) then
# set stat = 1
# endif
# endif
#else
# mail root <> /var/opt/SUNWsamfs/recycler.sh.log
#if ( $stat != 0 ) then
# exit 1
#else
# exit 0
#endif
#
#
# These lines would inform "root" that the VSN should be removed from the
# robotic library:
#
#mail root <> /var/opt/SUNWsamfs/recycler.sh.log
#exit 0
# The default action is to mail a message reminding you to set up this
# file. You should comment out these lines (through and including the /eof
# below) after you've set up this file.
#
mailx -s "Robot $6 at hostname `hostname` recycle." root <> /var/opt/SUNWsamfs/recycler.sh.log
exit 0
The example first checks to see if the VSN is in a physical
library. If it is, the example script first clears the
read-only and write-protect catalog bits. It then issues a
tplabel(1M) or odlabel(1M) command to relabel the cartridge
with its existing label. Relabeling has the effect of
clearing all the expired archive images from the cartridges,
thus enabling the archiver to re-use the cartridge.
Labeling also clears the recycle bit in the VSN's catalog
entry.
If the VSN is in the historian catalog, the script sends an
email message to root. Note that a cartridge in a manually
mounted drive is shown in the historian catalog as well, so
you may want to see if the VSN is currently in a drive and
relabel it if necessary.
SEE ALSO
odlabel(1M), sam-recycler(1M), tplabel(1M).
Sun Microsystems Last change: 02 Jun 2004
Maintenance Commands sam-releaser(1M)
NAME
sam-releaser - Sun StorEdge SAM-FS and Sun SAM-QFS disk
space releaser process
SYNOPSIS
/opt/SUNWsamfs/sbin/sam-releaser file_system low_water_mark
weight_size [weight_age]
AVAILABILITY
SUNWsamfs
DESCRIPTION
The sam-releaser process controls the activities of the Sun
StorEdge SAM-FS and Sun SAM-QFS releaser. The releaser
makes disk cache available by identifying archived files and
releasing their disk cache copy. This process is started
automatically by the file system when disk cache utilization
reaches the high-water mark.
If the releaser command file is present in
/etc/opt/SUNWsamfs/releaser.cmd, the sam-releaser process
reads that file. Directives in the releaser.cmd file are
overridden by the equivalent command-line arguments, if
present. For more information on the releaser command file,
see the releaser.cmd(4) man page.
OPTIONS
This command accepts the following arguments:
file_system This is the file system whose disk space is to
be released. The argument may be either the
name of the file system, or its mount_point.
The releaser attempts to release the disk space
of archived files on the file system mounted on
the mount_point until low_water_mark is reached.
low_water_mark
A percentage of the file system that is allowed
to be completely occupied with files at all
times. Specify an integer number that is at
least 0 but no more than 100. The releaser
attempts to release disk space until the file
system is at or below this threshold.
weight_size A weighting factor that is used to prioritize
release candidates. Specify a floating-point
value that is at least 0.0 but no more than 1.0.
For more information on weight_size, see the
PRIORITY WEIGHTS section of this man page.
weight_age A weighting factor that is used to prioritize
release candidates. Specify a floating-point
value that is at least 0.0 but no more than 1.0.
For more information on weight_age, see the
PRIORITY WEIGHTS section of this man page.
ALGORITHM
The releaser reads the Sun StorEdge SAM-FS or Sun SAM-QFS
.inodes file and builds an ordered list of the files that
can be released. The position of each file on the list
depends on a priority calculated for each inode by the
releaser (see the PRIORITY WEIGHTS section of this man
page.) Only the top list_size (default 10,000) files are
kept on the list. See releaser.cmd(4) for a description of
list_size.
Starting with the file with the numerically largest prior-
ity, the disk space used by each file is released until the
low_water_mark has been reached. If the list is exhausted
before the low_water_mark is reached, the process is
repeated. If, while repeating the process, no files are
found that can be released, the releaser stops. If the file
system is still above high-water mark, the file system res-
tarts the releaser.
PRIORITY WEIGHTS
Each inode is assigned a priority based on its size and age.
The size of the file (expressed in units of 4-kilobyte
blocks) is multiplied by the weight_size parameter. This
result is added to the priority calculated for the age of
the file to form the file's final priority.
The releaser can use one of the following two methods for
determining the contribution of the age of a file to the
file's release priority:
o The first method is to take the most recent of the file's
access, modification, and residence-change age and multi-
ply by weight_age.
o The second method allows specification of weights for each
of the access, modification, and residence-change times.
These are specified by the weight_age_access=float,
weight_age_modify=float, and weight_age_residence=float
directives, respectively, in the releaser.cmd file. The
sum of the product of the weight and corresponding age is
the contribution of the age to the file's priority. To
specify any of these priority weights, you must use the
releaser.cmd file. For information on the releaser.cmd
file, see the releaser.cmd(4) man page.
For both methods, the ages are expressed in minutes.
LOG
Within the releaser.cmd file, you can specify a log file for
each Sun StorEdge SAM-FS or Sun SAM-QFS file system. If the
releaser.cmd file does not exist, or if no logfile=filename
directive exists in the file, no logging occurs. For more
information on the logfile=filename directive, see the
releaser.cmd(4) man page.
The releaser creates the log file (if it does not exist) and
appends the following to it for each run:
Releaser begins at Tue Sep 29 15:31:15 1998
inode pathname /sam1/.inodes
low-water mark 40%
list_size 10000
weight_size 1
weight_age 0.5
fs equipment ordinal 1
family-set name samfs1
started by sam-fsd? no
release files? no
release rearch files? yes
display_all_candidates? no
---before scan---
blocks_now_free: 117312
lwm_blocks: 233750
---scanning---
64122.5 (R: Tue Sep 29 11:33:21 CDT 1998) 237 min, 64004 blks S0 /sam1/250m
5131.5 (R: Tue Sep 22 17:39:47 CDT 1998) 9951 min, 156 blks S0 /sam1/filecq
5095.5 (R: Tue Sep 22 17:39:49 CDT 1998) 9951 min, 120 blks S0 /sam1/filecu
5062 (R: Tue Sep 22 18:38:50 CDT 1998) 9892 min, 116 blks S0 /sam1/filebz
5039.5 (R: Tue Sep 22 17:40:01 CDT 1998) 9951 min, 64 blks S0 /sam1/filedi
5036.5 (R: Tue Sep 22 17:37:34 CDT 1998) 9953 min, 60 blks S0 /sam1/fileio
5035.5 (R: Tue Sep 22 17:40:13 CDT 1998) 9951 min, 60 blks S0 /sam1/filedw
5032.5 (R: Tue Sep 22 17:38:08 CDT 1998) 9953 min, 56 blks S0 /sam1/filejq
5031.5 (R: Tue Sep 22 17:39:56 CDT 1998) 9951 min, 56 blks S0 /sam1/fileda
5024.5 (R: Tue Sep 22 17:38:00 CDT 1998) 9953 min, 48 blks S0 /sam1/filejh
5024 (R: Tue Sep 22 17:38:22 CDT 1998) 9952 min, 48 blks S0 /sam1/fileka
5023.5 (R: Tue Sep 22 17:40:07 CDT 1998) 9951 min, 48 blks S0 /sam1/filedn
5019 (R: Tue Sep 22 17:40:44 CDT 1998) 9950 min, 44 blks S0 /sam1/filefk
5015 (R: Tue Sep 22 17:40:28 CDT 1998) 9950 min, 40 blks S0 /sam1/fileep
5011.5 (R: Tue Sep 22 17:40:14 CDT 1998) 9951 min, 36 blks S0 /sam1/filedx
5011.5 (R: Tue Sep 22 17:39:58 CDT 1998) 9951 min, 36 blks S0 /sam1/filede
5011 (R: Tue Sep 22 17:41:07 CDT 1998) 9950 min, 36 blks S0 /sam1/filegk
5007.5 (R: Tue Sep 22 17:39:51 CDT 1998) 9951 min, 32 blks S0 /sam1/filecw
5007 (R: Tue Sep 22 17:41:10 CDT 1998) 9950 min, 32 blks S0 /sam1/filegr
5007 (R: Tue Sep 22 17:40:42 CDT 1998) 9950 min, 32 blks S0 /sam1/filefg
5007 (R: Tue Sep 22 17:40:30 CDT 1998) 9950 min, 32 blks S0 /sam1/filees
5004.5 (R: Tue Sep 22 17:38:14 CDT 1998) 9953 min, 28 blks S0 /sam1/filejv
5004 (R: Tue Sep 22 17:38:57 CDT 1998) 9952 min, 28 blks S0 /sam1/filelm
5002 (R: Tue Sep 22 18:38:54 CDT 1998) 9892 min, 56 blks S0 /sam1/filecd
4996.5 (R: Tue Sep 22 17:38:06 CDT 1998) 9953 min, 20 blks S0 /sam1/filejp
4995.5 (R: Tue Sep 22 17:39:57 CDT 1998) 9951 min, 20 blks S0 /sam1/filedc
4992.5 (R: Tue Sep 22 17:37:24 CDT 1998) 9953 min, 16 blks S0 /sam1/fileig
4992 (R: Tue Sep 22 17:39:06 CDT 1998) 9952 min, 16 blks S0 /sam1/filelv
4986 (R: Tue Sep 22 18:38:50 CDT 1998) 9892 min, 40 blks S0 /sam1/fileca
4982 (R: Tue Sep 22 17:36:54 CDT 1998) 9954 min, 5 blks S0 /sam1/filehk
4981 (R: Tue Sep 22 17:41:09 CDT 1998) 9950 min, 6 blks S0 /sam1/filegn
4980.5 (R: Tue Sep 22 17:40:15 CDT 1998) 9951 min, 5 blks S0 /sam1/filedz
---after scan---
blocks_now_free: 0
blocks_freed: 65452
lwm_blocks: 233750
archnodrop: 0
already_offline: 647
damaged: 0
extension_inode: 0
negative_age: 0
nodrop: 0
not_regular: 7
number_in_list: 32
rearch: 1
released_files: 32
too_new_residence_time: 0
too_small: 1
total_candidates: 32
total_inodes: 704
wrong_inode_number: 14
zero_arch_status: 3
zero_inode_number: 0
zero_mode: 0
CPU time: 0 seconds.
Elapsed time: 1 seconds.
Releaser ends at Tue Sep 29 15:31:16 1998
The first block of lines shows the arguments with which the
releaser was invoked, the name of the .inodes file, the
low-water mark, the size and age weight parameters, the
equipment ordinal of the file system, the family set name of
the file system, whether the releaser was started by sam-fsd
or by the command line, whether files should be released,
and whether each inode should be logged as encountered.
The second block of lines begins with the heading ---before
scan---. It shows the number of blocks currently free in
the cache and the number that would be free if the file sys-
tem were exactly at the low-water mark. The goal of the
releaser is to increase blocks_now_free so that it is equal
to or larger than lwm_blocks.
The third block of lines begins with the heading ---
scanning---. This block lists the files released by the
releaser and contains information for each file in separate
fields. The fields are as follows:
Field Number Content
1 This field contains the release priority.
2 This field contains the date and time in the
following format: (tag: date_and_time).
The tag is either A for access, M for modify,
or R for residency, depending on if the date
that follows represents the access, modify or
residency time.
The date_and_time is the most recent of the
three dates listed.
3 This field contains the age and size of the
file. The age of the file is expressed in
minutes. The size of the file is expressed
in blocks. These two figures are multiplied
by their respective weights and the sum taken
to yield the release priority.
4 This field contains an S followed by the seg-
ment number. This is the number of the seg-
ment that was released.
5 This field contains the full path name of the
released file.
Note that if the weight_age_access=float,
weight_age_modify=float or weight_age_residence=float direc-
tives are specified in the releaser.cmd file, these lines
show only the priority, size, and pathname.
The fourth block of lines begins with the heading ---after
scan---. This block shows the statistics accumulated by the
releaser during the previous scan pass are shown. These
statistics are as follows:
Statistic Meaning
archnodrop The number of inodes marked archnodrop.
These files are never released because
the archiver is trying to keep them in
cache.
already_offline The number of inodes that were offline.
damaged The number of inodes marked as damaged.
extension_inode The number of extension inodes found.
Used by volume overflow.
negative_age The number of inodes that had an age in
the future. This is usually caused by
personal computers with incorrect clock
settings acting as NFS clients.
nodrop The number of inodes marked with release
-n. For more information on marking
files as never release, see the
release(1) man page.
not_regular The number of inodes that were not regu-
lar files.
number_in_list The number of inodes that were on the
releaser's candidate list when the
releaser was finished scanning.
rearch The number of files with a copy marked
for rearchiving.
released_files The number of files released.
too_new_residence_time
The number of inodes whose residence-
change time was within minimum residence
age of the current time as specified on
the min_residence_age=time directive in
the releaser.cmd file.
too_small The number of files that were too small
to be released.
total_candidates The number of inodes found that were
viable candidates for releasing.
total_inodes The total number of inodes scanned.
wrong_inode_number The number of inodes whose inode number
did not match their offset in the inode
file. This is usually not a concern,
but you should run samfsck(1M) to rescue
any orphan inodes. If you have already
run samfsck(1M) and this field remains
nonzero, no further action is required.
For more information on the samfsck(1M)
command, see the samfsck(1M) man page.
zero_arch_status The number of inodes that had no archive
copies.
zero_inode_number The number of inodes that had zero as
their inode number.
zero_mode The number of inodes that were unused.
CPU time The number of CPU seconds used in the
current scan.
Elapsed time The number of wall-clock seconds used in
the current scan.
NOTES
When a file is created, the residency age is set to the
creation time. The residency age of a file must be at least
the value set by the min_residence_age=time directive before
the file is considered for release. This is to prevent a
file which was recently staged in from being released. The
default time is 10 minutes.
If the releaser selects a file as a release candidate, and
immediately thereafter the file is accessed, the file might
still be released by the file system even though the file
has been recently accessed. This can happen because the
file system only prohibits release of a file that is
currently in use. It does not check the access age of the
file again when it is released.
SEE ALSO
release(1).
mount_samfs(1M), samfsck(1M).
releaser.cmd(4).
Sun Microsystems Last change: 08 Nov 2004
Maintenance Commands reserve(1M)
NAME
reserve - Reserve a volume for archiving.
SYNOPSIS
/opt/SUNWsamfs/sbin/reserve mediatype.vsn
asname/owner/fsname [time]
/opt/SUNWsamfs/sbin/reserve eq:slot[:partition]
asname/owner/fsname [time]
AVAILABILITY
SUNWsamfs
DESCRIPTION
reserve assigns the volume for archival of specific files.
Normally, the archiver performs reservation of volumes.
This command is provided to pre-reserve a volume.
The volume is determined by the specifier mediatype.vsn , or
eq:slot[:partition]
The reservation is specified by the fields asname, owner,
and fsname These fields may be empty depending on the
options in the archiver command file.
time is the time the volume is reserved. If not specified,
the reserve time is set to the present time. Several for-
mats are allowed for time. Examples are:
"2000-09-19"; "2000-07-04 20:31"; 23:05; "Mar 23"; "Mar 23
1994"; "Mar 23 1994 23:05"; "23 Mar"; "23 Mar 1994"; "23 Mar
1994 23:05".
Month names may be abbreviated or spelled out in full.
Time-of-day is given in 24-hour format. Years must use all
four digits. If the time contains blanks, the entire time
must be enclosed in quotation marks.
SEE ALSO
archiver(1M), archiver.cmd(1M), unreserve(1M)
Sun Microsystems Last change: 19 Sep 2000
Maintenance Commands restore.sh(1M)
NAME
restore.sh - Restores files online
SYNOPSIS
restore.sh log_file mount_point
AVAILABILITY
SUNWsamfs
DESCRIPTION
The restore.sh script restores files to their online or
partially online status. This script should be used after
performing a file system restore using the samfsrestore(1M)
command.
This script accepts the following arguments:
log_file Specify the name of the log file that was created
by the samfsrestore(1M) command.
mount_point
Specify the mount point of the file system being
restored.
USAGE
Step 1. Recreate or restore the file system.
You can do this by using the samfsrestore(1M) command with
its -g option. This creates a log file.
Step 2. Run the restore.sh script.
The first argument is the log file created in the previous
step, and the second argument is the file system mount
point. This script stages back the files that were
previously online or partially online at the time the
.inodes copy or samfsdump(1M) was created.
FILES
The restore.sh script resides in the following location:
/opt/SUNWsamfs/examples/restore.sh
SEE ALSO
Sun QFS, Sun SAM-FS, and Sun SAM-QFS Disaster Recovery
Guide.
samfsdump(1M), samfsrestore(1M).
Sun Microsystems Last change: 24 Apr 2002
Maintenance Commands sam-robotsd(1M)
NAME
sam-robotsd, sam-genericd, sam-stkd, sam-ibm3494d, sam-sonyd
- Sun StorEdge SAM-FS and Sun SAM-QFS media changer daemons
SYNOPSIS
/opt/SUNWsamfs/sbin/sam-robotsd mshmid pshmid
/opt/SUNWsamfs/sbin/sam-genericd mshmid pshmid equip
/opt/SUNWsamfs/sbin/sam-stkd mshmid pshmid equip
/opt/SUNWsamfs/sbin/sam-ibm3494d mshmid pshmid equip
/opt/SUNWsamfs/sbin/sam-sonyd mshmid pshmid equip
AVAILABILITY
SUNWsamfs
DESCRIPTION
The sam-robotsd daemon starts and monitors the execution of
the media changer library control daemons for Sun StorEdge
SAM-FS and Sun SAM-QFS. The sam-robotsd daemon is started
automatically by the sam-amld daemon if there are any
libraries defined in the mcf file. The sam-robotsd daemon
starts and monitors the correct daemon for all defined
libraries. For more information on the mcf file, see the
mcf(4) man page.
Each library daemon is responsible for monitoring the
preview table for the VSNs that are controlled by that
daemon. If a request is found for one of its VSNs, the
daemon finds an available drive under its control and moves
the cartridge into that drive. When the device is ready,
the daemon notifies the Sun StorEdge SAM-FS or Sun SAM-QFS
library daemon, and the device is assigned to the waiting
process.
The identifiers are as follows:
mshmid The identifier of the master shared memory segment
created by the sam-amld daemon.
pshmid The identifier of the preview shared memory
segment created by the sam-amld daemon.
equip The equipment number of the device.
The sam-genericd daemon controls libraries that conform to
the SCSI II standard for media changers, and it is the
daemon that controls the ADIC/Grau ABBA library through the
grauaci interface. For more information on this interface,
see the grauaci(7) man page. It also controls the Fujitsu
LMF library; see the fujitsulmf(7) man page.
The sam-stkd daemon controls StorageTek libraries through
the ACSAPI interface and is included in the Sun StorEdge
SAM-FS software package. For more information on this
interface, see the stk(7) man page.
The sam-ibm3494d daemon controls IBM 3494 tape libraries
through the lmcpd interface and is included in the Sun
StorEdge SAM-FS software package. For more information on
this interface, see the ibm3494(7) man page.
The sam-sonyd daemon controls Sony libraries through the
Sony DZC-800S PetaSite Application Interface Library and is
included in the Sun StorEdge SAM-FS software package. For
more information on this interface, see the sony(7) man
page.
FILES
mcf The master configuration file for Sun StorEdge
SAM-FS and Sun SAM-QFS environments.
SEE ALSO
sam-amld(1M).
mcf(4).
acl2640(7), acl452(7), fujitsulmf(7), grauaci(7),
ibm3494(7), ibm3584(7), sam-remote(7), sony(7), stk(7).
Sun Microsystems Last change: 04 Feb 2004
Maintenance Commands sam-rpcd(1M)
NAME
sam-rpcd - Sun StorEdge SAM-FS and Sun SAM-QFS RPC API
server process
SYNOPSIS
/opt/SUNWsamfs/sbin/sam-rpcd
AVAILABILITY
SUNWsamfs
DESCRIPTION
sam-rpcd is the RPC API (Application Programmer Interface)
server process. It is initiated by sam-amld.
sam-rpcd uses the RPC program number that is paired with the
RPC program name samfs. sam-rpcd must run on the same
machine as Sun StorEdge SAM-FS or Sun SAM-QFS file system.
You need to make the following entry in /etc/services on the
server:
samfs 5012/tcp # SAM-FS API
And in /etc/rpc on client and server:
samfs 150005
Make the equivalent changes in the NIS databases if you run
NIS.
SEE ALSO
sam_initrpc(3x)
Sun Microsystems Last change: 21 Feb 2003 1
Maintenance Commands sam-amld(1M)
NAME
sam-amld - Initialize the Sun StorEdge SAM-FS automated
library daemons
SYNOPSIS
/opt/SUNWsamfs/sbin/sam-amld
AVAILABILITY
SUNWsamfs
DESCRIPTION
sam-amld initializes the Sun StorEdge SAM-FS automated
library daemons system daemons. It is typically started
when a file system is mounted, but can be started without
mounting the file system.
FILES
/opt/SUNWsamfs/sbin Location of Sun StorEdge SAM-FS daemons
/etc/opt/SUNWsamfs Location of Sun StorEdge SAM-FS daemon
configuration files
/etc/opt/SUNWsamfs/mcf
The configuration file for Sun StorEdge
SAM-FS environments.
SEE ALSO
mcf(4), mount(1M), mount_samfs(1M), archiver(1M),
generic(1M), samd(1M), scanner(1M), robots(1M)
NOTES
To start sam-amld, use the command samd start
To shutdown sam-amld, use the command samd stop
Sun Microsystems Last change: 29 Sept 1997
Maintenance Commands sam-archiverd(1M)
NAME
sam-archiverd - Sun StorEdge SAM-FS and Sun SAM-QFS file
archive daemon
SYNOPSIS
/opt/SUNWsamfs/sbin/sam-archiverd
AVAILABILITY
SUNWsamfs
DESCRIPTION
The archiver daemon automatically archives Sun StorEdge
SAM-FS or Sun SAM-QFS files when a Sun StorEdge SAM-FS or
Sun 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
"noarchive" 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
computation 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.
For ArchReq-s with a 'join' method required:
Sort the files using the join method property as the key.
This collects the files with the same property together.
Step through the ArchReq to mark the archive file boundaries
where the properties differ. Sort the files within the
archive file boundaries according to the 'sort' method.
Each group of joined files is treated as if it were a single
file for the remainder of the composing and scheduling
processes.
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
generation number is an additional number used in
addition 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 ordinal 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)
Sun Microsystems Last change: 25 Nov 2003
Maintenance Commands sam-arcopy(1M)
NAME
sam-arcopy - Sun StorEdge SAM-FS and Sun SAM-QFS archive
copy daemon
SYNOPSIS
/opt/SUNWsamfs/sbin/sam-arcopy
AVAILABILITY
SUNWsamfs
DESCRIPTION
The sam-arcopy process is responsible for copying Sun
StorEdge SAM-FS or Sun SAM-QFS files to removable media. It
is executed by sam-archiverd(1M). All required information
is transmitted to the sam-arcopy in memory mapped files.
SEE ALSO
sam-archiverd(1M)
Sun Microsystems Last change: 20 Sep 20026
Maintenance Commands sam-arfind(1M)
NAME
sam-arfind - Sun StorEdge SAM-FS and Sun SAM-QFS archive
find daemon
SYNOPSIS
/opt/SUNWsamfs/sbin/sam-arfind file_system
AVAILABILITY
SUNWsamfs
DESCRIPTION
sam-arfind is responsible for finding samfs file system
files to be archived. It is executed by sam-archiverd(1M).
The only argument is the name of the file system. All other
required information is transmitted to sam-arfind in memory
mapped files.
SEE ALSO
sam-archiverd(1M)
Sun Microsystems Last change: 20 Sep 2002
Maintenance Commands sam-catserverd(1M)
NAME
sam-catserverd - Sun StorEdge SAM-FS and Sun SAM-QFS media
manager daemon
SYNOPSIS
/opt/SUNWsamfs/sbin/sam-catserverd
AVAILABILITY
SUNWsamfs
DESCRIPTION
The sam-catserverd daemon keeps track of media in Sun
StorEdge SAM-FS and Sun SAM-QFS library catalogs. A library
catalog is the central repository of all information needed
by the Sun StorEdge SAM-FS and Sun SAM-QFS environments to
find cartridges in an automated library. The library
catalog file is a binary, UFS-resident file that contains
information about each slot in a library or manual drive.
The information in the catalog includes the Volume Serial
Name (VSN), the capacity and space remaining, and the flags
indicating the status of the VSN.
When the sam-catserverd daemon starts, it checks for the
presence of a catalog file for each automated library
defined in the mcf file. If a file is not found, the
sam-catserverd daemon creates a library catalog file in the
default location,
/var/opt/SUNWsamfs/catalog/family_set_name. The family set
name is used for the catalog file name. Alternatively, a
file can be specified by the user in the Additional
Parameters field on the library definition line in the mcf
file.
If the automated library is SCSI attached, the library
catalog is a one-to-one mapping between the library catalog
entries and physical slots in the automated library.
However, if the automated library is network-attached, the
library catalog is not a direct mapping to the slots, but it
is a list of VSNs known to be present in the automated
library.
The library catalog contains the following information about
each VSN in the library:
o Status bits
o Media type
o Volume serial number
o Storage slot
o Partition
o Count of access
o Capacity of volume
o Space left on volume
o Block size or sector size for optical media
o Label time
o Last modification time
o Last mount time
o Bar Code
o First word address of PTOC (for optical media) or last
position found (for tape media).
If reserved VSNs are used, the following fields are also
present:
o Time reservation made
o Archive set
o Owner
o File system
SEE ALSO
build_cat(1M), dump_cat(1M), export(1M), import(1M).
mcf(4).
Sun Microsystems Last change: 12 Nov 2001
Maintenance Commands sam-fsd(1M)
NAME
sam-fsd - Initializes Sun StorEdge SAM-FS and Sun SAM-QFS
environments
SYNOPSIS
/usr/lib/fs/samfs/sam-fsd [ -C ] [ -c defaults] [ -d
diskvols] [ -f samfs] [ -m mcf] [ -v ]
AVAILABILITY
SUNWsamfs
DESCRIPTION
sam-fsd initializes Sun StorEdge SAM-FS and Sun SAM-QFS
environments and performs tasks for the file system kernel
code. These tasks include sending messages to syslog, and
starting the archiver, releaser, shared fs, and stager dae-
mons. It is started by init(1M) using an entry in
/etc/inittab
sf:23:respawn:/usr/lib/fs/samfs/sam-fsd
When started, sam-fsd reads the configuration files
defaults.conf, diskvols.conf, mcf, and samfs.cmd located in
the directory /etc/opt/SUNWsamfs. These files may be
changed at any time while sam-fsd is running. The changes
will take place when sam-fsd is restarted, or sent the sig-
nal SIGHUP.
The filesystems are configured and necessary daemons are
started. Configuration parameters are set, and table files
are written for use by other components of Sun StorEdge
SAM-FS and Sun SAM-QFS environment.
If errors occur in any of the configuration files, sam-fsd
refuses to run and writes a notification message to syslog.
The problem must be corrected, and the signal SIGHUP sent to
sam-fsd. sam-fsd then rereads the configuration files. The
syslog message contains the command necessary to signal
sam-fsd .
'kill -HUP sam-fsd-pid'
Trace Files
Several Sun StorEdge QFS, Sun StorEdge SAM-FS, and Sun
SAM-QFS daemons write messages to trace files. These mes-
sages contain information about the state and progress of
the work performed by the daemons. The messages are pri-
marily used by Sun engineers and support personnel to
improve performance and diagnose problems. As such, the
message content and format are subject to change with bug-
fixes and feature releases.
The daemons writing trace files are: sam-archiverd,
sam-catserver, sam-fsd, sam-rftd, sam-recycler,
sam-sharefsd, and sam-stagerd.
To prevent the trace files from growing indefinitely,
sam-fsd monitors the size and age of the trace files and
periodically executes the script
/opt/SUNWsamfs/sbin/trace_rotate. This script moves the
trace files to sequentially numbered copies. The script is
executed when the trace file exceeds a specified size, or
age. The size and age are specified in defaults.conf. If
/opt/SUNWsamfs/sbin/trace_rotate does not exist, sam-fsd
performs no action.
OPTIONS
sam-fsd may be started by direct execution to provide
detailed messages about problems in configuration files. In
this case, the following options are allowed:
-c defaults
Sets an alternate defaults.conf file to check.
defaults is the path to the alternate defaults
configuration file.
-d diskvols
Sets an alternate diskvols.conf file to check.
diskvols is the path to the alternate diskvols
configuration file.
-f fs_name
Sets a single file system. fs_name is the family
set name from the mcf file.
-m mcf
Sets an alternate mcf file to check. mcf is the
path to the alternate mcf file.
-v Sets verbose mode.
-C Configure Sun StorEdge SAM-FS and Sun SAM-QFS if
not already configured. Must be the only option.
FILES
/etc/opt/SUNWsamfs Location of Sun StorEdge SAM-FS and Sun
StorEdge SAM-QFS configuration files.
mcf The configuration file for Sun StorEdge
SAM-FS and Sun SAM-QFS environments.
samfs.cmd Sun StorEdge QFS and Sun StorEdge SAM-FS
mount commands file.
defaults.conf Set default values for Sun StorEdge
SAM-FS and Sun SAM-QFS environment.
SEE ALSO
defaults.conf(4), diskvols.conf(4), mcf(4), samfs.cmd(4).
trace_rotate(1M).
Sun Microsystems Last change: 30 Dec 2003
Maintenance Commands sam-ftpd(1M)
NAME
sam-ftpd - Renamed to "sam-rftd"
SEE ALSO
sam-rftd(1M).
Sun Microsystems Last change: 04 AUG 2003
Maintenance Commands sam-robotsd(1M)
NAME
sam-robotsd, sam-genericd, sam-stkd, sam-ibm3494d, sam-sonyd
- Sun StorEdge SAM-FS and Sun SAM-QFS media changer daemons
SYNOPSIS
/opt/SUNWsamfs/sbin/sam-robotsd mshmid pshmid
/opt/SUNWsamfs/sbin/sam-genericd mshmid pshmid equip
/opt/SUNWsamfs/sbin/sam-stkd mshmid pshmid equip
/opt/SUNWsamfs/sbin/sam-ibm3494d mshmid pshmid equip
/opt/SUNWsamfs/sbin/sam-sonyd mshmid pshmid equip
AVAILABILITY
SUNWsamfs
DESCRIPTION
The sam-robotsd daemon starts and monitors the execution of
the media changer library control daemons for Sun StorEdge
SAM-FS and Sun SAM-QFS. The sam-robotsd daemon is started
automatically by the sam-amld daemon if there are any
libraries defined in the mcf file. The sam-robotsd daemon
starts and monitors the correct daemon for all defined
libraries. For more information on the mcf file, see the
mcf(4) man page.
Each library daemon is responsible for monitoring the
preview table for the VSNs that are controlled by that
daemon. If a request is found for one of its VSNs, the
daemon finds an available drive under its control and moves
the cartridge into that drive. When the device is ready,
the daemon notifies the Sun StorEdge SAM-FS or Sun SAM-QFS
library daemon, and the device is assigned to the waiting
process.
The identifiers are as follows:
mshmid The identifier of the master shared memory segment
created by the sam-amld daemon.
pshmid The identifier of the preview shared memory
segment created by the sam-amld daemon.
equip The equipment number of the device.
The sam-genericd daemon controls libraries that conform to
the SCSI II standard for media changers, and it is the
daemon that controls the ADIC/Grau ABBA library through the
grauaci interface. For more information on this interface,
see the grauaci(7) man page. It also controls the Fujitsu
LMF library; see the fujitsulmf(7) man page.
The sam-stkd daemon controls StorageTek libraries through
the ACSAPI interface and is included in the Sun StorEdge
SAM-FS software package. For more information on this
interface, see the stk(7) man page.
The sam-ibm3494d daemon controls IBM 3494 tape libraries
through the lmcpd interface and is included in the Sun
StorEdge SAM-FS software package. For more information on
this interface, see the ibm3494(7) man page.
The sam-sonyd daemon controls Sony libraries through the
Sony DZC-800S PetaSite Application Interface Library and is
included in the Sun StorEdge SAM-FS software package. For
more information on this interface, see the sony(7) man
page.
FILES
mcf The master configuration file for Sun StorEdge
SAM-FS and Sun SAM-QFS environments.
SEE ALSO
sam-amld(1M).
mcf(4).
acl2640(7), acl452(7), fujitsulmf(7), grauaci(7),
ibm3494(7), ibm3584(7), sam-remote(7), sony(7), stk(7).
Sun Microsystems Last change: 04 Feb 2004
Maintenance Commands sam-robotsd(1M)
NAME
sam-robotsd, sam-genericd, sam-stkd, sam-ibm3494d, sam-sonyd
- Sun StorEdge SAM-FS and Sun SAM-QFS media changer daemons
SYNOPSIS
/opt/SUNWsamfs/sbin/sam-robotsd mshmid pshmid
/opt/SUNWsamfs/sbin/sam-genericd mshmid pshmid equip
/opt/SUNWsamfs/sbin/sam-stkd mshmid pshmid equip
/opt/SUNWsamfs/sbin/sam-ibm3494d mshmid pshmid equip
/opt/SUNWsamfs/sbin/sam-sonyd mshmid pshmid equip
AVAILABILITY
SUNWsamfs
DESCRIPTION
The sam-robotsd daemon starts and monitors the execution of
the media changer library control daemons for Sun StorEdge
SAM-FS and Sun SAM-QFS. The sam-robotsd daemon is started
automatically by the sam-amld daemon if there are any
libraries defined in the mcf file. The sam-robotsd daemon
starts and monitors the correct daemon for all defined
libraries. For more information on the mcf file, see the
mcf(4) man page.
Each library daemon is responsible for monitoring the
preview table for the VSNs that are controlled by that
daemon. If a request is found for one of its VSNs, the
daemon finds an available drive under its control and moves
the cartridge into that drive. When the device is ready,
the daemon notifies the Sun StorEdge SAM-FS or Sun SAM-QFS
library daemon, and the device is assigned to the waiting
process.
The identifiers are as follows:
mshmid The identifier of the master shared memory segment
created by the sam-amld daemon.
pshmid The identifier of the preview shared memory
segment created by the sam-amld daemon.
equip The equipment number of the device.
The sam-genericd daemon controls libraries that conform to
the SCSI II standard for media changers, and it is the
daemon that controls the ADIC/Grau ABBA library through the
grauaci interface. For more information on this interface,
see the grauaci(7) man page. It also controls the Fujitsu
LMF library; see the fujitsulmf(7) man page.
The sam-stkd daemon controls StorageTek libraries through
the ACSAPI interface and is included in the Sun StorEdge
SAM-FS software package. For more information on this
interface, see the stk(7) man page.
The sam-ibm3494d daemon controls IBM 3494 tape libraries
through the lmcpd interface and is included in the Sun
StorEdge SAM-FS software package. For more information on
this interface, see the ibm3494(7) man page.
The sam-sonyd daemon controls Sony libraries through the
Sony DZC-800S PetaSite Application Interface Library and is
included in the Sun StorEdge SAM-FS software package. For
more information on this interface, see the sony(7) man
page.
FILES
mcf The master configuration file for Sun StorEdge
SAM-FS and Sun SAM-QFS environments.
SEE ALSO
sam-amld(1M).
mcf(4).
acl2640(7), acl452(7), fujitsulmf(7), grauaci(7),
ibm3494(7), ibm3584(7), sam-remote(7), sony(7), stk(7).
Sun Microsystems Last change: 04 Feb 2004
Maintenance Commands sam-nrecycler(1M)
NAME
sam-nrecycler - Recycles Sun StorEdge SAM-FS and Sun SAM-QFS
volumes
SYNOPSIS
/opt/SUNWsamfs/sbin/sam-nrecycler [-n]
AVAILABILITY
SUNWsamfs
DESCRIPTION
The sam-nrecycler command invokes the nrecycler. The
nrecycler removes expired archive copies and frees up
archive volumes. Often, the nrecycler is invoked through
root's crontab(1) file at an off-peak time. However, the
nrecycler can be invoked at any time.
The sam-nrecycler command provides additional support to aid
in the ability to use SAM-FS dump files for SAM archive
retention capabilities. The nrecycler will scan file system
metadata and SAM-FS dump files to determine which removable
media and disk archive volumes contain archive images so
space on unused volumes can be reclaimed. The nrecycler
will identify all the archive images present on a removable
media volume or disk archive tar ball by scanning all file
system .inodes files and specified SAM-FS dump files. By
scanning the file systems and SAM-FS dump files, the
nrecycler can determine if there are volumes which do not
contain any archive images and the space on these volumes
can be reclaimed. If a removable media volume does not
contain any archive images, it is safe to relabel the
cartridge. If a disk archive tar ball does not contain any
archive images, it is safe to remove the tar ball from the
disk archive directory.
You must provide directives to the nrecycler through lines
entered in the /etc/opt/SUNWsamfs/nrecycler.cmd file. User
must specify a path to directories containing all SAM-FS
dump files to be searched. If no directories are specified
in the command file, recycling does not occur. The user is
responsible for making sure the list of directories is
complete and all SAM-FS dump files are contained in the
directory list. The nrecycler cannot validate the SAM-FS
dump file list. All removable media and disk volumes are
eligible to be selected as obsolete, and thus eligible to be
relabeled or unlinked.
After the nrecycler detects that a removable media volume
contains only free and expired space, thus it is safe to
relabel, the nrecycler invokes the sam-nrecycler.sh script.
The script can relabel the cartridge using either the
original VSN or a new VSN; or it can export the cartridge
from the library; or it can perform another user-defined
action.
After the nrecycler detects that a disk archive volume
contains only free and expired space, the nrecycler will
unlink the unused disk archive tar ball.
OPTIONS
This command accepts the following options:
-n Prevents any actions from being taken.
OPERATION
The sam-recycler command should not be used. The nrecycler
will scan all file system .inodes files and specified SAM-FS
dump files. Since sam-recycler only will scan file system
.inodes files it will incorrectly reclaim space on archive
volumes that has space occupied by archive copies in the
SAM-FS dump files.
You must have the nrecycler command enabled by setting the
nrecycler = yes
option in the /etc/opt/SUNWsamfs/defaults.conf file.
The nrecycler is designed to run periodically. It performs
as much work as it can each time it is invoked. Between
executions, the nrecycler keeps SAM-FS dump file information
in a nrecycler dat file.
All files in SAM-FS dump directories must be valid SAM-FS
dump files. Hidden files, files that begin with a dot, are
skipped. During the first scan of a dump, the nrecycler
will create a dat file. The nrecycler dat file will be
created in the same directory as the dump file with the
string 'SUNWsamfs' appended to the original dump file's
name. A nrecycler dat file contains a summary of which
removable media and and disk archive volumes contain archive
images for the dump. This is a nrecycler performance
optimization so the dump file does not need to be reread
during every execution of the nrecycler. If a SAM-FS dump
should no longer be processed, the nrecycler's dat file for
the file must be removed from the dump directory.
All removable media and disk archive volumes will be
examined and must be owned by this instantiation of SAM.
The nrecycler should not be used in a SAM-remote
environment. However, if disk archive volumes are not
shared between servers, the nrecycler will work correctly on
disk volumes that are reside on other machines.
The nrecycler checks to see if there are removable media
volumes that were selected for recycling that have not yet
been post-processed. If such volumes exist, and they are
now devoid of active archive copies, the sam-nrecycler
command invokes the
/etc/opt/SUNWsamfs/scripts/nrecycler.sh(1M), which
post-processes these volumes with arguments including the
generic media type (tp or od), the VSN, the element address
in the library, and the equipment number of the library in
which the volume resides. The script can relabel the
cartridge using either the original VSN or a new VSN; or it
can export the cartridge from the library; or it can perform
another user-defined action. The nrecycler.sh script will
not be invoked if the amount of space used on a removable
media volume is less than 50% of total space available on
the volume.
Each time it is run, the nrecycler performs these steps:
1. Build a list of all removable media and disk archive
volumes configured in SAM-FS. For faster searching, a hash
table will be used to hold volume information.
2. Collect a list of all file systems configured in SAM-FS.
All SAM-FS file systems, or for which we are the metadata
server, must be mounted to allow the .inodes file to be
read.
3. Generate a list of specified SAM-FS dump directories.
Initialize samfsdump file processing by walking each of the
specified directories and validating the contents of every
file. Every file in the directory must be a valid samfsdump
file or a nrecycler dat file must exist for a dump file.
4. Scan file systems' .inode file reading each inode in all
file systems. For each archive copy, the VSN on which the
copy resides is accumulated into the VSN table.
5. Scan all SAM-FS dump files reading each inode in all dump
files. For each archive copy, the VSN on which the copy
resides is accumulated into the VSN table. During the first
scan of a dump, the nrecycler will create a dat file.
Subsequent execution of the nrecycler will use VSN summary
information from the dat file.
6. Depending on the disk archives' maximum sequence number,
multiple file system .inodes and SAM-FS dump file scans may
be necessary.
7. Select removable media and disk volumes that are obsolete
and eligible to be relabeled or unlinked.
RECYCLER OUTPUT
None.
SEE ALSO
nrecycler.sh(1M). nrecycler.cmd(4).
Sun Microsystems Last change: 13 Jun 2006
Maintenance Commands sam-recycler(1M)
NAME
sam-recycler - Recycles Sun StorEdge SAM-FS and Sun SAM-QFS
volumes
SYNOPSIS
/opt/SUNWsamfs/sbin/sam-recycler [-c] [-C] [-d] [-E]
[-n] [-s] [-v] [-V] [-x] [-X] [family_set | archive_set]
AVAILABILITY
SUNWsamfs
DESCRIPTION
The sam-recycler command invokes the recycler. The recycler
removes expired archive copies and frees up archive volumes.
Often, the recycler is invoked through root's crontab(1)
file at an off-peak time. However, the recycler can be
invoked at any time.
You can specify that only a specific library or archive set
be recycled. You can recycle by library only when archiving
to tape or magneto optical cartridges in a library. Note
that you cannot recycle by library if you are using disk
archiving.
If you want to recycle by archive set, you must name the
archive sets to be recycled in the
/etc/opt/SUNWsamfs/archiver.cmd file.
You can provide directives to the recycler through lines
entered in the /etc/opt/SUNWsamfs/recycler.cmd file and in
the /etc/opt/SUNWsamfs/archiver.cmd file. If no directives
are present and no family_set or archive_set is specified on
the command line, recycling does not occur. The following
are the default recycler settings:
o The maximum data quantity to recycle (-dataquantity) is 1
gigabyte (1G).
o The high water mark (-hwm) is 95.
o The VSN gain (-mingain) is 50.
o The number of volumes (-vsncount) to recycle is 1.
o Automatic email is not sent.
NOTE: Extreme care must be taken when configuring the
recycler if you are using disk archiving in an environment
with multiple SAM-QFS servers. The diskvols.conf file for
each SAM-QFS server must point to a unique set of disk
volume resource specifications (disk archiving target
directories). If any of these are shared between different
SAM-QFS servers, then running the recycler from one SAM-QFS
server will destroy the disk archive data that is being
managed by the other SAM-QFS server.
OPTIONS
The following options determine the volumes to be recycled
and the content of the recycler log file.
-c Displays the extrapolated capacity of each volume.
This is the volume's capacity assuming the compression
observed on the volume so far continues for the rest of
the volume. This option produces an additional line
for each volume with the heading Alpha:.
-C Suppresses listing of initial catalog(s).
-d Displays messages during the volume selection phase of
processing. These messages indicate why each volume
was, or was not, selected for recycling.
-E Specifies that the volume section of the recycler's log
file list only volumes that are not 100% free.
-n Prevents any actions from being taken. This option
causes /opt/SUNWsamfs/sbin/sam-recycler to behave as if
-recycle_ignore were specified in the
/etc/opt/SUNWsamfs/archiver.cmd file for all archive
sets.
-s Suppresses the listing of individual volumes in the
initial catalog section.
-v Displays information about which files are resident on
the volume that is marked for recycling. If no path
name can be calculated for the inode, it lists the
inode. These files are on volumes that are being
drained. Using this option can consume a lot of CPU
cycles.
-V Suppresses the volume section in the listing.
-x Displays messages for expired archive copies. These
are copies that are older than the time the volume upon
which the copies reside was labeled. Such copies
generate an error message when staged. The data for
those copies is irrecoverable. These archive copies
must be unarchived. If any such copies are discovered,
the recycler stops. This is the default behavior.
Also see the -X option.
-X Inhibits the messages that indicate the existance of
expired archive copies. Typically, if the recycler
detects expired archive copies, it stops. Use this
options if you want the recycler to continue in the
presence of expired archive copies. Also see the -x
option.
family_set | archive_set
Recycles only the named family_set or archive_set.
This is an optional argument. If a family_set is
specified, the library associated with the family set
is recycled. The family set is the fourth field in a
server's mcf file. If an archive_set is specified,
that archive set is recycled. The archive_set
specified must include the copy number, as stated in
the /etc/opt/SUNWsamfs/archiver.cmd file. For example,
arset.1.
If no family_set or archive_set name is specified, the
recycler recycles according to specifications in the
/etc/opt/SUNWsamfs/archiver.cmd and the
/etc/opt/SUNWsamfs/recycler.cmd files. It examines
each library and archive set specified.
Regardless of a specification, only archive sets and
family sets that have a current usage that is less than
the high-water mark are recycled.
OPERATION
The recycler splits its work into two phases: volume
selection and volume recycling.
Phase 1 - Volume Selection
The recycler selects volumes for recycling based
on the amount of space used by expired archive
copies as a percentage of total space on a volume.
For each library or archive set being recycled,
the volumes with the highest percentages of
expired copies are selected to bring the media
utilization in the library or archive set below
the configured high-water-mark. This assumes that
each volume selected would contribute at least
VSN-minimum-percent-gain percent of its total
space if it were recycled. If no such volumes
exist, the library or archive set cannot be
recycled. Ties in expired space are resolved by
selecting the volumes with the least amount of
unexpired space. For more information on setting
a high water mark, see the recycler.cmd(4) man
page.
A few conditions can prevent a volume from being
selected. A volume cannot be recycled if it
contains data associated with a removable media
file created by the request(1) command. In
addition, it cannot be recycled if it is listed in
the /etc/opt/SUNWsamfs/recycler.cmd file's
no_recycle section.
After volumes have been selected, they are
recycled.
Phase 2 - Volume Recycling
Volume recycling differs depending upon whether
the archive media is a disk volume or whether it
is a removable cartridge in a library. Archiving
to disk volumes is described first.
When a disk volume is selected for recycling, the
volume is not marked for recycling. Additional
archive copies can be written to it. Expired
archive copies on the disk volume are identified
and removed. Valid archive copies are left alone.
When a tape or magneto optical volume is selected
for recycling, the system prevents additional
archive copies from being written to it. If you
are recycling to cartridges in a library, all
files with active archive copies in volumes on the
cartridges are marked to be re-archived. The
archiver moves these copies to other volumes. In
subsequent runs, the recycler checks these volumes
and post-processes them when all valid archive
copies have been relocated.
The recycler checks to see if there are volumes
that were selected for recycling that have not yet
been post-processed. If such volumes exist, and
they are now devoid of active archive copies, the
sam-recycler command invokes the
/etc/opt/SUNWsamfs/scripts/recycler.sh(1M), which
post-processes these volumes with arguments
including the generic media type (tp or od), the
VSN, the element address in the library, and the
equipment number of the library in which the
volume resides. The script can relabel the
cartridge using either the original VSN or a new
VSN; or it can export the cartridge from the
library; or it can perform another user-defined
action.
The /etc/opt/SUNWsamfs/scripts/recycler.sh(1M)
script clears the recycling flag to indicate that
recycling has completed on the volume. The
odlabel(1M) and tplabel(1M) commands clear this
flag after the cartridge has been relabeled.
RECYCLER OUTPUT
The recycler log is divided into several sections.
The first section describes each library catalog and archive
set. The header contains the family set name or archive set
name and the vendor, product, and catalog path name. Then,
the capacity and remaining space for each volume appears, in
bytes, with suffixes k, M, G, and T representing kilobytes,
megabytes, gigabytes, and terabytes, respectively. In this
log file, a kilobyte=1024 bytes, a megabyte=1024*1024 bytes,
and so on. Then, a summary, containing the total capacity
and total space remaining is shown in bytes and as a
percentage of space used. The recycling parameters set in
the recycler and archiver command files are also shown.
The second section is a series of tables, one for each
library and archive set that has associated volumes. The
name of the library or archive set is shown just to the
right of the ----Percent---- label. A volume can be
associated with only one library or archive set. Attempts
to assign a volume to multiple archive sets are marked with
a in multiple sets label. The following fields are
displayed:
Field Name Meaning
Status A phrase giving the volume's recycle status,
as follows:
empty VSN The volume is empty of both
expired and current archive
images
full VSN The volume has no free space,
but it does have current
archive images.
in multiple sets
The volume matches multiple
archive sets in the
/etc/opt/SUNWsamfs/archiver.cmd
file.
new candidate The volume was chosen for
recycling during this recycler
run.
no-data VSN The volume contains only
expired archive images and
free space.
no_recycle VSN The volume is listed in the
no_recycle section of the
/etc/opt/SUNWsamfs/recycler.cmd
file.
archive -n files
The volume contains archive
images for files now marked as
archive -n.
old candidate The volume was already marked
for recycling before this
recycler run.
request files The volume contains archive
images for removeable media
files.
partially full The volume contains both
current archive images and
free space.
shelved VSN The volume is not currently
located in any library.
Archives Count The number of archive copies that are
contained on this volume.
Archives Bytes The number of bytes of archive copies
contained on this volume.
Percent Use The percentage of space in use on this volume
by current archive copies. It is estimated
by summing up the sizes of the archive copies
on the medium. Because of compression, this
value can overstate the amount of space
actually used by these images. This is the
amount of data that would need to be moved if
the volume were selected for recycling.
Percent Obsolete
The percentage of space used on this volume
for which no archive copies were found. This
is the space that can be reclaimed by
recycling this cartridge.
The Percent Obsolete value is calculated as
follows:
100% - In Use - Free
Because In Use can overstate the actual space
used (because of compression), the sum of In
use + Free can exceed 100%, which renders
Percent Obsolete to be a negative value.
Although aesthetically unpleasing, this does
not cause any problems in the operation of
the recycler.
Percent Free The percentage of free space remaining on
this volume. This value comes directly from
the library catalog. It gives the percent of
the volume's total capacity that is available
to hold new archive images.
For media that supports data compression, a best-guess value
of the average compression is calculated from the ratio of
the number of physical tape blocks consumed on the volume
(that is, the difference of capacity - space) to the logical
number of tape blocks written to the volume. The latter
value is kept in the catalog. This ratio is then used to
adjust the In Use value before it is written to the log
file.
The first volume to appear in the log file, for each library
or archive set, is the one most in need of recycling.
Here is an example recycler log file:
========== Recycler begins at Thu Feb 5 13:40:20 1998 ===========
3 catalogs:
0 Family: hy Path: /tmp/y
Vendor: SAM-FS Product: Historian
EA ty capacity space vsn
(no VSNs in this media changer)
Total Capacity: 0 bytes, Total Space Available: 0 bytes
Media utilization 0%, high 0% VSN_min 0%
1 Family: ad40 Path: /var/opt/SUNWsamfs/catalog/ad40
Vendor: ADIC Product: Scalar DLT 448
EA ty capacity space vsn
0 lt 19.2G 0 DLT3
1 lt 17.7G 17.6G DLT4N
5 lt 17.7G 17.6G DLT6
Total Capacity: 54.6G bytes, Total Space Available: 35.2G bytes
Media utilization 35%, high 75% VSN_min 50%
2 Family: arset0.1 Path: /etc/opt/SUNWsamfs/archiver.cmd
Vendor: SAM-FS Product: Archive set
EA ty capacity space vsn
0 lt 0 0 DLT5
1 lt 19.2G 0 DLT3
2 lt 0 0 DLT2
3 lt 17.7G 17.6G DLT4N
4 lt 17.7G 17.6G DLT6
Total Capacity: 54.6G bytes, Total Space Available: 35.2G bytes
Media utilization 35%, high 80% VSN_min 50%
Send mail to root when this archive set needs recycling.
6 VSNs:
---Archives--- -----Percent-----
-----Status----- Count Bytes Use Obsolete Free Library:Type:VSN
shelved VSN 677 648.9M :lt:DLT0
---Archives--- -----Percent----- arset0.1
-----Status----- Count Bytes Use Obsolete Free Library:Type:VSN
no-data VSN 0 0 0 100 0 ad40:lt:DLT3
empty VSN 0 0 0 0 0 (NULL):lt:DLT2
empty VSN 0 0 0 0 100 ad40:lt:DLT6
full VSN 4 32.1k 0 0 0 (NULL):lt:DLT5
partially full 4 40.8k 0 0 100 ad40:lt:DLT4N
Recycler finished.
========== Recycler ends at Thu Feb 5 13:40:41 1998 ===========
Here is the corresponding archiver.cmd file:
interval = 2m
no_archive .
fs = samfs1
arset0 testdir0
1 1s
2 1s
3 1s
4 1s
no_archive .
fs = samfs2
no_archive .
vsns
arset0.1 lt DLT3 DLT4N DLT6 DLT1
arset0.2 lt DLT3 DLT4N DLT6 DLT1
arset0.3 lt DLT3 DLT4N DLT6 DLT1
arset0.4 lt DLT3 DLT4N DLT6 DLT1
samfs1.1 lt DLT3
samfs2.1 lt DLT4N
endvsns
params
arset0.1 -drives 4 -recycle_hwm 80 -recycle_mingain 50
endparams
Here is the corresponding /etc/opt/SUNWsamfs/recycler.cmd
file:
logfile = /var/tmp/recycler.log
ad40 75 50
no_recycle mo ^OPT003
RECYCLING HISTORIAN CARTRIDGES
The recycler recycles volumes listed in the historian's
catalog. The volumes listed in the historian catalog have
been exported from a library or have been or are currently
in a manually-mounted device.
The /etc/opt/SUNWsamfs/scripts/recycler.sh(1M) script is
passed the name hy, signifying volumes that reside in the
historian catalog so that it can cope with the possibility
of the volumes being recycled residing in an off-site
storage facility. Typically, the
/etc/opt/SUNWsamfs/scripts/recycler.sh(1M) script sends
email to the administrator when this occurs to remind the
administrator to bring the off-site volume back on site so
that it can be reused. Volumes do not need to be on site to
be drained of archive copies unless such a volume contains
the only available archive copy of an off-line file.
RECYCLING BY ARCHIVE SET
When the recycler recycles by archive set, it treats each
archive set as a small library that holds just the volumes
assigned to the archive set in the
/etc/opt/SUNWsamfs/archiver.cmd file. The volumes that are
identified as belonging to a recycling archive set are
removed from the recycler's version of the catalog for the
library that physically contains the volume. Thus, only the
volumes that are not part of an archive set remain in the
library catalog.
To enable recycling for a given archive set, it must have
one of the recycling options specified in the
/etc/opt/SUNWsamfs/archiver.cmd file. For more information,
see the archiver.cmd(4) man page.
MESSAGES
Consider the following message:
Jan 22 10:17:17 jupiter sam-recycler[3400]: Cannot ioctl(F_IDSCF)
Cannot find pathname for filesystem /samfs1 inum/gen 406/25
The preceding message means that the recycler could not set
the rearchive flag for a file. When this happens, the
recycler typically emits a message containing the path name,
as follows:
Jan 22 10:17:17 jupiter sam-recycler[3400]: Cannot ioctl(F_IDSCF)
/samfs1/testfile
However, in the first message, you see text beginning with
Cannot find pathname.... This means that the recycler
failed in its attempt to convert the inode number (in the
preceding example message, it is inode number 406) and
generation number (here, 25) into a path name in the /samfs1
file system.
The most likely reason for this to occur is that the file
was deleted between the time that the recycler determined it
needed to be rearchived and the time the recycler actually
issued the system call to set the rearchive flag.
SEE ALSO
chmed(1M), odlabel(1M), recycler.sh(1M). sam-archiverd(1M),
tplabel(1M).
archiver.cmd(4), mcf(4), recycler.cmd(4).
Sun Microsystems Last change: 10 Jan 2007
Maintenance Commands sam-releaser(1M)
NAME
sam-releaser - Sun StorEdge SAM-FS and Sun SAM-QFS disk
space releaser process
SYNOPSIS
/opt/SUNWsamfs/sbin/sam-releaser file_system low_water_mark
weight_size [weight_age]
AVAILABILITY
SUNWsamfs
DESCRIPTION
The sam-releaser process controls the activities of the Sun
StorEdge SAM-FS and Sun SAM-QFS releaser. The releaser
makes disk cache available by identifying archived files and
releasing their disk cache copy. This process is started
automatically by the file system when disk cache utilization
reaches the high-water mark.
If the releaser command file is present in
/etc/opt/SUNWsamfs/releaser.cmd, the sam-releaser process
reads that file. Directives in the releaser.cmd file are
overridden by the equivalent command-line arguments, if
present. For more information on the releaser command file,
see the releaser.cmd(4) man page.
OPTIONS
This command accepts the following arguments:
file_system This is the file system whose disk space is to
be released. The argument may be either the
name of the file system, or its mount_point.
The releaser attempts to release the disk space
of archived files on the file system mounted on
the mount_point until low_water_mark is reached.
low_water_mark
A percentage of the file system that is allowed
to be completely occupied with files at all
times. Specify an integer number that is at
least 0 but no more than 100. The releaser
attempts to release disk space until the file
system is at or below this threshold.
weight_size A weighting factor that is used to prioritize
release candidates. Specify a floating-point
value that is at least 0.0 but no more than 1.0.
For more information on weight_size, see the
PRIORITY WEIGHTS section of this man page.
weight_age A weighting factor that is used to prioritize
release candidates. Specify a floating-point
value that is at least 0.0 but no more than 1.0.
For more information on weight_age, see the
PRIORITY WEIGHTS section of this man page.
ALGORITHM
The releaser reads the Sun StorEdge SAM-FS or Sun SAM-QFS
.inodes file and builds an ordered list of the files that
can be released. The position of each file on the list
depends on a priority calculated for each inode by the
releaser (see the PRIORITY WEIGHTS section of this man
page.) Only the top list_size (default 10,000) files are
kept on the list. See releaser.cmd(4) for a description of
list_size.
Starting with the file with the numerically largest prior-
ity, the disk space used by each file is released until the
low_water_mark has been reached. If the list is exhausted
before the low_water_mark is reached, the process is
repeated. If, while repeating the process, no files are
found that can be released, the releaser stops. If the file
system is still above high-water mark, the file system res-
tarts the releaser.
PRIORITY WEIGHTS
Each inode is assigned a priority based on its size and age.
The size of the file (expressed in units of 4-kilobyte
blocks) is multiplied by the weight_size parameter. This
result is added to the priority calculated for the age of
the file to form the file's final priority.
The releaser can use one of the following two methods for
determining the contribution of the age of a file to the
file's release priority:
o The first method is to take the most recent of the file's
access, modification, and residence-change age and multi-
ply by weight_age.
o The second method allows specification of weights for each
of the access, modification, and residence-change times.
These are specified by the weight_age_access=float,
weight_age_modify=float, and weight_age_residence=float
directives, respectively, in the releaser.cmd file. The
sum of the product of the weight and corresponding age is
the contribution of the age to the file's priority. To
specify any of these priority weights, you must use the
releaser.cmd file. For information on the releaser.cmd
file, see the releaser.cmd(4) man page.
For both methods, the ages are expressed in minutes.
LOG
Within the releaser.cmd file, you can specify a log file for
each Sun StorEdge SAM-FS or Sun SAM-QFS file system. If the
releaser.cmd file does not exist, or if no logfile=filename
directive exists in the file, no logging occurs. For more
information on the logfile=filename directive, see the
releaser.cmd(4) man page.
The releaser creates the log file (if it does not exist) and
appends the following to it for each run:
Releaser begins at Tue Sep 29 15:31:15 1998
inode pathname /sam1/.inodes
low-water mark 40%
list_size 10000
weight_size 1
weight_age 0.5
fs equipment ordinal 1
family-set name samfs1
started by sam-fsd? no
release files? no
release rearch files? yes
display_all_candidates? no
---before scan---
blocks_now_free: 117312
lwm_blocks: 233750
---scanning---
64122.5 (R: Tue Sep 29 11:33:21 CDT 1998) 237 min, 64004 blks S0 /sam1/250m
5131.5 (R: Tue Sep 22 17:39:47 CDT 1998) 9951 min, 156 blks S0 /sam1/filecq
5095.5 (R: Tue Sep 22 17:39:49 CDT 1998) 9951 min, 120 blks S0 /sam1/filecu
5062 (R: Tue Sep 22 18:38:50 CDT 1998) 9892 min, 116 blks S0 /sam1/filebz
5039.5 (R: Tue Sep 22 17:40:01 CDT 1998) 9951 min, 64 blks S0 /sam1/filedi
5036.5 (R: Tue Sep 22 17:37:34 CDT 1998) 9953 min, 60 blks S0 /sam1/fileio
5035.5 (R: Tue Sep 22 17:40:13 CDT 1998) 9951 min, 60 blks S0 /sam1/filedw
5032.5 (R: Tue Sep 22 17:38:08 CDT 1998) 9953 min, 56 blks S0 /sam1/filejq
5031.5 (R: Tue Sep 22 17:39:56 CDT 1998) 9951 min, 56 blks S0 /sam1/fileda
5024.5 (R: Tue Sep 22 17:38:00 CDT 1998) 9953 min, 48 blks S0 /sam1/filejh
5024 (R: Tue Sep 22 17:38:22 CDT 1998) 9952 min, 48 blks S0 /sam1/fileka
5023.5 (R: Tue Sep 22 17:40:07 CDT 1998) 9951 min, 48 blks S0 /sam1/filedn
5019 (R: Tue Sep 22 17:40:44 CDT 1998) 9950 min, 44 blks S0 /sam1/filefk
5015 (R: Tue Sep 22 17:40:28 CDT 1998) 9950 min, 40 blks S0 /sam1/fileep
5011.5 (R: Tue Sep 22 17:40:14 CDT 1998) 9951 min, 36 blks S0 /sam1/filedx
5011.5 (R: Tue Sep 22 17:39:58 CDT 1998) 9951 min, 36 blks S0 /sam1/filede
5011 (R: Tue Sep 22 17:41:07 CDT 1998) 9950 min, 36 blks S0 /sam1/filegk
5007.5 (R: Tue Sep 22 17:39:51 CDT 1998) 9951 min, 32 blks S0 /sam1/filecw
5007 (R: Tue Sep 22 17:41:10 CDT 1998) 9950 min, 32 blks S0 /sam1/filegr
5007 (R: Tue Sep 22 17:40:42 CDT 1998) 9950 min, 32 blks S0 /sam1/filefg
5007 (R: Tue Sep 22 17:40:30 CDT 1998) 9950 min, 32 blks S0 /sam1/filees
5004.5 (R: Tue Sep 22 17:38:14 CDT 1998) 9953 min, 28 blks S0 /sam1/filejv
5004 (R: Tue Sep 22 17:38:57 CDT 1998) 9952 min, 28 blks S0 /sam1/filelm
5002 (R: Tue Sep 22 18:38:54 CDT 1998) 9892 min, 56 blks S0 /sam1/filecd
4996.5 (R: Tue Sep 22 17:38:06 CDT 1998) 9953 min, 20 blks S0 /sam1/filejp
4995.5 (R: Tue Sep 22 17:39:57 CDT 1998) 9951 min, 20 blks S0 /sam1/filedc
4992.5 (R: Tue Sep 22 17:37:24 CDT 1998) 9953 min, 16 blks S0 /sam1/fileig
4992 (R: Tue Sep 22 17:39:06 CDT 1998) 9952 min, 16 blks S0 /sam1/filelv
4986 (R: Tue Sep 22 18:38:50 CDT 1998) 9892 min, 40 blks S0 /sam1/fileca
4982 (R: Tue Sep 22 17:36:54 CDT 1998) 9954 min, 5 blks S0 /sam1/filehk
4981 (R: Tue Sep 22 17:41:09 CDT 1998) 9950 min, 6 blks S0 /sam1/filegn
4980.5 (R: Tue Sep 22 17:40:15 CDT 1998) 9951 min, 5 blks S0 /sam1/filedz
---after scan---
blocks_now_free: 0
blocks_freed: 65452
lwm_blocks: 233750
archnodrop: 0
already_offline: 647
damaged: 0
extension_inode: 0
negative_age: 0
nodrop: 0
not_regular: 7
number_in_list: 32
rearch: 1
released_files: 32
too_new_residence_time: 0
too_small: 1
total_candidates: 32
total_inodes: 704
wrong_inode_number: 14
zero_arch_status: 3
zero_inode_number: 0
zero_mode: 0
CPU time: 0 seconds.
Elapsed time: 1 seconds.
Releaser ends at Tue Sep 29 15:31:16 1998
The first block of lines shows the arguments with which the
releaser was invoked, the name of the .inodes file, the
low-water mark, the size and age weight parameters, the
equipment ordinal of the file system, the family set name of
the file system, whether the releaser was started by sam-fsd
or by the command line, whether files should be released,
and whether each inode should be logged as encountered.
The second block of lines begins with the heading ---before
scan---. It shows the number of blocks currently free in
the cache and the number that would be free if the file sys-
tem were exactly at the low-water mark. The goal of the
releaser is to increase blocks_now_free so that it is equal
to or larger than lwm_blocks.
The third block of lines begins with the heading ---
scanning---. This block lists the files released by the
releaser and contains information for each file in separate
fields. The fields are as follows:
Field Number Content
1 This field contains the release priority.
2 This field contains the date and time in the
following format: (tag: date_and_time).
The tag is either A for access, M for modify,
or R for residency, depending on if the date
that follows represents the access, modify or
residency time.
The date_and_time is the most recent of the
three dates listed.
3 This field contains the age and size of the
file. The age of the file is expressed in
minutes. The size of the file is expressed
in blocks. These two figures are multiplied
by their respective weights and the sum taken
to yield the release priority.
4 This field contains an S followed by the seg-
ment number. This is the number of the seg-
ment that was released.
5 This field contains the full path name of the
released file.
Note that if the weight_age_access=float,
weight_age_modify=float or weight_age_residence=float direc-
tives are specified in the releaser.cmd file, these lines
show only the priority, size, and pathname.
The fourth block of lines begins with the heading ---after
scan---. This block shows the statistics accumulated by the
releaser during the previous scan pass are shown. These
statistics are as follows:
Statistic Meaning
archnodrop The number of inodes marked archnodrop.
These files are never released because
the archiver is trying to keep them in
cache.
already_offline The number of inodes that were offline.
damaged The number of inodes marked as damaged.
extension_inode The number of extension inodes found.
Used by volume overflow.
negative_age The number of inodes that had an age in
the future. This is usually caused by
personal computers with incorrect clock
settings acting as NFS clients.
nodrop The number of inodes marked with release
-n. For more information on marking
files as never release, see the
release(1) man page.
not_regular The number of inodes that were not regu-
lar files.
number_in_list The number of inodes that were on the
releaser's candidate list when the
releaser was finished scanning.
rearch The number of files with a copy marked
for rearchiving.
released_files The number of files released.
too_new_residence_time
The number of inodes whose residence-
change time was within minimum residence
age of the current time as specified on
the min_residence_age=time directive in
the releaser.cmd file.
too_small The number of files that were too small
to be released.
total_candidates The number of inodes found that were
viable candidates for releasing.
total_inodes The total number of inodes scanned.
wrong_inode_number The number of inodes whose inode number
did not match their offset in the inode
file. This is usually not a concern,
but you should run samfsck(1M) to rescue
any orphan inodes. If you have already
run samfsck(1M) and this field remains
nonzero, no further action is required.
For more information on the samfsck(1M)
command, see the samfsck(1M) man page.
zero_arch_status The number of inodes that had no archive
copies.
zero_inode_number The number of inodes that had zero as
their inode number.
zero_mode The number of inodes that were unused.
CPU time The number of CPU seconds used in the
current scan.
Elapsed time The number of wall-clock seconds used in
the current scan.
NOTES
When a file is created, the residency age is set to the
creation time. The residency age of a file must be at least
the value set by the min_residence_age=time directive before
the file is considered for release. This is to prevent a
file which was recently staged in from being released. The
default time is 10 minutes.
If the releaser selects a file as a release candidate, and
immediately thereafter the file is accessed, the file might
still be released by the file system even though the file
has been recently accessed. This can happen because the
file system only prohibits release of a file that is
currently in use. It does not check the access age of the
file again when it is released.
SEE ALSO
release(1).
mount_samfs(1M), samfsck(1M).
releaser.cmd(4).
Sun Microsystems Last change: 08 Nov 2004
Maintenance Commands sam-rftd(1M)
NAME
sam-rftd - Sun StorEdge SAM-FS and Sun SAM-QFS file transfer
server process (was sam-ftpd)
SYNOPSIS
/opt/SUNWsamfs/sbin/sam-rftd
AVAILABILITY
SUNWsamfs
DESCRIPTION
The sam-rftd process is the file transfer server process for
transferring Sun StorEdge SAM-FS or Sun StorEdge SAM-QFS
files to and from a remote network site. The sam-rftd
process is initiated by the sam-fsd daemon.
By default, the file transfer daemon uses the default
behaviors described on the rft.cmd(4) man page.
FILES
If the daemon's command file is present in
/etc/opt/SUNWsamfs/rft.cmd, the sam-rftd process reads that
file.
SEE ALSO
sam-fsd(1M).
rft.cmd(4).
Sun Microsystems Last change: 04 AUG 2003
Maintenance Commands sam-robotsd(1M)
NAME
sam-robotsd, sam-genericd, sam-stkd, sam-ibm3494d, sam-sonyd
- Sun StorEdge SAM-FS and Sun SAM-QFS media changer daemons
SYNOPSIS
/opt/SUNWsamfs/sbin/sam-robotsd mshmid pshmid
/opt/SUNWsamfs/sbin/sam-genericd mshmid pshmid equip
/opt/SUNWsamfs/sbin/sam-stkd mshmid pshmid equip
/opt/SUNWsamfs/sbin/sam-ibm3494d mshmid pshmid equip
/opt/SUNWsamfs/sbin/sam-sonyd mshmid pshmid equip
AVAILABILITY
SUNWsamfs
DESCRIPTION
The sam-robotsd daemon starts and monitors the execution of
the media changer library control daemons for Sun StorEdge
SAM-FS and Sun SAM-QFS. The sam-robotsd daemon is started
automatically by the sam-amld daemon if there are any
libraries defined in the mcf file. The sam-robotsd daemon
starts and monitors the correct daemon for all defined
libraries. For more information on the mcf file, see the
mcf(4) man page.
Each library daemon is responsible for monitoring the
preview table for the VSNs that are controlled by that
daemon. If a request is found for one of its VSNs, the
daemon finds an available drive under its control and moves
the cartridge into that drive. When the device is ready,
the daemon notifies the Sun StorEdge SAM-FS or Sun SAM-QFS
library daemon, and the device is assigned to the waiting
process.
The identifiers are as follows:
mshmid The identifier of the master shared memory segment
created by the sam-amld daemon.
pshmid The identifier of the preview shared memory
segment created by the sam-amld daemon.
equip The equipment number of the device.
The sam-genericd daemon controls libraries that conform to
the SCSI II standard for media changers, and it is the
daemon that controls the ADIC/Grau ABBA library through the
grauaci interface. For more information on this interface,
see the grauaci(7) man page. It also controls the Fujitsu
LMF library; see the fujitsulmf(7) man page.
The sam-stkd daemon controls StorageTek libraries through
the ACSAPI interface and is included in the Sun StorEdge
SAM-FS software package. For more information on this
interface, see the stk(7) man page.
The sam-ibm3494d daemon controls IBM 3494 tape libraries
through the lmcpd interface and is included in the Sun
StorEdge SAM-FS software package. For more information on
this interface, see the ibm3494(7) man page.
The sam-sonyd daemon controls Sony libraries through the
Sony DZC-800S PetaSite Application Interface Library and is
included in the Sun StorEdge SAM-FS software package. For
more information on this interface, see the sony(7) man
page.
FILES
mcf The master configuration file for Sun StorEdge
SAM-FS and Sun SAM-QFS environments.
SEE ALSO
sam-amld(1M).
mcf(4).
acl2640(7), acl452(7), fujitsulmf(7), grauaci(7),
ibm3494(7), ibm3584(7), sam-remote(7), sony(7), stk(7).
Sun Microsystems Last change: 04 Feb 2004
Maintenance Commands sam-rpcd(1M)
NAME
sam-rpcd - Sun StorEdge SAM-FS and Sun SAM-QFS RPC API
server process
SYNOPSIS
/opt/SUNWsamfs/sbin/sam-rpcd
AVAILABILITY
SUNWsamfs
DESCRIPTION
sam-rpcd is the RPC API (Application Programmer Interface)
server process. It is initiated by sam-amld.
sam-rpcd uses the RPC program number that is paired with the
RPC program name samfs. sam-rpcd must run on the same
machine as Sun StorEdge SAM-FS or Sun SAM-QFS file system.
You need to make the following entry in /etc/services on the
server:
samfs 5012/tcp # SAM-FS API
And in /etc/rpc on client and server:
samfs 150005
Make the equivalent changes in the NIS databases if you run
NIS.
SEE ALSO
sam_initrpc(3x)
Sun Microsystems Last change: 21 Feb 2003
Maintenance Commands sam-scannerd(1M)
NAME
sam-scannerd - Sun StorEdge SAM-FS and Sun SAM-QFS daemon
for manually-mounted devices
SYNOPSIS
/opt/SUNWsamfs/sbin/sam-scannerd mshmid pshmid
AVAILABILITY
SUNWsamfs
DESCRIPTION
sam-scannerd monitors the manually-mounted devices. It will
periodically check each device for newly inserted media. If
sam-scannerd finds media in the device, it will scan it for
a label. If a label is found, it will check the preview
table to see if there are any requests for this media. If
requests are found, the Sun StorEdge SAM-FS or Sun SAM-QFS
file system is notified and the device is assigned to the
request.
sam-scannerd is started automatically by sam-amld if there
are any manually-mounted devices defined in the configura-
tion file. See mcf(4).
mshmid is the id of the master shared memory segment created
by sam-amld. pshmid is the id of the preview shared memory
segment created by sam-amld.
SEE ALSO
sam-amld(1M), mcf(4)
Sun Microsystems Last change: 21 Feb 2003
Maintenance Commands sam-sharefsd(1M)
NAME
sam-sharefsd - Invokes the Sun StorEdge QFS or Sun SAM-QFS
shared file system daemon
SYNOPSIS
/opt/SUNWsamfs/sbin/sam-sharefsd
AVAILABILITY
SUNWsamfs
DESCRIPTION
The sam-sharefsd process establishes connection to the
current metadata server in a Sun QFS or Sun SAM-QFS shared
file system. The sam-sharefsd process on the metadata server
opens a listener socket on the port associated with this
file system. The shared file system port is defined in
/etc/services as samsock.fs_name.
The Sun StorEdge QFS and Sun SAM-QFS shared file system is a
distributed file system that can be mounted on Solaris host
systems.
The sam-sharefsd process is initiated by the sam-fsd daemon.
The sam-fsd daemon starts a shared file system daemon for
each configured shared file system.
FILES
Detailed trace information is written to the sam-sharefsd
trace file.
SEE ALSO
sam-fsd(1M).
sammkfs(1M).
samsharefs(1M).
Sun Microsystems Last change: 03 Jan 2002
Maintenance Commands sam-robotsd(1M)
NAME
sam-robotsd, sam-genericd, sam-stkd, sam-ibm3494d, sam-sonyd
- Sun StorEdge SAM-FS and Sun SAM-QFS media changer daemons
SYNOPSIS
/opt/SUNWsamfs/sbin/sam-robotsd mshmid pshmid
/opt/SUNWsamfs/sbin/sam-genericd mshmid pshmid equip
/opt/SUNWsamfs/sbin/sam-stkd mshmid pshmid equip
/opt/SUNWsamfs/sbin/sam-ibm3494d mshmid pshmid equip
/opt/SUNWsamfs/sbin/sam-sonyd mshmid pshmid equip
AVAILABILITY
SUNWsamfs
DESCRIPTION
The sam-robotsd daemon starts and monitors the execution of
the media changer library control daemons for Sun StorEdge
SAM-FS and Sun SAM-QFS. The sam-robotsd daemon is started
automatically by the sam-amld daemon if there are any
libraries defined in the mcf file. The sam-robotsd daemon
starts and monitors the correct daemon for all defined
libraries. For more information on the mcf file, see the
mcf(4) man page.
Each library daemon is responsible for monitoring the
preview table for the VSNs that are controlled by that
daemon. If a request is found for one of its VSNs, the
daemon finds an available drive under its control and moves
the cartridge into that drive. When the device is ready,
the daemon notifies the Sun StorEdge SAM-FS or Sun SAM-QFS
library daemon, and the device is assigned to the waiting
process.
The identifiers are as follows:
mshmid The identifier of the master shared memory segment
created by the sam-amld daemon.
pshmid The identifier of the preview shared memory
segment created by the sam-amld daemon.
equip The equipment number of the device.
The sam-genericd daemon controls libraries that conform to
the SCSI II standard for media changers, and it is the
daemon that controls the ADIC/Grau ABBA library through the
grauaci interface. For more information on this interface,
see the grauaci(7) man page. It also controls the Fujitsu
LMF library; see the fujitsulmf(7) man page.
The sam-stkd daemon controls StorageTek libraries through
the ACSAPI interface and is included in the Sun StorEdge
SAM-FS software package. For more information on this
interface, see the stk(7) man page.
The sam-ibm3494d daemon controls IBM 3494 tape libraries
through the lmcpd interface and is included in the Sun
StorEdge SAM-FS software package. For more information on
this interface, see the ibm3494(7) man page.
The sam-sonyd daemon controls Sony libraries through the
Sony DZC-800S PetaSite Application Interface Library and is
included in the Sun StorEdge SAM-FS software package. For
more information on this interface, see the sony(7) man
page.
FILES
mcf The master configuration file for Sun StorEdge
SAM-FS and Sun SAM-QFS environments.
SEE ALSO
sam-amld(1M).
mcf(4).
acl2640(7), acl452(7), fujitsulmf(7), grauaci(7),
ibm3494(7), ibm3584(7), sam-remote(7), sony(7), stk(7).
Sun Microsystems Last change: 04 Feb 2004
Maintenance Commands sam-stagealld(1M)
NAME
sam-stagealld - Sun StorEdge SAM-FS and Sun SAM-QFS associa-
tive staging daemon
SYNOPSIS
/opt/SUNWsamfs/sbin/sam-stagealld
AVAILABILITY
SUNWsamfs
DESCRIPTION
sam-stagealld is responsible for the associative staging
feature. It is initiated by sam-fsd. Associative staging
is activated when a regular file that has the associative
staging attribute set is staged. All files in the same
directory that have the associative staging attribute set
are staged. If a symbolic link has the associative staging
attribute set, the file pointed to by the symbolic link is
staged.
SEE ALSO
stage(1), sam-fsd(1M)
Sun Microsystems Last change: 21 Feb 2003
Maintenance Commands sam-stagerd(1M)
NAME
sam-stagerd - Invokes the Sun StorEdge SAM-FS or Sun SAM-QFS
stage daemon
SYNOPSIS
/opt/SUNWsamfs/sbin/sam-stagerd
AVAILABILITY
SUNWsamfs
DESCRIPTION
The sam-stagerd process stages files in a Sun StorEdge
SAM-FS or Sun SAM-QFS file system. Staging is the process
of copying a nearline or offline file from its archive
storage back to online storage.
The Sun StorEdge SAM-FS and Sun SAM-QFS file system staging
capability allows you to stage files immediately, to never
stage files, and specify other staging actions. The sam-
stagerd process is initiated by the sam-fsd daemon.
By default, the stager uses the default behaviors described
on the stager.cmd(4) man page.
OUTPUT FORMAT
The stager can produce a log file containing information
about files staged.
Here is an example:
E 2004/02/02 15:23:43 lt ST0004 d2.1 11228.7 10485760 /sam9/testa 1 124 sam root 0
F 2004/02/03 14:37:41 lt CFX598 5410.23 15339.5 15703 /sam9/rdump 1 hm129959 other root 42
Field Description
1 C for stage cancel.
E for error.
F for stage finish.
S for stage start.
2 Date of stage action.
3 Time of stage action.
4 Stage media.
5 VSN. For removable media cartridges, this is the volume serial name.
For disk archives, this is the disk volume name and tar file path.
6 Physical position of start of archive file on media and file offset
on the archive file / 512.
7 Inode number and generation number. The generation number is an additional
number used in addition to the inode number for uniqueness since inode
numbers get re-used.
8 Length of file if written on only 1 volume. Length of section if file
is written on multiple volumes.
9 Name of file.
10 Copy number being staged.
11 User name of the file's owner.
12 Group of the file's owner.
13 User name of the requestor of the stage.
14 Equipment ordinal from the mcf of the device on which the stage occurred.
FILES
If the stager command file is present in
/etc/opt/SUNWsamfs/stager.cmd, the sam-stagerd process reads
that file.
SEE ALSO
stage(1).
sam-fsd(1M).
stager.cmd(4).
Sun Microsystems Last change: 22 Mar 2004
Maintenance Commands sam-stagerd_copy(1M)
NAME
sam-stagerd_copy - Invokes the Sun StorEdge SAM-FS and Sun
SAM-QFS stage copy daemon
SYNOPSIS
/opt/SUNWsamfs/sbin/sam-stagerd_copy
AVAILABILITY
SUNWsamfs
DESCRIPTION
The sam-stagerd_copy process copies Sun StorEdge SAM-FS and
Sun SAM-QFS files from removable media cartridges. It is
executed by the sam-stagerd(1M) process.
SEE ALSO
sam-stagerd(1M)
Sun Microsystems Last change: 27 Feb 2001
Maintenance Commands sam-robotsd(1M)
NAME
sam-robotsd, sam-genericd, sam-stkd, sam-ibm3494d, sam-sonyd
- Sun StorEdge SAM-FS and Sun SAM-QFS media changer daemons
SYNOPSIS
/opt/SUNWsamfs/sbin/sam-robotsd mshmid pshmid
/opt/SUNWsamfs/sbin/sam-genericd mshmid pshmid equip
/opt/SUNWsamfs/sbin/sam-stkd mshmid pshmid equip
/opt/SUNWsamfs/sbin/sam-ibm3494d mshmid pshmid equip
/opt/SUNWsamfs/sbin/sam-sonyd mshmid pshmid equip
AVAILABILITY
SUNWsamfs
DESCRIPTION
The sam-robotsd daemon starts and monitors the execution of
the media changer library control daemons for Sun StorEdge
SAM-FS and Sun SAM-QFS. The sam-robotsd daemon is started
automatically by the sam-amld daemon if there are any
libraries defined in the mcf file. The sam-robotsd daemon
starts and monitors the correct daemon for all defined
libraries. For more information on the mcf file, see the
mcf(4) man page.
Each library daemon is responsible for monitoring the
preview table for the VSNs that are controlled by that
daemon. If a request is found for one of its VSNs, the
daemon finds an available drive under its control and moves
the cartridge into that drive. When the device is ready,
the daemon notifies the Sun StorEdge SAM-FS or Sun SAM-QFS
library daemon, and the device is assigned to the waiting
process.
The identifiers are as follows:
mshmid The identifier of the master shared memory segment
created by the sam-amld daemon.
pshmid The identifier of the preview shared memory
segment created by the sam-amld daemon.
equip The equipment number of the device.
The sam-genericd daemon controls libraries that conform to
the SCSI II standard for media changers, and it is the
daemon that controls the ADIC/Grau ABBA library through the
grauaci interface. For more information on this interface,
see the grauaci(7) man page. It also controls the Fujitsu
LMF library; see the fujitsulmf(7) man page.
The sam-stkd daemon controls StorageTek libraries through
the ACSAPI interface and is included in the Sun StorEdge
SAM-FS software package. For more information on this
interface, see the stk(7) man page.
The sam-ibm3494d daemon controls IBM 3494 tape libraries
through the lmcpd interface and is included in the Sun
StorEdge SAM-FS software package. For more information on
this interface, see the ibm3494(7) man page.
The sam-sonyd daemon controls Sony libraries through the
Sony DZC-800S PetaSite Application Interface Library and is
included in the Sun StorEdge SAM-FS software package. For
more information on this interface, see the sony(7) man
page.
FILES
mcf The master configuration file for Sun StorEdge
SAM-FS and Sun SAM-QFS environments.
SEE ALSO
sam-amld(1M).
mcf(4).
acl2640(7), acl452(7), fujitsulmf(7), grauaci(7),
ibm3494(7), ibm3584(7), sam-remote(7), sony(7), stk(7).
Sun Microsystems Last change: 04 Feb 2004
Maintenance Commands sambcheck(1M)
NAME
sambcheck - Lists block use for a Sun StorEdge QFS, Sun
StorEdge SAM-FS, or Sun SAM-QFS file system
SYNOPSIS
sambcheck fs_name block_num[.ord] [block_num[.ord]] ...
AVAILABILITY
SUNWqfs
SUNWsamfs
DESCRIPTION
The sambcheck command determines the current usage of each
requested block_num in a Sun StorEdge QFS, Sun StorEdge
SAM-FS, or Sun SAM-QFS file system. This command must be
run as root. For accurate results, the file system should
be unmounted.
This command accepts the following arguments:
fsname The family set name, as specified in the mcf file,
for the file system for which the usage list is
desired.
block_num A number that identifies the blocks for which
statistics should be obtained. Blocks are in
1024-byte (1 kilobyte) units. Use one of the
following formats:
o Decimal. Default.
o Octal. The block_num must be preceded by 0.
o Hexadecimal. The block_num must be preceded by
0x or 0X.
ord The partition number (ordinal) upon which the
block use is to be found. If no .ord is
specified, all partitions are examined. All ord
specifications are assumed to be in decimal.
OUTPUT
The output from this command is one line per requested block
number for each explicit or implicit ordinal. The block
number is displayed as entered, followed by its decimal form
in parentheses, followed by text indicating the usage
determined for the block_num[.ord].
EXAMPLES
bilbo# sambcheck samfs1 0x40 0x42.0 0x42.2 0x7a150 0x89cd0.01 512
block 0x40 (64.0) is a data block for .inodes containing 1 - 32
block 0x40 (64.1) is a data block for directory inode 26.1
block 0x40 (64.2) is a data block for inode 934767.1
block 0x40 (64.4) is a data block for inode 934766.1
block 0x42.0 (66.0) is a data block for .inodes containing 1 - 32
block 0x42.2 (66.2) is a free data block
block 0x7a150 (500048.0) is a data block for .inodes containing 999969 - 1000000
block 0x7a150 (500048.1) is a data block for directory inode 787628.1
block 0x7a150 (500048.2) is a data block for inode 934767.1
block 0x7a150 (500048.4) is a free data block
block 0x89cd0.01 (564432.1) is an indirect block for inode 934767.1
block 512 (512.0) is a data block for .inodes containing 897 - 928
block 512 (512.1) is a data block for directory inode 65.1
block 512 (512.2) is a data block for inode 934767.1
block 512 (512.4) is a data block for inode 934766.1
Sun Microsystems Last change: 21 Mar 2001
User Commands samchaid(1)
NAME
samchaid - change file admin set ID attribute
SYNOPSIS
samchaid [ -fhR ] aid filename...
AVAILABILITY
SUNWsamfs
SUNWqfs
DESCRIPTION
samchaid sets the admin set ID attribute of files and direc-
tories.
If a directory's admin set ID is set, files and directories
subsequently created in that directory inherit that admin
ID. Only the superuser may set the admin ID.
OPTIONS
-f Force. Do not report errors.
-h If the file is a symbolic link, change the admin set ID
of the symbolic link. Without this option, the group
of the file referenced by the symbolic link is changed.
-R Recursive. samchaid descends through any directories
and subdirectories, setting the specified admin set ID
as it proceeds. When a symbolic link is encountered,
the admin set ID of the target file is changed (unless
the -h option is specified), but no recursion takes
place.
SEE ALSO
samquota(1), sls(1)
Sun Microsystems Last change: 19 Oct 2001
Maintenance Commands samcmd(1M)
NAME
samcmd - Executes Sun StorEdge SAM-FS and Sun SAM-QFS opera-
tor utility commands
SYNOPSIS
samcmd command
AVAILABILITY
SUNWqfs
SUNWsamfs
DESCRIPTION
samcmd executes a single Sun StorEdge SAM-FS or Sun SAM-QFS
operator utility command. Its purpose is to provide shell
script access to the commands and displays available in
samu(1M).
samcmd uses the first argument as the samu command or
display name. Succeeding arguments are the arguments for
that samu command.
COMMANDS
The syntax for the commands is identical to that shown in
the COMMANDS section of samu(1M). Note that the colon (:)
hot key is not required for samcmd to distinguish commands
from displays.
DISPLAYS
samcmd can produce displays on standard output similar to
those displayed by samu. While for samu the information is
paged to display a screen at a time if there is more than
one screen of information available, samcmd produces the
entire amount of information for a given display. Hence
there is no need for equivalents of the control-f, control-
b, control-d, and control-u hotkeys. Note that the format-
ting of the information may be slightly different on the
samcmd output file than on the samu display. Since the for-
mat of the display control (single letter) commands can be
modified by other hotkeys under samu, some equivalents are
provided for samcmd as follows:
Display Arguments
a filesystem
n mediatype
p mediatype
r mediatype
u mediatype [path]
v eq [sort] [I | I I]
w mediatype [path]
The sort selections for the v display are: 1 slot, 2 count,
3 usage, 4 VSN, 5 access time, 6 barcode, 7 label time.
Specifying a single I for the v display shows a two-line
display with the barcode, blocksize, etc. in the second
line. Specifying two I's for the v display shows a two-line
display with the archiver volume reservation information in
the second line.
EXAMPLES
The following example loads a cartridge from slot 2 in
automated library 30:
samcmd load 30:2
The following example produces a detailed archiver display
for filesystem samfs3 on standard output:
samcmd a samfs3
The following example produces a display, on standard out-
put, of the staging queue restricted to stages from media
type "lt", showing the full paths of the files to be staged.
samcmd u lt path
The following example produces a display of automated
library 50's catalog, with the archiver volume reservation
information, on standard output:
samcmd v 50 I I
SEE ALSO
samu(1M)
Sun Microsystems Last change: 19 Feb 2002
Maintenance Commands samd(1M)
NAME
samd - SAM daemon management and configuration command
SYNOPSIS
/opt/SUNWsamfs/sbin/samd buildmcf
/opt/SUNWsamfs/sbin/samd config
/opt/SUNWsamfs/sbin/samd start
/opt/SUNWsamfs/sbin/samd stop
/opt/SUNWsamfs/sbin/samd hastop
AVAILABILITY
SUNWqfs
SUNWsamfs
DESCRIPTION
The samd utility starts up or shuts down the sam-amld
daemon, or shuts down the HSM daemons for HA-SAM failover.
This utility can also be used to reinitialize the Sun
StorEdge QFS, Sun StorEdge SAM-FS, and Sun SAM-QFS
configuration files and allow changes to take effect.
OPTIONS
This command accepts the following options:
buildmcf Creates a new /etc/opt/SUNWsamfs/mcf file if one
does not exist. This is useful when configuring
shared clients for the first time, after the file
systems have been created on the metadata server.
Only disk devices will be discovered and entered
into the mcf.
config Causes the sam-fsd daemon to (re)configure based
on changes to the /etc/opt/SUNWsamfs/mcf,
/etc/opt/SUNWsamfs/archiver.cmd, and
/etc/opt/SUNWsamfs/defaults.conf files.
start Starts up the sam-amld daemon if the
/etc/opt/SUNWsamfs/mcf file exists and the
sam-amld daemon is not already running.
Implemented only in Sun StorEdge SAM-FS and Sun
SAM-QFS environments. Not a valid argument in a
Sun StorEdge QFS environment.
stop Kills the sam-amld daemon. Implemented only in
Sun StorEdge SAM-FS and Sun SAM-QFS environments.
Not a valid argument in a Sun StorEdge QFS
environment.
hastop Kills the sam-archiverd, sam-stagealld,
sam-stagerd and sam-amld daemon for HA-SAM
failover. Daemons killed by 'hastop' will not be
restarted by the sam-fsd. Implemented only in Sun
StorEdge SAM-FS and Sun SAM-QFS environments. Not
a valid argument in a Sun StorEdge QFS
environment.
SEE ALSO
sam-fsd(1M), sam-amld(1M).
defaults.conf(4), mcf(4).
Sun Microsystems Last change: 02 Aug 2007
Maintenance Commands samexplorer(1M)
NAME
samexplorer - Generates a Sun StorEdge QFS or Sun StorEdge
SAM-FS diagnostic report
SYNOPSIS
samexplorer [-u] [report_name] [num_lines]
AVAILABILITY
SUNWqfs
SUNWsamfs
DESCRIPTION
The samexplorer command produces a diagnostic report of the
Sun StorEdge QFS or Sun StorEdge SAM-FS server configuration
and collects log information.
The samexplorer command should be run as root. The command
generates a diagnostic report by default in file:
/tmp/SAMreport.hostname.YYYYMMDD.HHMMZ.tar.gz
The report should be sent to your Sun Microsystems
authorized service provider or to Sun Microsystems technical
support as specified in your maintenance contract.
OPTIONS
This command accepts the following options:
[-u] Generate separate output files in an
unarchived/uncompressed format.
report_name The name of the diagnostic report file. The
default is
/tmp/SAMreport.hostname.YYYYMMDD.HHMMZ.tar.gz
num_lines The number of lines to capture from each log
file. The default is 1000.
EXAMPLE
sunfire# samexplorer
Report name: /tmp/SAMreport.sunfire.20060530.1247CDT.tar.gz
Lines per file: 1000
Output format: tar.gz (default) Use -u for unarchived/uncompressed.
Please wait.............................................
Please wait.............................................
Please wait......................................
The following files should now be ftp'ed to your support provider
as ftp type binary.
/tmp/SAMreport.sunfire.20060530.1247CDT.tar.gz
sunfire# samexplorer -u
Report name: /tmp/SAMreport.sunfire.20060530.1252CDT
Lines per file: 1000
Output format: unarchived/uncompressed
Please wait.............................................
Please wait.............................................
Please wait......................................
The following files should now be ftp'ed to your support provider
as ftp type binary.
/tmp/SAMreport.sunfire.20060530.1252CDT
/tmp/SAMreport.sunfire.20060530.1252CDT.fsmgr_text
/tmp/SAMreport.sunfire.20060530.1252CDT.dmpshm_data
/tmp/SAMreport.sunfire.20060530.1252CDT.samtrace_text
/tmp/SAMreport.sunfire.20060530.1252CDT.showqueue_text
/tmp/SAMreport.sunfire.20060530.1252CDT.archiver_data.tar
/tmp/SAMreport.sunfire.20060530.1252CDT.stager_data.tar
Sun Microsystems Last change: 05 June 2006
Maintenance Commands export(1M)
NAME
export, samexport - Export a cartridge from a robot
SYNOPSIS
/opt/SUNWsamfs/sbin/export [-f] eq:slot
/opt/SUNWsamfs/sbin/export [-f] mediatype.vsn
/opt/SUNWsamfs/sbin/samexport [-f] eq:slot
/opt/SUNWsamfs/sbin/samexport [-f] mediatype.vsn
AVAILABILITY
SUNWsamfs
DESCRIPTION
export sends a request to the library specified by eq to
place the specified cartridge in the mail-slot of the
library. For the form mediatype.vsn, eq and slot are deter-
mined from the catalog entry. All other volumes on the car-
tridge are also exported.
OPTIONS
-f The -f option is used for network-attached StorageTek
automated libraries only. The -f option will cause the
volume specified to be exported to the CAP (Cartridge
Access Port) and the SAM-FS or SAM-QFS catalog updated
accordingly.
For the network-controlled libraries such as the GRAU using
the GRAU ACI interface, IBM 3494, or STK libraries using
ACSLS and not specifying the -f option, this utility only
removes the catalog entry for the cartridge from the cata-
log. Physical removal and addition of cartridges within
these libraries is performed by utilities supplied by GRAU,
IBM, and STK.
Volumes on cartridges exported from a library will be
tracked in the historian(7). The historian acts as a vir-
tual library. Volumes on cartridges that have been exported
from a library will, by default, be considered available for
archiving and staging activities. Operator intervention is
required to provide access to exported cartridges to satisfy
load requests.
See the historian(7) man page for details about the his-
torian and for the default settings that control access to
exported cartridges.
Note: A cartridge may be exported from the historian. The
information about volumes on this cartridge will be lost.
The export and samexport commands are identical; the samex-
port name is provided to avoid a conflict with the Bourne
shell intrinsic of the same name.
FILES
mcf The configuration file for Sun StorEdge
SAM-FS and Sun SAM-QFS environments
SEE ALSO
import(1M), build_cat(1M), dump_cat(1M), sam-robotsd(1M),
mcf(4), stk(7), historian(7)
Sun Microsystems Last change: 29 Jun 2000
Maintenance Commands samfsck(1M)
NAME
samfsck - Checks and repairs a Sun StorEdge SAM-FS or Sun
SAM-QFS file system
SYNOPSIS
samfsck [ -s scratch_dir ] [ -F [ -R ] ] [ -G ] [ -S ] [ -U
] [ -V ] [ -p ] fs_name
AVAILABILITY
SUNWsamfs
DESCRIPTION
The samfsck command checks and optionally repairs a Sun
StorEdge QFS or Sun StorEdge SAM-FS file system from the
disk partitions that belong to fs_name. For fs_name, specify
either a family set name from the mcf file or a mount point
absolute path name from the /etc/vfstab file. One or more
disk partitions are specified in the mcf file. If no
options are specified, samfsck checks and reports, but does
not repair, all the blocks that belong to inodes and lists
inodes which have duplicate blocks. samfsck also checks
inodes which have blocks that are free blocks. If only one
inode is listed in the duplicate list, that inode contains a
block that is also free. To repair the file system, the
file system must be unmounted, and the -F option specified.
If there are files encountered that are not attached to a
parent directory, they will be moved to the
/mount_point/lost+found directory. If this directory does
not exist, you must create this directory first and make it
sufficently large to hold the expected number of discon-
nected files if you wish this to happen. Here is how to do
this in the Bourne shell for a SAM file system mounted on
/sam:
/bin/mkdir /sam/lost+found
cd /sam/lost+found
N=0
while [ $N -lt 1024 ]; do
touch TMPFILE$N
N=`expr $N + 1`
done
rm TMPFILE*
OPTIONS
-s scratch_dir
Specifies the scratch directory. If specified, this
directory is used for the scratch files that are used.
The default scratch directory is /tmp.
-F Check and repair the file system. For all inodes that
have duplicate blocks, mark those inodes offline if
they have been archived. If the file system is not
unmounted samfsck will exit with an error.
-G Generate directory entry hash. In SAM-FS 3.5.0 and
above, a hash code was added to directory entries to
speed up directory searches. This is particularly use-
ful for longer file names. The -G option, when used in
conjunction with the -F option, will modify directory
entries which do not have a proper hash value to have a
hash. When the -G option is used without the -F option,
the number of directory entries which could be hashed
is reported. The presence of a hash value has no
effect on versions of SAM-FS prior to 3.5.0.
-S Convert the filesystem from a non-shared filesystem to
a shared filesystem. This option is only available to
filesystems with a version 2 superblock. The -F option
must also be specified to convert a filesystem. This
will cause samfsck to update the on-disk structures to
make the filesystem shared. Note that samfsck does not
update the /etc/vfstab entry (see vfstab(4)), the mcf
entry (see mcf(4)), or the shared hosts file (see
samsharefs(1M)) for the filesystem, nor does it config-
ure the services file (see services(4)) for shared SAM
operations. These must be configured and updated after
the filesystem is converted to mount the filesystem.
-U Convert the filesystem from a shared filesystem to a
non-shared filesystem. The -F option must also be
specified to convert a filesystem. The on-disk struc-
tures of the filesystem are updated to make the
filesystem non-shared. Note that samfsck does not
update the /etc/vfstab entry (see vfstab(4)), or the
mcf entry (see mcf(4)). These must be configured and
updated after the filesystem is converted to mount the
filesystem.
-V Turns on a verbose display of DEBUG information. This
information is useful to Sun Microsystems analysts.
-R Rename the file system. When specified along with the
-F option, the -R option will rewrite the super block
with the disk cache family set name found in
/etc/opt/SUNWsamfs/mcf. No action will be taken if the
-R option is used without the -F option. It is impor-
tant that sam-fsd be notified after any change to
/etc/opt/SUNWsamfs/mcf (see samd(1M)).
-p Return an indication of the filesystem's health. Non-
zero return indicates that the filesystem should not be
mounted without first using samfsck to check and repair
the filesystem (see EXIT STATUS). A zero return value
indicates that the filesystem can be mounted immedi-
ately.
EXIT STATUS
The following exit values are returned:
0 The filesystem is consistent.
4 Nonfatal: Filesystem block counts need to be
reconciled.
5 Nonfatal: Filesystem blocks can be reclaimed.
10 Nonfatal: Orphan inodes can be moved to
lost+found.
20 Fatal: invalid directory blocks exist, overlapping
blocks mapped to 2 inodes exist. Files/directories
will be marked offline if an archive copy exists
or damaged if no archive copy exists.
30 Fatal: I/O Errors occurred, but samfsck kept pro-
cessing. Filesystem is not consistent.
35 Fatal: Argument errors terminated samfsck.
36 Fatal: Malloc errors terminated samfsck.
37 Fatal: Device errors terminated samfsck.
40 Fatal: Filesystem superblock is invalid.
45 Fatal: Filesystem .inodes file is invalid.
50 Fatal: I/O Errors terminated samfsck.
55 Nonfatal: The -p option was specified, and the
filesystem should be checked and repaired prior to
mounting.
FILES
/etc/opt/SUNWsamfs/mcf
The configuration file for samfs
/etc/vfstab File system defaults table
SEE ALSO
samd(1M). samsharefs(1M).
mcf(4), services(4), vfstab(4).
Sun Microsystems Last change: 05 May 2004
Maintenance Commands samfsconfig(1M)
NAME
samfsconfig - Recovers configuration information
SYNOPSIS
/opt/SUNWsamfs/sbin/samfsconfig [-b] [-d] [-h] [-s] [-v]
device [device] ...
AVAILABILITY
SUNWqfs
SUNWsamfs
DESCRIPTION
The samfsconfig utility opens the device(s) listed on the
command line, attempts to read the Sun StorEdge QFS file
system superblock on each, and generates output in a format
similar to an editable mcf(4) file. A Sun StorEdge QFS file
system superblock is a record that the sammkfs(1M) utility
writes to the beginning of every device in a Sun StorEdge
QFS file system. This record identifies the devices to the
file system.
By default, the output is written to stdout, but the output
can be redirected to a file and edited to regenerate the
file system portions of the mcf file in the event of a
system reconfiguration or disaster.
OPTIONS
This command accepts the following options:
-b Lists the size of the associated partition,
according to its superblock, in an extra output
column. This may be useful when multiple disk
partitions of different sizes start at the same
offset.
-d Generates detailed information about all the Sun
StorEdge QFS superblocks found, including the
content of each superblock.
-h Generates a usage message and exits.
-s Print the host file contents of QFS shared
filesystems.
-v Generates messages regarding the disposition of
each device.
device One or more device identifiers from which
configuration information is to be recovered. Use
a space character to separate multiple device
identifiers on the command line.
It can be desireable to save a list of device
identifiers to a file and use this file for
command line input to the program.
The samfsconfig utility generates information about all the
Sun StorEdge QFS file systems and file system components it
finds. It flags irregularities as follows:
o It prefixes any incomplete file system components with a
pound sign (#) to indicate problems.
o It prefixes any duplicate devices discovered with a
greater-than sign (>). This is common if, for instance,
multiple paths exist or whole disk partitions are
specified on the command line.
EXAMPLES
Example 1.
ceres# samfsconfig /dev/dsk/*
#
# Family Set 'samfs2' Created Thu Jun 29 11:55:45 2000
#
# Missing slices
# Ordinal 3
# /dev/dsk/c3t0d0s5 44 md samfs2 -
# Ordinal 4
# /dev/dsk/c3t0d0s6 45 md samfs2 -
# Ordinal 6
# /dev/dsk/c3t1d0s5 47 md samfs2 -
# Ordinal 7
# /dev/dsk/c3t1d0s6 48 md samfs2 -
Example 2. Another example, this from a saved list of
devices:
ceres# samfsconfig -v `cat /tmp/dev_files`
Device '/dev/dsk/c1t0d0s0' has a QFS superblock.
Device '/dev/dsk/c1t0d0s1' has a QFS superblock.
Couldn't open '/dev/dsk/c1t0d0s3'; errno=5.
Device '/dev/dsk/c1t2d0s0' has a QFS superblock.
Device '/dev/dsk/c1t2d0s1' has a QFS superblock.
Device '/dev/dsk/c1t4d0s0' has a QFS superblock.
Device '/dev/dsk/c1t4d0s1' has a QFS superblock.
Couldn't open '/dev/dsk/c1t4d0s3'; errno=5.
Couldn't open '/dev/dsk/c1t4d0s4'; errno=5.
Couldn't open '/dev/dsk/c1t4d0s5'; errno=5.
Device '/dev/dsk/c2t7d0s0' has a QFS superblock.
Device '/dev/dsk/c2t7d0s6' has a QFS superblock.
Device '/dev/dsk/c3t0d0s3' has a QFS superblock.
9 QFS devices found.
#
# Family Set 'samfs1' Created Tue Aug 1 16:57:24 2000
#
# Missing slices
# Ordinal 2
# /dev/dsk/c1t4d0s1 23 mr samfs1 -
#
# Family Set 'qfs1' Created Thu Aug 10 19:04:56 2000
#
# Missing slices
# Ordinal 0
# /dev/dsk/c1t4d0s0 11 mm qfs1 -
#
# Family Set 'samfs1' Created Wed Feb 21 20:21:04 2001
#
samfs1 ma 10 samfs1
/dev/dsk/c2t7d0s0 11 mm samfs1 -
/dev/dsk/c2t7d0s6 12 mr samfs1 -
#
# Family Set 'qfs1' Created Thu Feb 22 12:49:10 2001
#
qfs1 ma 20 qfs1
/dev/dsk/c3t0d0s3 21 mm qfs1 -
/dev/dsk/c1t0d0s0 24 g0 qfs1 -
/dev/dsk/c1t0d0s1 25 g0 qfs1 -
/dev/dsk/c1t2d0s0 26 g2 qfs1 -
/dev/dsk/c1t2d0s1 27 g2 qfs1 -
SEE ALSO
sammkfs(1M)
mcf(4)
Sun Microsystems Last change: 27 Apr 2005
Maintenance Commands samfsdump(1M)
NAME
samfsdump, samfsrestore - Dumps or restores SAM-QFS file
control structure data
SYNOPSIS
samfsdump [-b bl_factor] [-d] -f dump_file [-n] [-q] [-P]
[-u]
[-U] [-v] [-B size] [-H] [-I include_file] [-T] [-W]
[-X excluded_dir] [file ...]
samfsrestore [-b bl_factor] [-d] -f dump_file [-g log_file]
[-i] [-l] [-r] [-s] [-t] [-v] [-B size] [-H] [-R] [-T] [-2]
[file ...]
AVAILABILITY
SUNWsamfs
DESCRIPTION
The samfsdump command creates a dump file containing control
structure information for each specified file. This command
must be entered after you have used the cd(1) command to
change to the mount point of a SAM-QFS file system.
The samfsdump command creates a dump file, as follows:
o If nothing is specified for file, the samfsdump command
creates a dump file containing the control structures for
every file in the current directory and also for every
file in the current directory's subdirectories.
o If an individual file is specified for file, the samfsdump
command creates a dump file containing the control
structures for that individual file.
o If a directory is specified for file, the samfsdump
command creates a dump file containing the control
structures for every file in that directory and also for
every file in that directory's subdirectories.
Any file specified with an absolute path is stored in the
dump file with an absolute path. Any file specified with a
relative path is stored in the dump file with its relative
path.
The samfsrestore command uses the contents of the dump file
to restore control structures for all the files in the dump
file or for each specified file. If a file is specified,
its path and file name must match exactly what exists in the
dump file. By default, all files are restored to the
absolute or relative location as each file is described in
the dump file. If the -s option is specified, however, all
file names with an absolute path in the dump file are
restored relative to the current directory, using the entire
path as contained in the dump file.
The samfsdump command does not create a dump of any data
associated with the files (unless the -P, -u or -U options
are specified), so no data can be restored from this dump
file. It is assumed that the data associated with the
dumped files has been archived in some way. If a file for
which no archive copy is available is dumped, a warning
message is issued noting that this file will be marked as
damaged when restored. When that file is restored from the
dump file, it is marked as damaged by samfsrestore. Note
that this warning can be explicitly suppressed by using the
-q option.
You must be logged in as superuser (root) in order to
execute the samfsdump and samfsrestore commands. Sun
Microsystems recommends that a site create samfsdump dumps
on a periodic basis as part of a disaster recovery plan.
OPTIONS
This command accepts the following options:
-b bl_factor
Specifies a blocking factor in units of 512 bytes.
When specified, all I/O to the dump image file is
done in multiples of the blocking factor. There
is no blocking done by default.
-d Enables debugging messages. This option is useful
only to Sun Microsystems and is used to trace
execution for verification purposes.
-f dump_file
Names the file to which the control structure data
dump is written to (by samfsdump) or read from (by
samfsrestore). You must specify a dump_file.
If a dash character (-) is specified for the
dump_file, samfsdump writes the dump file to
stdout and samfsrestore reads the dump file from
stdin.
The dump file data can be passed through
appropriate filters, such as compression or
encryption, after being written by samfsdump or
before being read by samfsrestore.
-g log_file
(samfsrestore only) Generates a file of online
directories and files. For information on the
format of this file, see the NOTES section of this
man page.
-i (samfsrestore only) Prints the inode numbers of
the files when listing the contents of the dump.
For more listing options, see -l, -t, and -2
options.
-I include_file
(samfsdump only) Takes the list of files to dump
from include_file. This file has one relative or
absolute path to be dumped per line. After
processing include_file, any [file] arguments from
the command line are processed.
-l (samfsrestore only) Prints one line per file.
This option is similar to the sls(1M) command's -l
option when listing the dump contents. Note that
this option is identified by the lowercase letter
`l', not a number '1'. For more listing options,
see the -i, -t, and -2 options.
-n (samfsdump only) Forces the samfsdump file to use
the newest header format available. The new
header is incompatible with samfsrestore prior to
the 3.5.0 release level. Using the -u or -U
arguments automatically enables the -n argument.
-P (samfsdump only) Dumps the online data portions of
files which are offline, but have partial data
online. This option can considerably increase the
size of the dump file, as data and metadata are
both being dumped. You must take care to manage
the increased size of the dump. This option can
be used to move file partial data by piping the
output of samfsdump to the input of samfsrestore.
-q (samfsdump only) Suppresses warning messages for
damaged files. By default, samfsdump writes
warning messages for each file that would be
considered damaged if the dump were restored.
-r (samfsrestore only) Replaces existing files when
restoring control structures if the existing files
have an older modification time than the dumped
files.
-s (samfsrestore only) Removes leading slashes from
file names prior to restoring them. This is
useful if the dump was made with an absolute path
name and the dump is being restored to a different
location. Any directories required for the
restoration and not defined in the dump file are
automatically created.
-t (samfsrestore only) Lists the content of the dump
file rather than restoring the dump. For more
listing options, see the -i, -l, and -2 options.
-u (samfsdump only) Dumps the data portions of files
without at least one archive copy. This option
can considerably increase the size of the dump
file, as data and metadata are both being dumped.
You must take care to manage the increased size of
the dump.
-U (samfsdump only) Dumps the data portions of files
which are online. This option can considerably
increase the size of the dump file, as data and
metadata are both being dumped. If this option is
used with segmented files, the archive copy
information is not preserved when the file is
restored. You must take care to manage the
increased size of the dump. This option can be
used to move file systems by piping the output of
samfsdump to the input of samfsrestore.
-v Prints file names as each file is processed. This
option is superseded by the -l or -2 options.
-B size Specifies a buffer size in units of 512 bytes.
Note that there are limits on the buffer size, as
specified in the error message when the limits
have been exceeded. The default buffer size is
512 * 512 bytes.
-H For samfsdump, creates the dump file without a
dump header record. For samfsrestore, declares
that the existing dump file has no header record.
This option can be used to create control
structure dump files that can be concatenated
using the cat command. For more information on
this command, see the cat(1) man page.
-R (samfsrestore only) Replaces existing files when
restoring control structures.
-T Displays statistics at command termination. These
statistics include the number of files and
directories processed, the number of errors and
warnings, and other information. Example:
samfsdump statistics:
Files: 52020
Directories: 36031
Symbolic links: 0
Resource files: 8
File segments: 0
File archives: 0
Damaged files: 0
Files with data: 24102
File warnings: 0
Errors: 0
Unprocessed dirs: 0
File data bytes: 0
The numbers after the Files, Directories, Symbolic
links, and Resource files keywords are the counts
of files, directories, symbolic links, and
removable-media files whose inodes are contained
in the dump.
File segments refers to the number of data
segments associated with segmented files from the
dump.
File archives refers to the number of archive
images associated with the preceding Files,
Directories, Symbolic links, and Resource files.
Damaged files refers to the number of Files,
Directories, Symbolic links, and Resource files
that are either already marked damaged (for a
samfsdump) or were damaged during a restore
because they had no archive image (for a
samfsrestore).
Files with data refers to the number of Files that
have online (full or partial) data dumped or
restored.
File warnings refers to the number of Files,
Directories, Symbolic links, and Resource files
that would be damaged should the dump be restored
because they had no archive images at the time of
the dump.
Errors refers to the number of error messages that
were printed during the dump or restore. These
errors indicate a problem, but the problem is not
severe enough to cause an early exit from
samfsdump or samfsrestore. Examples of errors
during a restore are failing to create a symbolic
link and failing to change the owner or group of a
file. Errors that might occur during a dump
include having a path name too long, failing to
open a directory for reading, failing to read a
symbolic link or resource file, or finding a file
with an invalid mode.
Unprocessed dirs refers to the number of
directories that were not processed due to an
error, such as being unable to create the
directory.
File data bytes refers to the size of data that
was dumped (using options -P, -U, or -u) or
restored.
-W (Obsolete. samfsdump only.) Writes warning
messages during the dump process for files that
would be damaged if the dump were restored. This
option is retained for compatibility. By default,
these warning messages are now issued
automatically. For more information on
controlling this behavior, see the -q option,
which suppresses warning messages.
-X excluded_dir
(samfsdump only) Specifies directory paths to be
excluded from the dump. Multiple (up to 10)
directories can be excluded by using multiple -X
options. A directory that resolves to . or NULL
generates an error message.
-2 (samfsrestore only) Writes two lines per file,
similar to the sls(1) command's -2 option, when
listing the contents of the dump. For more
listing options, see the -i, -l, and -t options.
file ... Lists files to be dumped or restored. Note that
the names given to restore must match exactly the
names as they are stored in the dump. You can use
samfsrestore -t to see how the names are stored.
NOTES
A samfsrestore should not be attempted on a Sun StorEdge QFS
shared file system client.
The samfsdump output files compress to less than 25% of
their original size.
If the -g option is used, a log file is generated during
file system restoration. This file contains one line per
file that was online, or partially online, at the time the
file was dumped. This line is divided into fields and
contains the following information:
Field Description
1 The file type, which is indicated by one of the
following letters:
o d indicates a directory.
o f indicates a regular file.
o l indiactes a symbolic link.
o R indicates a removable media file.
o I indicates a segment index.
o S indicates a data segment.
2 The media type and Volume Serial Name (VSN) in
media_type.vsn format.
3 The position on the media.
4 Either online or partial.
5 The path relative to the file system mount point.
After a samfsrestore command is issued, it is possible to
restore files that were online, prior to the dump, back to
their online state. You do this by using the script in
/opt/SUNWsamfs/examples/restore.sh.
EXAMPLES
The following example creates a control structure dump of
the entire /sam file system:
example# cd /sam
example# samfsdump -f /destination/of/the/dump/samfsdump.today
To restore a control structure dump to /sam:
example# cd /sam
example# samfsrestore -f /source/of/the/dump/samfsdump.yesterday
SEE ALSO
cat(1), sls(1).
DIAGNOSTICS
You may encounter messages while using the samfsdump or
samfsrestore command. The following list shows several
possible messages and their explanations:
Message Explanation
file: Unrecognised mode (0x..)
samfsdump is being asked to dump a file
that is not a regular file, directory,
symbolic link, or removable media file.
The Sun StorEdge SAM-FS and Sun SAM-QFS
file systems allow the creation of block
special, character special, fifo, and
other special files, but they do not
function correctly. samfsdump does not
attempt to dump them.
file: Warning! File will be damaged.
If received during a samfsdump, this
means that the file in question does not
currently have any archive copies. The
file is dumped to the samfsdump file,
but if the samfsdump file is used to
restore this file, the file will be
marked damaged.
file: Warning! File is already damaged.
If received during a samfsdump, means
that the file is currently marked
damaged. During restoration, the file
will still be damaged.
file: File was already damaged prior to dump
If received during a samfsrestore, this
means that the file was dumped with the
damaged flag set.
file: File is now damaged
If received during a samfsrestore, this
means that the file was dumped when it
had no archive images. samfsdump and
samfsrestore do not dump file data.
They rely on the file's data having been
archived. Because the file no longer
has any data associated with it, it is
marked damaged.
.: Not a SAM-FS file.
You are attempting to dump files from a
file system that is not a Sun StorEdge
SAM-FS or Sun SAM-QFS file system, or
you are attempting to restore files from
a samfsdump dump file into a file system
that is not a Sun StorEdge SAM-FS or Sun
SAM-QFS file system.
file: stat() id mismatch: expected: %d.%d, got %d.%d
If received during a dump, this
indicates one of two things. If the %d.
portions match, but the .%d portions
differ, then a directory or file was
deleted and recreated while samfsdump
was operating on it. The file is not
dumped. If the %d. portions do not
match, then a serious error has been
encountered; consult your service
provider for help.
Corrupt samfsdump file. name length %d
If received during a restore, this means
that the path name of a file to be
restored was less than zero or larger
than MAXPATHLEN. This should not occur.
samfsrestore aborts.
Corrupt samfsdump file. %s inode version incorrect
During a restore, this means that a the
inode for the indicated file was in an
old format. This should not occur.
samfsrestore aborts.
file: pathname too long
If received during a dump, this
indicates that the path name of the
indicated file is longer than 1024
characters. The file is not dumped.
Sun Microsystems Last change: 27 Feb 2006
Maintenance Commands sammkfs(1M)
NAME
sammkfs, samfsinfo - Constructs or displays information for
a Sun StorEdge QFS, Sun StorEdge SAM-FS, or Sun SAM-QFS file
system
SYNOPSIS
/opt/SUNWsamfs/sbin/sammkfs [-a allocation_unit] [-i inodes]
[-P] [-S] [-V] fs_name
/opt/SUNWsamfs/sbin/samfsinfo fs_name
AVAILABILITY
SUNWqfs
SUNWsamfs
DESCRIPTION
The sammkfs command creates a Sun StorEdge QFS, Sun StorEdge
SAM-FS, or Sun SAM-QFS file system from the disk partitions
that belong to the family set fs_name, where fs_name is the
family set name as defined in the mcf file. Up to 252 disk
partitions can be specified in the mcf file for a Sun
StorEdge QFS, Sun StorEdge SAM-FS, or Sun SAM-QFS file
system. The sammkfs command can also be used to recreate a
file system after a disaster.
The samfsinfo command displays the structure of an existing
Sun StorEdge QFS, Sun StorEdge SAM-FS, or Sun SAM-QFS file
system. The output is similar to that obtained by using the
-V option to the sammkfs command.
OPTIONS
These commands accept the following options:
-a allocation_unit
Specifies the disk allocation unit (DAU). The DAU
is the basic unit of online storage. When you
specify a DAU size, you specify the number of
1024-byte (1 kilobyte) blocks to be allocated for
a file.
The DAU size you can specify depends on the type
of file system being initialized, as follows:
o The Sun StorEdge SAM-FS file system is an ms
file system. The disk devices in it are all md
devices. Both data and metadata are written to
the md devices. The allocation_unit specifies
the DAU to be used for the md devices.
Possible allocation_unit specifications are 16,
32, or 64 (the default).
o The Sun StorEdge QFS and Sun SAM-QFS file
systems are ma file systems. The metadata in
these file systems is written to mm devices.
The disk devices in these file systems are
specified as either md, mr, or gXXX devices, as
follows:
- For the md devices, possible allocation_unit
specifications are 16, 32, or 64 (the
default). A single file system cannot have
md devices mixed among the mr and gXXX
devices.
- For mr devices, the DAU is fully adjustable.
Specify an allocation_unit that is a
multiple of 8 in the following range for mr
devices: 16 < allocation_unit < 65528. The
default is 64.
- For gXXX devices, which specify striped
groups, the DAU is fully adjustable. If the
file system contains striped groups, the
minimum unit of disk space allocated is the
DAU multiplied by the number of members in
the striped group. Specify an
allocation_unit that is a multiple of 8 in
the following range for gXXX devices:
16 < allocation_unit < 65528. The default
is 256.
You can mix mr and gXXX devices in a single Sun
StorEdge QFS or Sun StorEdge SAM-QFS file
system. If these device types are mixed, the
allocation_unit specified is used for both
device types. If no allocation_unit is
specified, the DAU size used for each type of
device is 256.
-i inodes Specifies the number of inodes to be allocated for
this file system. This is the total number of
user inodes that can be used for the life of this
file system. In Sun StorEdge QFS, Sun Storedge
SAM-FS, and Sun SAM-QFS version 2 superblock file
systems, a number of inodes are reserved for file
system usage, and are unavailable to the user.
This number is in addition to the specified number
of user inodes. The actual number of inodes
available vary from that specified, due to
rounding to metadata DAU size.
NOTE: By specifying this option, you eliminate
the possibility of ever increasing the number of
inodes for the file system. Therefore, Sun does
not recommend the use of this option.
When this option is specified, later use of the
samgrowfs(1M) command increases the size of the
file system, but it cannot increase the number of
allowable inodes. For more information on
enlarging file systems, see the WARNINGS section
of this man page and the samgrowfs(1M) man page.
-P Indicates that this file system will be backward
compatible on version 4.6 and below. If this
option is not specified, the file system will have
aligned bit maps and bit maps round robined on the
metadata devices; however, this file system will
not be backward compatible.
-S Indicates that this file system is shared. In
order to mount the file system as a Sun StorEdge
QFS shared file system, you must also create a
hosts.fs_name configuration file. For more
information on this configuration file and other
aspects of the Sun QFS shared file system, see the
Sun StorEdge QFS and Sun StorEdge SAM-FS File
System Administration Guide. For information on
configuring a hosts file, see the hosts.fs(4) man
page.
-V Writes configuration information to standard
output but does not execute the sammkfs command.
This information can be used to create a new file
system.
The samfsinfo command should be used to generate
configuration information for an existing file
system.
EXAMPLES
Example 1. The following command creates a Sun SAM-QFS file
system with a DAU size of 128 kilobytes:
server# sammkfs -a 128 samfs1
FILES
/etc/opt/SUNWsamfs/mcf The configuration file for a Sun
StorEdge QFS, Sun StorEdge SAM-FS,
or Sun SAM-QFS file system
WARNINGS
Be sure that the /dev/dsk and /dev/rdsk names for each md,
mm, mr or gXXX device reference the same cntndnsn partition.
As with creating any type of file system, if you specify the
wrong partition names, you risk damaging user or system
data. Be sure to specify partitions that are otherwise
unused on your system. Do not use overlapping partitions.
With Sun StorEdge SAM-FS 4.1 and greater AND Solaris 64bit
kernels which support large disk devices (greater than 1
TB), it is possible to have partitions that are greater than
1 TB. Note that these file systems are not usable on Solaris
systems that do not support large disk devices.
SEE ALSO
dd(1M), samgrowfs(1M), undamage(1M).
mcf(4).
Sun StorEdge QFS and Sun StorEdge SAM-FS File System
Administration Guide.
Sun StorEdge SAM-FS Storage and Archive Management Guide.
WARNINGS
Be careful when using the -i inodes option for this command.
By using this option, you dictate the maximum number of
inodes allowed for the life of this file system. This
eliminates the possibility of ever using the samgrowfs(1M)
command to increase the number of files in this file system.
After a file system is made with -i specified, the
samgrowfs(1M) command can only be used to increase the size
of the file system in terms of bytes.
NOTES
Data alignment refers to matching the allocation unit of the
RAID controller with the allocation_unit of the file system.
A mismatched alignment causes a read-modify-write operation
for I/O that is less than the block size. The optimal
alignment formula is as follows:
allocation_unit = RAID_stripe_width * number_of_data_disks
For example, if a RAID-5 unit has a total of 8 disks with 1
of the 8 being the parity disk, the number of data disks is
7. If the RAID stripe width is 64 kilobytes, then the
optimal allocation_unit is 64 * 7 = 448.
Sun Microsystems Last change: 11 Feb 2004
Maintenance Commands samfsdump(1M)
NAME
samfsdump, samfsrestore - Dumps or restores SAM-QFS file
control structure data
SYNOPSIS
samfsdump [-b bl_factor] [-d] -f dump_file [-n] [-q] [-P]
[-u]
[-U] [-v] [-B size] [-H] [-I include_file] [-T] [-W]
[-X excluded_dir] [file ...]
samfsrestore [-b bl_factor] [-d] -f dump_file [-g log_file]
[-i] [-l] [-r] [-s] [-t] [-v] [-B size] [-H] [-R] [-T] [-2]
[file ...]
AVAILABILITY
SUNWsamfs
DESCRIPTION
The samfsdump command creates a dump file containing control
structure information for each specified file. This command
must be entered after you have used the cd(1) command to
change to the mount point of a SAM-QFS file system.
The samfsdump command creates a dump file, as follows:
o If nothing is specified for file, the samfsdump command
creates a dump file containing the control structures for
every file in the current directory and also for every
file in the current directory's subdirectories.
o If an individual file is specified for file, the samfsdump
command creates a dump file containing the control
structures for that individual file.
o If a directory is specified for file, the samfsdump
command creates a dump file containing the control
structures for every file in that directory and also for
every file in that directory's subdirectories.
Any file specified with an absolute path is stored in the
dump file with an absolute path. Any file specified with a
relative path is stored in the dump file with its relative
path.
The samfsrestore command uses the contents of the dump file
to restore control structures for all the files in the dump
file or for each specified file. If a file is specified,
its path and file name must match exactly what exists in the
dump file. By default, all files are restored to the
absolute or relative location as each file is described in
the dump file. If the -s option is specified, however, all
file names with an absolute path in the dump file are
restored relative to the current directory, using the entire
path as contained in the dump file.
The samfsdump command does not create a dump of any data
associated with the files (unless the -P, -u or -U options
are specified), so no data can be restored from this dump
file. It is assumed that the data associated with the
dumped files has been archived in some way. If a file for
which no archive copy is available is dumped, a warning
message is issued noting that this file will be marked as
damaged when restored. When that file is restored from the
dump file, it is marked as damaged by samfsrestore. Note
that this warning can be explicitly suppressed by using the
-q option.
You must be logged in as superuser (root) in order to
execute the samfsdump and samfsrestore commands. Sun
Microsystems recommends that a site create samfsdump dumps
on a periodic basis as part of a disaster recovery plan.
OPTIONS
This command accepts the following options:
-b bl_factor
Specifies a blocking factor in units of 512 bytes.
When specified, all I/O to the dump image file is
done in multiples of the blocking factor. There
is no blocking done by default.
-d Enables debugging messages. This option is useful
only to Sun Microsystems and is used to trace
execution for verification purposes.
-f dump_file
Names the file to which the control structure data
dump is written to (by samfsdump) or read from (by
samfsrestore). You must specify a dump_file.
If a dash character (-) is specified for the
dump_file, samfsdump writes the dump file to
stdout and samfsrestore reads the dump file from
stdin.
The dump file data can be passed through
appropriate filters, such as compression or
encryption, after being written by samfsdump or
before being read by samfsrestore.
-g log_file
(samfsrestore only) Generates a file of online
directories and files. For information on the
format of this file, see the NOTES section of this
man page.
-i (samfsrestore only) Prints the inode numbers of
the files when listing the contents of the dump.
For more listing options, see -l, -t, and -2
options.
-I include_file
(samfsdump only) Takes the list of files to dump
from include_file. This file has one relative or
absolute path to be dumped per line. After
processing include_file, any [file] arguments from
the command line are processed.
-l (samfsrestore only) Prints one line per file.
This option is similar to the sls(1M) command's -l
option when listing the dump contents. Note that
this option is identified by the lowercase letter
`l', not a number '1'. For more listing options,
see the -i, -t, and -2 options.
-n (samfsdump only) Forces the samfsdump file to use
the newest header format available. The new
header is incompatible with samfsrestore prior to
the 3.5.0 release level. Using the -u or -U
arguments automatically enables the -n argument.
-P (samfsdump only) Dumps the online data portions of
files which are offline, but have partial data
online. This option can considerably increase the
size of the dump file, as data and metadata are
both being dumped. You must take care to manage
the increased size of the dump. This option can
be used to move file partial data by piping the
output of samfsdump to the input of samfsrestore.
-q (samfsdump only) Suppresses warning messages for
damaged files. By default, samfsdump writes
warning messages for each file that would be
considered damaged if the dump were restored.
-r (samfsrestore only) Replaces existing files when
restoring control structures if the existing files
have an older modification time than the dumped
files.
-s (samfsrestore only) Removes leading slashes from
file names prior to restoring them. This is
useful if the dump was made with an absolute path
name and the dump is being restored to a different
location. Any directories required for the
restoration and not defined in the dump file are
automatically created.
-t (samfsrestore only) Lists the content of the dump
file rather than restoring the dump. For more
listing options, see the -i, -l, and -2 options.
-u (samfsdump only) Dumps the data portions of files
without at least one archive copy. This option
can considerably increase the size of the dump
file, as data and metadata are both being dumped.
You must take care to manage the increased size of
the dump.
-U (samfsdump only) Dumps the data portions of files
which are online. This option can considerably
increase the size of the dump file, as data and
metadata are both being dumped. If this option is
used with segmented files, the archive copy
information is not preserved when the file is
restored. You must take care to manage the
increased size of the dump. This option can be
used to move file systems by piping the output of
samfsdump to the input of samfsrestore.
-v Prints file names as each file is processed. This
option is superseded by the -l or -2 options.
-B size Specifies a buffer size in units of 512 bytes.
Note that there are limits on the buffer size, as
specified in the error message when the limits
have been exceeded. The default buffer size is
512 * 512 bytes.
-H For samfsdump, creates the dump file without a
dump header record. For samfsrestore, declares
that the existing dump file has no header record.
This option can be used to create control
structure dump files that can be concatenated
using the cat command. For more information on
this command, see the cat(1) man page.
-R (samfsrestore only) Replaces existing files when
restoring control structures.
-T Displays statistics at command termination. These
statistics include the number of files and
directories processed, the number of errors and
warnings, and other information. Example:
samfsdump statistics:
Files: 52020
Directories: 36031
Symbolic links: 0
Resource files: 8
File segments: 0
File archives: 0
Damaged files: 0
Files with data: 24102
File warnings: 0
Errors: 0
Unprocessed dirs: 0
File data bytes: 0
The numbers after the Files, Directories, Symbolic
links, and Resource files keywords are the counts
of files, directories, symbolic links, and
removable-media files whose inodes are contained
in the dump.
File segments refers to the number of data
segments associated with segmented files from the
dump.
File archives refers to the number of archive
images associated with the preceding Files,
Directories, Symbolic links, and Resource files.
Damaged files refers to the number of Files,
Directories, Symbolic links, and Resource files
that are either already marked damaged (for a
samfsdump) or were damaged during a restore
because they had no archive image (for a
samfsrestore).
Files with data refers to the number of Files that
have online (full or partial) data dumped or
restored.
File warnings refers to the number of Files,
Directories, Symbolic links, and Resource files
that would be damaged should the dump be restored
because they had no archive images at the time of
the dump.
Errors refers to the number of error messages that
were printed during the dump or restore. These
errors indicate a problem, but the problem is not
severe enough to cause an early exit from
samfsdump or samfsrestore. Examples of errors
during a restore are failing to create a symbolic
link and failing to change the owner or group of a
file. Errors that might occur during a dump
include having a path name too long, failing to
open a directory for reading, failing to read a
symbolic link or resource file, or finding a file
with an invalid mode.
Unprocessed dirs refers to the number of
directories that were not processed due to an
error, such as being unable to create the
directory.
File data bytes refers to the size of data that
was dumped (using options -P, -U, or -u) or
restored.
-W (Obsolete. samfsdump only.) Writes warning
messages during the dump process for files that
would be damaged if the dump were restored. This
option is retained for compatibility. By default,
these warning messages are now issued
automatically. For more information on
controlling this behavior, see the -q option,
which suppresses warning messages.
-X excluded_dir
(samfsdump only) Specifies directory paths to be
excluded from the dump. Multiple (up to 10)
directories can be excluded by using multiple -X
options. A directory that resolves to . or NULL
generates an error message.
-2 (samfsrestore only) Writes two lines per file,
similar to the sls(1) command's -2 option, when
listing the contents of the dump. For more
listing options, see the -i, -l, and -t options.
file ... Lists files to be dumped or restored. Note that
the names given to restore must match exactly the
names as they are stored in the dump. You can use
samfsrestore -t to see how the names are stored.
NOTES
A samfsrestore should not be attempted on a Sun StorEdge QFS
shared file system client.
The samfsdump output files compress to less than 25% of
their original size.
If the -g option is used, a log file is generated during
file system restoration. This file contains one line per
file that was online, or partially online, at the time the
file was dumped. This line is divided into fields and
contains the following information:
Field Description
1 The file type, which is indicated by one of the
following letters:
o d indicates a directory.
o f indicates a regular file.
o l indiactes a symbolic link.
o R indicates a removable media file.
o I indicates a segment index.
o S indicates a data segment.
2 The media type and Volume Serial Name (VSN) in
media_type.vsn format.
3 The position on the media.
4 Either online or partial.
5 The path relative to the file system mount point.
After a samfsrestore command is issued, it is possible to
restore files that were online, prior to the dump, back to
their online state. You do this by using the script in
/opt/SUNWsamfs/examples/restore.sh.
EXAMPLES
The following example creates a control structure dump of
the entire /sam file system:
example# cd /sam
example# samfsdump -f /destination/of/the/dump/samfsdump.today
To restore a control structure dump to /sam:
example# cd /sam
example# samfsrestore -f /source/of/the/dump/samfsdump.yesterday
SEE ALSO
cat(1), sls(1).
DIAGNOSTICS
You may encounter messages while using the samfsdump or
samfsrestore command. The following list shows several
possible messages and their explanations:
Message Explanation
file: Unrecognised mode (0x..)
samfsdump is being asked to dump a file
that is not a regular file, directory,
symbolic link, or removable media file.
The Sun StorEdge SAM-FS and Sun SAM-QFS
file systems allow the creation of block
special, character special, fifo, and
other special files, but they do not
function correctly. samfsdump does not
attempt to dump them.
file: Warning! File will be damaged.
If received during a samfsdump, this
means that the file in question does not
currently have any archive copies. The
file is dumped to the samfsdump file,
but if the samfsdump file is used to
restore this file, the file will be
marked damaged.
file: Warning! File is already damaged.
If received during a samfsdump, means
that the file is currently marked
damaged. During restoration, the file
will still be damaged.
file: File was already damaged prior to dump
If received during a samfsrestore, this
means that the file was dumped with the
damaged flag set.
file: File is now damaged
If received during a samfsrestore, this
means that the file was dumped when it
had no archive images. samfsdump and
samfsrestore do not dump file data.
They rely on the file's data having been
archived. Because the file no longer
has any data associated with it, it is
marked damaged.
.: Not a SAM-FS file.
You are attempting to dump files from a
file system that is not a Sun StorEdge
SAM-FS or Sun SAM-QFS file system, or
you are attempting to restore files from
a samfsdump dump file into a file system
that is not a Sun StorEdge SAM-FS or Sun
SAM-QFS file system.
file: stat() id mismatch: expected: %d.%d, got %d.%d
If received during a dump, this
indicates one of two things. If the %d.
portions match, but the .%d portions
differ, then a directory or file was
deleted and recreated while samfsdump
was operating on it. The file is not
dumped. If the %d. portions do not
match, then a serious error has been
encountered; consult your service
provider for help.
Corrupt samfsdump file. name length %d
If received during a restore, this means
that the path name of a file to be
restored was less than zero or larger
than MAXPATHLEN. This should not occur.
samfsrestore aborts.
Corrupt samfsdump file. %s inode version incorrect
During a restore, this means that a the
inode for the indicated file was in an
old format. This should not occur.
samfsrestore aborts.
file: pathname too long
If received during a dump, this
indicates that the path name of the
indicated file is longer than 1024
characters. The file is not dumped.
Sun Microsystems Last change: 27 Feb 2006
Maintenance Commands samfstyp(1M)
NAME
samfstyp - Determines Sun StorEdge SAM-FS or Sun SAM-QFS
file system type
SYNOPSIS
/opt/SUNWsamfs/sbin/samfstyp [-v] device
AVAILABILITY
SUNWqfs
SUNWsamfs
DESCRIPTION
The samfstyp utility displays the Sun StorEdge SAM-FS or Sun
SAM-QFS file system type of the file system identified by
device. Optionally, samfstyp displays detailed information
about that file system.
You must be the Superuser to use this utility. If the file
system is not a Sun StorEdge SAM-FS or Sun SAM-QFS file
system, or if you are not the Superuser, no output is
generated.
The first line of samfstyp output identifies the Sun
StorEdge SAM-FS or Sun SAM-QFS file system type of the
specified device. Available file system types are:
sam-fs-sbv1 Sun StorEdge SAM-FS file system with superblock version 1
sam-fs Sun StorEdge SAM-FS file system with current superblock
sam-qfs-sbv1 Sun SAM-QFS file system with superblock version 1
sam-qfs Sun SAM-QFS file system with current superblock
The samfstyp utility displays detailed information about the
identified Sun StorEdge SAM-FS or Sun SAM-QFS file system.
Information may be displayed for some, or all, of the
following items, subject to file system configuration:
Superblock (General)
Family Set Members
I-node Information
Volume Table of Contents
Host Table
Controller
Disk Geometry
OPTIONS
This command accepts the following options:
-v Generates detailed information about the Sun
StorEdge SAM-FS or Sun SAM-QFS file system
identified by device.
device Identifies the device from which the file system
is analyzed.
EXAMPLES
Example 1:
fireball# cat /etc/opt/SUNWsamfs/mcf
qfs1 10 ma qfs1 on
/dev/dsk/c6t0d0s3 11 mm qfs1 on
/dev/dsk/c6t0d0s4 15 mr qfs1 on
fireball# samfstyp /dev/rdsk/c6t0d0s4
qfs
fireball#
Example 2:
fireball# samfstyp -v /dev/rdsk/c6t0d0s4
sam-qfs
/dev/rdsk/c6t0d0s4 {
name = SBLK
magic = 0x76657232
gen = 0
id = 0x3f3426798333ada1
init = Fri Aug 8 17:38:49
update = Fri Aug 8 17:38:49
state = clean
sb1_offset = 0
sb2_offset = 0
host_offset = 0
inode_offset = 0
user_min_inode = 1025
ext_shift = 12
sm_meta_blocks = 4
lg_meta_blocks = 16
sm_data_blocks = 64
lg_data_blocks = 64
eq_id = 10
fset_name = qfs1
fset_ord = 1
fset_blks_free = 0
fset_blks = 0
fset_meta_count = 1
fset_data_count = 1
fset_count = 2
fset 0 {
ord = 0
eq_id = 11
dev_type = mm
slice_state = clean
meta_ord = 0
stripe_count = 1
part_blocks_free = 2098496
part_blocks = 2098928
alloc_map_offset = 18
alloc_map_blocks = 73014444050
lg_dau_next = 0
lg_dau_count = 131183
sys_blocks = 274878038127
}
fset 1 {
ord = 1
eq_id = 15
dev_type = mr
slice_state = clean
meta_ord = 0
stripe_count = 1
part_blocks_free = 2098816
part_blocks = 2098880
alloc_map_offset = 35
alloc_map_blocks = 21474836515
lg_dau_next = 0
lg_dau_count = 32795
sys_blocks = 274877939739
}
vtoc {
label = SUN9.0G cyl 4924 alt
boot = 0x0/0x0/0x0
sanity = 0x600ddeee
layout = 1
name = ''
sector_size = 512
part_count = 8
part 0 {
id = unassigned
permissions = (none)
first_sector = 0
blocks = 132867
}
part 1 {
id = unassigned
permissions = (none)
first_sector = 132867
blocks = 4197879
}
part 2 {
id = backup
permissions = (none)
first_sector = 0
blocks = 17682084
}
part 3 {
id = unassigned
permissions = (none)
first_sector = 4330746
blocks = 4197879
}
part 4 {
id = unassigned
permissions = (none)
first_sector = 8528625
blocks = 4197879
}
part 5 {
id = unassigned
permissions = (none)
first_sector = 12726504
blocks = 4197879
}
part 6 {
id = unassigned
permissions = (none)
first_sector = 16924383
blocks = 757701
}
part 7 {
id = unassigned
permissions = unmountable
first_sector = 0
blocks = 0
}
}
controller {
name = pci1000,f
type = scsi-ccs
flags = 0x8
number = 3
address = 0x0
bus = 0x0
intr_pri = 0
intr_vec = 0x0
drive_name = sd
unit_num = 45
slave_num = 0
part_num = 4
max_trans = 2048
}
geometry {
data_cyl = 4924
alt_cyl = 2
cyl_offset = 0
heads = 27
track_sect = 133
interleave = 1
cyl_alt = 0
rpm = 7200
phys_cyl = 4926
sect_read_skip = 0
sect_write_skip = 63
}
}
fireball#
SEE ALSO
fstyp(1M)
Sun Microsystems Last change: 25 Aug 2003
Maintenance Commands samgrowfs(1M)
NAME
samgrowfs - Adds disk partitions to an existing Sun StorEdge
SAM-FS or Sun SAM-QFS file system
SYNOPSIS
samgrowfs [-V] fsname
AVAILABILITY
SUNWsamfs
DESCRIPTION
The samgrowfs command adds disk partitions to an Sun
StorEdge SAM-FS and Sun SAM-QFS file system and allows the
file system to grow.
The following procedure uses the samgrowfs command to
increase the size of a Sun StorEdge SAM-FS or Sun SAM-QFS
file system:
1. Unmount all the file systems you want to grow.
2. In a Sun StorEdge SAM-FS or Sun SAM-QFS environment, idle
all drives by entering a samcmd idle eq and a samd stop
command. For more information on these commands, see the
samcmd(1M) and samd(1M) man pages.
3. Edit the mcf file, save the changes, and quit the editor.
Up to 252 disk partitions can be specified in the mcf
file for a Sun StorEdge SAM-FS or Sun SAM-QFS file sys-
tem. The new partitions must be placed after the exist-
ing partitions for the specified family set fsname. It is
important that sam-fsd be notified after any change to
/etc/opt/SUNWsamfs/mcf (see samd(1M)).
4. Run the samgrowfs(1M) command on the fsname file system.
5. Mount the fsname file system.
For more information on this procedure, see the Sun StorEdge
QFS and Sun StorEdge SAM-FS File System Administration
Guide.
OPTIONS
This command accepts the following arguments:
-V Lists configuration information but does not exe-
cute the command.
fsname Specifies the existing family set name of the file
system that is to grow. This is the family set
name as specified in the mcf file.
EXAMPLE
The following example adds 2 partitions to an existing
1-partition Sun StorEdge SAM-FS file system. The mcf file
for the existing 1-partition file system with a family set
name of samfs1 is as follows:
samfs1 10 ms samfs1
/dev/dsk/c0t3d0s7 11 md samfs1 - /dev/rdsk/c0t3d0s7
The procedure is as follows:
1. Unmount the samfs1 file system.
server# umount samfs1
2. Kill the sam-amld process:
server# samd stop
3. Edit the mcf file and add the 2 new partitions for the
file system with family set name of samfs1:
samfs1 10 ms samfs1
/dev/dsk/c0t3d0s7 11 md samfs1 - /dev/rdsk/c0t3d0s7
/dev/dsk/c2t3d0s2 12 md samfs1 - /dev/rdsk/c2t3d0s2
/dev/dsk/c2t4d0s2 13 md samfs1 - /dev/rdsk/c2t4d0s2
4. Grow and mount the file system by entering the following
commands:
server# samgrowfs samfs1
server# mount samfs1
FILES
/etc/opt/SUNWsamfs/mcf The configuration file for Sun
StorEdge SAM-FS and Sun StorEdge
QFS file systems.
SEE ALSO
samcmd(1M), samd(1M), sammkfs(1M).
mcf(4).
Sun StorEdge QFS and Sun StorEdge SAM-FS File System
Administration Guide.
WARNINGS
Be sure that the /dev/dsk and /dev/rdsk names for each md
device reference the same cntndnsn partition.
As with creating any type of file system, if you specify the
wrong partition names, you risk damaging user or system
data. Be sure to specify partitions which are otherwise
unused on your system. Do not use overlapping partitions.
To grow a Sun StorEdge QFS file system, you must add a meta-
data partition (mm) prior to issuing a samgrowfs command.
Data partitions can be added as well as metadata partitions.
The added metadata partition contains block reservation
information for all added partitions. When adding a small
metadata partition with large data partitions, the small
metadata partition may be too small to hold the block reser-
vation as well as other information, depending on total
storage added and DAU size. This condition may cause an
error, or a very full metadata partition after samgrowfs.
Sun Microsystems Last change: 29 Apr 2004
Maintenance Commands load(1M)
NAME
samload, load - Loads media into a device
SYNOPSIS
/opt/SUNWsamfs/sbin/samload [ -w ] eq:slot[:partition] [ deq
]
/opt/SUNWsamfs/sbin/samload [ -w ] mediatype.vsn [ deq ]
/opt/SUNWsamfs/sbin/load [ -w ] eq:slot[:partition] [ deq ]
/opt/SUNWsamfs/sbin/load [ -w ] mediatype.vsn [ deq ]
AVAILABILITY
SUNWsamfs
DESCRIPTION
load requests that the volume specified by
eq:slot[:partition] or mediatype.vsn be loaded into device
deq. The device specified by deq must be a removeable media
drive, be in the "unavailable" state (see set_state(1M)) and
be controlled by a media changer. If deq already has a
volume loaded, it is unloaded and the volume is put away
before the new volume is loaded. If deq is not specified,
then the volume is loaded into an available drive in the
media changer eq. The Sun StorEdge SAM-FS or Sun SAM-QFS
file system choses the drive that the volume is loaded into.
Note: Loading media used by a Sun StorEdge SAM-FS or Sun
SAM-QFS file system for archiving could result in the loss
of the data contained on that media. Sun Microsystems
strongly recommends that archive media NOT be loaded in this
manner.
The load and samload commands are identical; samload is pro-
vided as an alternative to avoid conflict with the Tcl com-
mand of the same name.
OPTIONS
-w load will wait for the operation to complete
before terminating.
FILES
mcf The configuration file for Sun StorEdge
SAM-FS and Sun SAM-QFS environments
SEE ALSO
unload(1M), set_state(1M), mcf(4), sam-robotsd(1M)
Sun Microsystems Last change: 29 Jun 2000
Maintenance Commands sammkfs(1M)
NAME
sammkfs, samfsinfo - Constructs or displays information for
a Sun StorEdge QFS, Sun StorEdge SAM-FS, or Sun SAM-QFS file
system
SYNOPSIS
/opt/SUNWsamfs/sbin/sammkfs [-a allocation_unit] [-i inodes]
[-P] [-S] [-V] fs_name
/opt/SUNWsamfs/sbin/samfsinfo fs_name
AVAILABILITY
SUNWqfs
SUNWsamfs
DESCRIPTION
The sammkfs command creates a Sun StorEdge QFS, Sun StorEdge
SAM-FS, or Sun SAM-QFS file system from the disk partitions
that belong to the family set fs_name, where fs_name is the
family set name as defined in the mcf file. Up to 252 disk
partitions can be specified in the mcf file for a Sun
StorEdge QFS, Sun StorEdge SAM-FS, or Sun SAM-QFS file
system. The sammkfs command can also be used to recreate a
file system after a disaster.
The samfsinfo command displays the structure of an existing
Sun StorEdge QFS, Sun StorEdge SAM-FS, or Sun SAM-QFS file
system. The output is similar to that obtained by using the
-V option to the sammkfs command.
OPTIONS
These commands accept the following options:
-a allocation_unit
Specifies the disk allocation unit (DAU). The DAU
is the basic unit of online storage. When you
specify a DAU size, you specify the number of
1024-byte (1 kilobyte) blocks to be allocated for
a file.
The DAU size you can specify depends on the type
of file system being initialized, as follows:
o The Sun StorEdge SAM-FS file system is an ms
file system. The disk devices in it are all md
devices. Both data and metadata are written to
the md devices. The allocation_unit specifies
the DAU to be used for the md devices.
Possible allocation_unit specifications are 16,
32, or 64 (the default).
o The Sun StorEdge QFS and Sun SAM-QFS file
systems are ma file systems. The metadata in
these file systems is written to mm devices.
The disk devices in these file systems are
specified as either md, mr, or gXXX devices, as
follows:
- For the md devices, possible allocation_unit
specifications are 16, 32, or 64 (the
default). A single file system cannot have
md devices mixed among the mr and gXXX
devices.
- For mr devices, the DAU is fully adjustable.
Specify an allocation_unit that is a
multiple of 8 in the following range for mr
devices: 16 < allocation_unit < 65528. The
default is 64.
- For gXXX devices, which specify striped
groups, the DAU is fully adjustable. If the
file system contains striped groups, the
minimum unit of disk space allocated is the
DAU multiplied by the number of members in
the striped group. Specify an
allocation_unit that is a multiple of 8 in
the following range for gXXX devices:
16 < allocation_unit < 65528. The default
is 256.
You can mix mr and gXXX devices in a single Sun
StorEdge QFS or Sun StorEdge SAM-QFS file
system. If these device types are mixed, the
allocation_unit specified is used for both
device types. If no allocation_unit is
specified, the DAU size used for each type of
device is 256.
-i inodes Specifies the number of inodes to be allocated for
this file system. This is the total number of
user inodes that can be used for the life of this
file system. In Sun StorEdge QFS, Sun Storedge
SAM-FS, and Sun SAM-QFS version 2 superblock file
systems, a number of inodes are reserved for file
system usage, and are unavailable to the user.
This number is in addition to the specified number
of user inodes. The actual number of inodes
available vary from that specified, due to
rounding to metadata DAU size.
NOTE: By specifying this option, you eliminate
the possibility of ever increasing the number of
inodes for the file system. Therefore, Sun does
not recommend the use of this option.
When this option is specified, later use of the
samgrowfs(1M) command increases the size of the
file system, but it cannot increase the number of
allowable inodes. For more information on
enlarging file systems, see the WARNINGS section
of this man page and the samgrowfs(1M) man page.
-P Indicates that this file system will be backward
compatible on version 4.6 and below. If this
option is not specified, the file system will have
aligned bit maps and bit maps round robined on the
metadata devices; however, this file system will
not be backward compatible.
-S Indicates that this file system is shared. In
order to mount the file system as a Sun StorEdge
QFS shared file system, you must also create a
hosts.fs_name configuration file. For more
information on this configuration file and other
aspects of the Sun QFS shared file system, see the
Sun StorEdge QFS and Sun StorEdge SAM-FS File
System Administration Guide. For information on
configuring a hosts file, see the hosts.fs(4) man
page.
-V Writes configuration information to standard
output but does not execute the sammkfs command.
This information can be used to create a new file
system.
The samfsinfo command should be used to generate
configuration information for an existing file
system.
EXAMPLES
Example 1. The following command creates a Sun SAM-QFS file
system with a DAU size of 128 kilobytes:
server# sammkfs -a 128 samfs1
FILES
/etc/opt/SUNWsamfs/mcf The configuration file for a Sun
StorEdge QFS, Sun StorEdge SAM-FS,
or Sun SAM-QFS file system
WARNINGS
Be sure that the /dev/dsk and /dev/rdsk names for each md,
mm, mr or gXXX device reference the same cntndnsn partition.
As with creating any type of file system, if you specify the
wrong partition names, you risk damaging user or system
data. Be sure to specify partitions that are otherwise
unused on your system. Do not use overlapping partitions.
With Sun StorEdge SAM-FS 4.1 and greater AND Solaris 64bit
kernels which support large disk devices (greater than 1
TB), it is possible to have partitions that are greater than
1 TB. Note that these file systems are not usable on Solaris
systems that do not support large disk devices.
SEE ALSO
dd(1M), samgrowfs(1M), undamage(1M).
mcf(4).
Sun StorEdge QFS and Sun StorEdge SAM-FS File System
Administration Guide.
Sun StorEdge SAM-FS Storage and Archive Management Guide.
WARNINGS
Be careful when using the -i inodes option for this command.
By using this option, you dictate the maximum number of
inodes allowed for the life of this file system. This
eliminates the possibility of ever using the samgrowfs(1M)
command to increase the number of files in this file system.
After a file system is made with -i specified, the
samgrowfs(1M) command can only be used to increase the size
of the file system in terms of bytes.
NOTES
Data alignment refers to matching the allocation unit of the
RAID controller with the allocation_unit of the file system.
A mismatched alignment causes a read-modify-write operation
for I/O that is less than the block size. The optimal
alignment formula is as follows:
allocation_unit = RAID_stripe_width * number_of_data_disks
For example, if a RAID-5 unit has a total of 8 disks with 1
of the 8 being the parity disk, the number of data disks is
7. If the RAID stripe width is 64 kilobytes, then the
optimal allocation_unit is 64 * 7 = 448.
Sun Microsystems Last change: 11 Feb 2004
Maintenance Commands samncheck(1M)
NAME
samncheck - Generates pathnames versus i-numbers for Sun
StorEdge SAM-FS and Sun SAM-QFS file systems
SYNOPSIS
samncheck mount_point i-number [ i-number ... ]
AVAILABILITY
SUNWsamfs
DESCRIPTION
samncheck generates a pathname in the Sun StorEdge SAM-FS or
Sun SAM-QFS file system mounted on mount_point for each i-
number listed in the command line. samncheck must be run
with root permissions.
The output from samncheck is one line per i_number which
represents an existing inode in the file system. The
i_number followed by the current generation number for that
inode is displayed, followed by a tab and a pathname.
Note that there may be many pathnames to a given i_number;
samncheck reports just one.
Nonexistant i_numbers are silently ignored.
EXAMPLES
bilbo# samncheck /sam 1 2 3 4 5 18
1.1 /sam/.inodes
2.2 /sam/
4.4 /sam/.ioctl
5.5 /sam/.archive
18.3 /sam/file
SEE ALSO
ncheck(1)
Sun Microsystems Last change: 18 Dec 1996
Maintenance Commands samquota(1M)
NAME
samquota - Reports, sets, or resets quota information
SYNOPSIS
samquota [-a | -A adminsetID] [-e] [-g | -G groupID] [-h]
[-k] [-u | -U userID] [file]
samquota [-b count:type[:scope]] [-f count:type[:scope]]
[-h] [-i] [-k] [-p] [-t interval:scope] [-w]
[-x action:scope] [-A adminsetID] [-G groupID] [-O]
[-U userID] [file]
AVAILABILITY
SUNWsamfs
SUNWqfs
DESCRIPTION
The samquota command displays quota usage statistics and can
be used to edit quotas, grace periods, and usages for users,
groups, and admin sets. This command supports file counts
and online block counts. Note that some options are
mutually exclusive.
Only a superuser can use this command to change quotas. End
users can use a subset of this command's options to display
quota usage and to display limit information. For more
information on the end-user version of this command, see the
squota(1) man page.
By default, samquota(1M) writes the user's applicable
GID/UID quotas and usages on all mounted Sun StorEdge QFS,
Sun StorEdge SAM-FS, and Sun SAM-QFS file systems to stdout.
ADMIN SETS AND DIRECTORY/PROJECT QUOTAS
An admin set quota applies to all files and directories on a
file system that have their admin set attribute set to the
given value. The main use of admin set quotas is to effect
directory or project quotas. They can be used to effect
directory quotas by setting a directory's admin set ID to a
unique value and using samquota(1M) to set quotas for that
value. All subdirectories and files subsequently created
beneath the directory then inherit the value, and the admin
set's quota limits apply to them. Conversely, a project
quota can be effected by choosing a set of project
directories, setting their admin set ID values to a single
unique value, and using samquota(1M) to set quotas for that
ID. Note in either case that newly created files inherit an
admin set ID from the directory in which they are created;
the admin set IDs do not change if the file is moved to a
new directory with a different admin set ID.
You can use the samchaid(1M) command to set admin set IDs.
The samchaid(1M) command allows system administrators to
assign files and directories to individual admin sets.
Admin set IDs are not tied to any set of permissions
associated with the user. That is, a user can have a set of
directories and files on one Sun StorEdge QFS, Sun StorEdge
SAM-FS, or Sun SAM-QFS file system with a particular admin
set ID, and the same user can have another set of
directories and files on another file system (or even the
same one) with a completely different admin set ID. A
writable file is therefore used as a surrogate to determine
that a user has permission to view an admin set's quota
values.
OPTIONS
This command accepts the following options:
-a Specifies admin set quota statistics for file.
This option is not allowed in combination with the
-A option or any of the setting options.
-b count:type[:scope]
Sets soft, hard, or in-use block allocation
limits. This setting can pertain to either online
files or to the total number of files. Note that
a colon (:) is used to separate each component.
count specifies the number of blocks for the limit
and must be an integer number in the following
range:
0 < count < (2**63) -1.
By default, the count specification indicates a
number of 512-byte blocks. If the -k option is
also specified, the count specification is
interpreted as a number of 1024-byte blocks.
By default, the integer specified for count is
interpreted as it is written. You can append a
unit multiplier to the count value, however, to
force the system to interpret count as a larger
number. These unit multipliers are as follows:
Multiplier Interpretation
k or K Specifies 1000. For example,
specifying 2k is interpreted as
2000.
m or M Specifies 1,000,000. For example,
specifying 80M is interpreted as
80,000,000.
g or G Specifies 1,000,000,000.
t or T Specifies 10**12.
p or P Specifies 10**15.
type specifies the type of limit. Possible type
specifications are as follows:
type Interpretation
s or soft Specifies that the samquota command
is being used to reset a soft
limit.
h or hard Specifies that the samquota command
is being used to reset a hard
limit.
u or inuse Specifies that the samquota command
is being used to reset the in-use
counter. Typically, this is set
only by the samfsck(1M) command and
other system administration tools.
scope specifies the scope of the limit. Possible
scope specifications are as follows:
scope Interpretation
o or online Specifies that the samquota command
is being used to reset an online
limit. For Sun StorEdge SAM-FS and
Sun SAM-QFS file systems, files
that are released (offline) are not
counted in the online block usage.
t or total Specifies that the samquota command
is being used to reset a total
limit. For Sun StorEdge SAM-FS and
Sun SAM-QFS file systems, both
online and offline files are used
to compute the total block usage.
If no scope is specified both the
online and total limits are set.
Example. The following command line sets a soft
limit of 120,000 512-byte blocks to be occupied by
user george's files in file system qfs22:
samquota -b 120k:s -U george /qfs22
-e Writes the quota information from this command
line in an executable format. You can use this
option if you want the system to put the
information from this command into a file for
editing.
server# samquota -eG sam /qfs1
# Type ID
# Limits
# soft hard
# Files
# Blocks
# Grace Periods
#
samquota -G 101 \
-f 1000:s -f 1200:h \
-b 100000:s -b 120000:h \
-t 1d /qfs1
-f count:type[:scope]
Sets soft, hard, or in-use file limits for a file
system. Note that a colon (:) is used to separate
each component.
count specifies the number of files for the limit
and must be an integer number in the following
range:
0 < count < (2**63) -1.
If the -k option is also specified, any count
specification referring to blocks is interpreted
in 1024-byte blocks instead of 512-byte blocks (by
multiplying by 2).
By default, the integer specified for count is
interpreted as it is written. You can append a
unit multiplier to the count value, however, to
force the system to interpret count as a larger
number. These unit multipliers are as follows:
Multiplier Interpretation
k or K Specifies 1000. For example,
specifying 2k is interpreted as
2000.
m or M Specifies 1,000,000. For example,
specifying 80M is interpreted as
80,000,000.
g or G Specifies 1,000,000,000.
t or T Specifies 10**12.
p or P Specifies 10**15.
type specifies the type of limit. Possible type
specifications are as follows:
type Interpretation
s or soft Specifies that the samquota command
is being used to reset a soft
limit.
h or hard Specifies that the samquota command
is being used to reset a hard
limit,
u or inuse Specifies that the samquota command
is being used to reset the in-use
counter. Typically, this is set
only by the samfsck(1M) command and
other system administration tools.
scope specifies the scope of the limit. Possible
scope specifications are as follows:
scope Interpretation
o or online Specifies that the samquota command
is being used to reset an online
limit. There is no difference
between online and total file
usage.
t or total Specifies that the samquota command
is being used to reset a total
limit. There is no difference
between online and total file
usage.
If no scope is specified both the
online and total limits are set.
Example. The following command line sets a soft
limit of 120 files for user martha in file system
qfs222:
samquota -U martha -b 120:s /qfs222
-g Returns group quota statistics for file. This
option is not allowed in combination with the -G
option or any of the setting options.
-h Provides a brief usage summary.
-i Zeros all limits. This option reinitializes the
quota specifications by clearing all fields in the
quota records except the in-use fields. It then
resets the fields to conform to the new
specifications on the command line.
-k Specifies that the command interpret or display
all storage units (block quantities) in units of
1024-byte blocks. When specified, all information
on the command line is assumed to be in units of
1024 bytes, and all information is returned in
multiples of 1024 bytes.
Example 1. The following command line specifies a
hard quota limit of 256,000 1024-byte blocks (or,
equivalently, 512,000 512-byte blocks) for group
adm, in file system qfs4:
samquota -G adm -k -b 256k:hard /qfs4
Example 2. The following command line sets a soft
limit of 120 1024-byte blocks (or, equivalently,
240 512-byte blocks) to be occupied by the files
for user fred in file system qfs2:
samquota -U fred -k -b 120:soft /qfs2
-p Writes updated quota statistics to stdout if you
are changing preestablished quota values or
limits.
-t interval:scope
Specifies the time to be used for the soft limit
grace periods.
interval specifies the interval to use for the
grace periods. By default, the integer specified
for interval is interpreted in units of seconds.
You can append a unit multiplier to the interval
value, however, to force the system to interpret
interval as a larger unit. These unit multipliers
are as follows:
Multiplier Interpretation
w Specifies weeks. For example,
specifying 10w is interpreted as
ten weeks.
d Specifies days.
h Specifies hours.
m Specifies minutes.
s (default) Specifies seconds.
The interval must be an integer number in the
following range:
0 < interval < (2**31) - 1.
Note that (2**31) - 1 = 2,147,483,647, which means
that the maximum specification, in seconds, would
be 2147483647, which is about 68 years.
Example. The following command line specifies an
interval of 7 days and 12 hours for the online and
total grace periods of user adele in the myqfs
file system:
samquota -U adele -t 7d12h /myqfs
-u Returns user quota statistics for the owner of
file. This option is not allowed in combination
with the -U option or any of the setting options.
-w Suppresses messages. By default, samquota
generates warning messages and requests
confirmation before changing any quota values
maintained by the system. When this option is
specified on the command line in conjunction with
the -b, -f, or -x options, it suppresses both the
warning messages and the confirmation requests.
-x action:scope
Adjusts the soft limit grace period timers. After
a user reaches a soft limit, a certain amount of
time can elapse before a user is not allowed to
create any more files in the file system. This
option allows you to override the existing quota
mechanism and temporarily respecify the
consequences of having reached the soft limit.
action specifies what to do with the grace period
timer. Note that the soft limit grace period is
set with the -t option. Possible action
specifications are as follows:
action Interpretation
clear Specifies that the current grace
period be ended and the grace
period counter be reset to zero.
The grace period counter is
restarted the next time a file or
block is allocated.
reset Specifies that the current grace
period be ended and that the grace
period counter be restarted
immediately.
expire Specifies that the current grace
period be ended and that no new
files or blocks be allocated until
the user, group, or admin set frees
blocks and/or files and is again
under the soft limit.
interval interval specifies the interval to
use for the grace period.
Specifying an interval sets the
grace period to expire at a new
time. The interval must be an
integer number in the following
range:
0 < interval < (2**31) - 1.
Note that (2**31) - 1 =
2,147,483,647, which means that the
maximum specification, in seconds,
would be 2147483647, which is about
68 years.
The timer is set to the given
value, and starts counting
immediately. If the quota goes
under the soft limit, it will be
reset to zero at that time.
By default, the integer specified
for interval is interpreted in
units of seconds. You can append a
unit multiplier to the interval
value, however, to force the system
to interpret interval as a larger
unit, and can concatenate these
units. These unit multipliers are
as follows:
Multiplier Interpretation
w Specifies weeks
(times 7*24*60*60).
For example,
specifying 10w is
interpreted as ten
weeks or
10*7*24*60*60
seconds.
d Specifies days
(times 24*60*60).
h Specifies hours
(times 60*60).
m Specifies minutes
(times 60).
s (default) Specifies seconds.
Example. Admin set pubs is over its soft limit on
file system qfs50, and its grace period has
expired. You can reset the grace periods by using
the following command:
samquota -x 1d2h -A pubs /qfs50
If the preceding command is executed at 1100 on
Thursday, the grace period for pubs is reset to
expire at 1300 on Friday.
-A adminsetID
Generates a quota report for an admin set, or,
when specified in conjunction with options that
reset values, resets the values for the admin set
specified. Specify an integer for the adminsetID.
-G groupID
Generates a quota report for a group, or when
specified in conjunction with options that reset
values, resets the values for the group specified.
Specify an integer identifier or a group name for
the groupID.
-O Lists only online values in reports. The default
is to list both online and total values.
-U userID Generates a quota report for a user, or, when
specified in conjunction with options that reset
values, resets the values for the user specified.
Specify an integer identifier or a user name for
the userID.
file Specifies that the quota information pertain to a
specific file. A user is allowed to examine the
group, user, or admin set quotas of any file for
which the user has write permissions. The
information displayed differs depending on whether
or not the command is issued by a user who has
write permission to file, as follows:
o If the user issuing this command has write
permission to file, the command generates
information on the applicable admin set, group,
and user quotas that apply to file.
o If the user issuing this command does not have
write permission to file, the command generates
information for only the user's user ID and
group ID quotas for the file system on which
file resides.
EXAMPLES
Example 1. The following command initializes a quota for
group sam on the file system mounted on /qfs1:
server# samquota -G sam -f 1000:s -f 1200:h -b 100k:s -b 120k:h -t 1d /qfs1
The group is given the following:
o Soft limits of 1000 files and 100,000 512-byte blocks
(about 50 megabytes)
o Hard limits of 1200 files and 120,000 512-byte blocks
o A grace period of 1 day (24 hours)
Example 2. The following example initializes a quota for
admin set 17 on the file system that /qfs1/sol is part of:
server# samquota -A 17 -k -f 10k:s -f 20k:h -b 10m:s -b 15m:h -t 1w /qfs1/sol
The admin set is given the following:
o Soft limits of 10,000 files and 10,000,000 1024-byte
blocks (10.24 gigabytes)
o Hard limits of 20,000 files and 15,000,000 1024-byte
blocks (15.36 gigabytes)
o A grace period of 1 week (168 hours)
EXIT STATUS
This command returns the following:
o 0 on successful completion.
o 1 on a usage or argument error.
o 10 on an execution error.
FILES
filesytem/.quota_a Admin set quota information
filesystem/.quota_g Group quota information
filesystem/.quota_u User quota information
SEE ALSO
squota(1)
samfsck(1M)
passwd(4) - User ID information
group(4) - Group ID information
DIAGNOSTICS
No user quota entry.
User quotas are not active on the file system.
No group quota entry.
Group quotas are not active on the file system.
No admin quota entry.
Admin set quotas are not active on the file system.
Sun Microsystems Last change: 12 Jan 2004
Maintenance Commands samquotastat(1M)
NAME
samquotastat - Reports on active and inactive file system
quotas
SYNOPSIS
samquotastat [-a] [-g] [-h] [-u] file
AVAILABILITY
SUNWsamfs
SUNWqfs
DESCRIPTION
The samquotastat command reports whether user, group, or
admin set quotas are enabled on the file system that
contains file. If only the file argument is specified,
output is generated as if the -a, -g, and -u arguments had
all been specified. This command accepts the following
arguments:
-a Generates information on admin set quotas.
-g Generates information on group quotas.
-h Generates a brief usage summary.
-u Generates information on user quotas.
file Specify either a specific file name, a path to a
file, or the file system mount point. If a file
name or path to a file is specified, the command
generates the report for the file system in which
the file resides.
EXAMPLES
server% samquotastat /qfs1
admin quota enabled
group quota enabled
user quota disabled
EXIT STATUS
This command exits with a status of zero if any queried
quota types are enabled.
SEE ALSO
squota(1).
samquota(1M), samfsck(1M).
NOTES
Sun Microsystems Last change: 23 Apr 2003
Maintenance Commands samset(1M)
NAME
samset - Change the Sun StorEdge SAM-FS or Sun SAM-QFS
environment
SYNOPSIS
samset [keyword [parameter...]]
AVAILABILITY
SUNWsamfs
DESCRIPTION
samset is used to change or display variables that control
Sun StorEdge SAM-FS or Sun SAM-QFS operation. Without any
arguments, samset displays current settings to stdout. If
samset is executed with a keyword but with no parameter...,
then the current value for just that keyword is displayed to
stdout.
The keywords all have values assigned to them at startup.
These values come from the defaults.conf file. samset
allows you to change keywords while sam-fsd is running. Any
changes made remain effective only during the current
instance of sam-fsd; values revert to the defaults in
defaults.conf at the next startup.
The following keywords are supported:
attended yes
attended no
attended tells the Sun StorEdge SAM-FS or Sun
SAM-QFS library daemon if an operator is available
to manually mount media. Regardless of the
attended setting, requests for media which are
mounted in a drive, or present in a media changer,
will be satisfied as soon as possible. attended
affects the behavior of Sun StorEdge SAM-FS or Sun
SAM-QFS library daemon when a medium is requested
which is not currently present in either a manu-
ally mounted drive, or in a library. The usual
action taken by the library daemon when such a
request occurs is to place it into the preview
display (see samu (1M)), and await manual inter-
vention (but see stale_time, below). However, if
either attended is set to no, or the medium is
marked "unavailable" in the historian catalog,
then the request will not go into the preview
display, and will fail with an ESRCH error. If
other archive copies are available, they will be
tried. If no further copies are available, ENXIO
will be returned to the requester.
exported_media +u eq...
exported_media -u eq...
This option controls the flagging of media
exported (see export(1M)) from the listed
libraries as unavailable (+u) or available (-u) in
the historian's catalog. See attended, above, for
the effect of this flag. The setting of the flag
for a given medium may be changed after export
using chmed.
idle_unload
This is the time (in seconds) that a media changer
controlled device may be idle before the media in
that device is unloaded. A value of zero will
disable this feature.
labels label-option
This option applies only to barcode-reader
equipped tape libraries.
The media daemon can obtain the tape label from
the upper-cased characters of the tape's barcode.
label-option may be: barcodes, to use the first
six characters of the barcode as label;
barcodes_low, to use the trailing six characters;
or read, to disable barcode processing and to read
the magnetic label from the tape.
When labels is set to barcodes or barcodes_low,
any tape robotically mounted for a write operation
that is write enabled, unlabeled, has never been
mounted before, and has a readable barcode will
have a magnetic label written before the write is
started.
stale_time minutes
Sets the amount of time (in minutes) that a
request for media will wait in the preview table
before being canceled with an ETIME. The file
system will react to an ETIME error in the same
way as an ESRCH error (see attended, above).
timeout seconds
Sets the time (in seconds) that will be allowed to
elapse between I/O requests for direct access to
removable media (see request(1)). If a process
fails to issue the next I/O to the device within
this time, the device will be closed and, on the
next I/O, the process will receive an ETIME error.
A value of 0 implies no timeout will occur.
debug debug manipulates the debug/trace flags within Sun
StorEdge SAM-FS or Sun SAM-QFS environments to
produce expanded logging. Unless otherwise speci-
fied, the debug messages are logged to the syslog
facility at the LOG_DEBUG priority. parameter...
is a space separated list of flags. To set a
flag, give its name. To clear a flag, give its
name prefixed with a '-'. The flags are:
all Turn on all debug flags (except
trace_scsi and robot_delay).
none Turn off all debug flags.
default Set all debug flags to the default as
defined by defaults.conf.
logging File system requests to the daemons and
the daemons response to the requests are
logged to files. These files are used
only by Sun Microsystems support.
debug This is catch-all for messages that
might be of interest but generally do
not show a problem.
moves Log move-media commands issued to media
changers.
events This should only be used by Sun
Microsystems analysts to trace the flow
of events used by the media changer dae-
mons. These messages are coded and of
little use in the field. These messages
are logged to syslog at LOG_NOTICE
priority.
timing This setting has been replaced by the
device log timing event devlog eq [
event ...]. This is described in more
detail under the devlog keyword.
od_range For optical disk media, log the range of
sectors allowed for writing.
labeling Log the VSN, blocksize (for tape media
only), and label date when a label is
read from a medium following the media's
being mounted. These messages are
logged to syslog at LOG_INFO priority.
canceled Log when the stage process detects a
canceled stage request.
disp_scsi Display the current SCSI cdb being exe-
cuted by a device. This information is
appended to any existing message. If
the length of the existing message and
the cdb would overflow the message area,
the cdb is not displayed. The message
area for a device can be viewed with
samu (see samu(1M)) in the "s" or "r"
displays.
messages This is used by Sun Microsystems
analysts to trace the flow of messages
used by the media changer daemons.
These messages are coded and of little
use to customers. These messages are
logged to syslog at LOG_NOTICE priority.
migkit Log events connected with the Sun Sam
Migration Toolkit.
mounts Log media mount requests.
opens Log open and close of removable media
devices.
trace_scsi
This option may only be set by the super
user through the samset command. It
causes all scsi commands issued through
the user_scsi interface to be written to
a file named /tmp/sam_scsi_trace_xx
(where xx is the equipment number of
either the media changer to which this
device belongs or the device itself if
it does not belong to a media changer.)
The trace file is opened with O_APPEND
and O_CREAT on the next I/O to each dev-
ice after this flag is set. It is
closed when the option is cleared and
the next I/O to that device occurs. Sun
Microsystems does not recommend running
with this option for long periods. The
format of the trace information is:
struct {
int eq; /* equipment number */
int what; /* 0 - issue, 1 - response */
time_t now; /* unix time */
int fd; /* the fd the ioctl was issued on */
char cdb[12]; /* the cdb */
char sense[20]; /* returned sense(valid if what=1) */
}cdb_trace;
Sun Microsystems does not recommend set-
ting this option indiscriminately, as
large output files are quickly produced.
stageall This should be used only by Sun
Microsystems analysts to trace stageall
processing.
devlog eq [ event ...]
devlog manipulates the device log event flags for
device eq. eq is either an equipment ordinal or
"all"; if "all", then the flags are set or listed
for all devices. These flags control which events
get written to the device log files. [ event ...]
is a space separated list of event names. To set
an event flag, give its name. To clear a flag,
give its name prefixed with a '-'. The events
are:
all Turn on all events.
none Turn off all events.
default Set the event flags to the default which
are: err, retry, syserr, and date.
detail events which may be used to track the
progress of operations.
err Error messages.
label Labeling operations.
mig Migration toolkit messages.
msg Thread/process communication.
retry Device operation retries.
syserr System library errors.
time Time device operations.
module Include module name and source line in
messages.
event Include the event name in the message.
date Include the date in the message.
tapealert eq [on|off|default]
tapealert allows the user to enable or disable
support for device implemented TapeAlert.
eq is either an equipment ordinal or "all";
if "all", then the flags are set or
listed for all devices.
on Enable TapeAlert if the device supports
it.
off Disable requesting TapeAlert information
from the device.
default Return TapeAlert to the factory setting.
sef eq [on|off|default] interval
sef allows the user to enable or disable support
for tape drive implemented Log Sense delivered via
sysevents.
eq is either an equipment ordinal or "all";
if "all", then the flags are set or
listed for all devices.
on Enable requesting tape drive Log Sense
sysevents if the drive supports it.
off Disable requesting tape drive Log Sense
sysevents.
default Return tape drive Log Sense sysevents to
the factory setting.
interval Tape drive Log Sense polling interval in
seconds. A value of 300 is a polling
interval once every five minutes. A
string value of "once" specifies one
time just before media unload and is the
default. A value of 3600 is a polling
interval once every hour. The smallest
polling interval is five minutes.
SEE ALSO
request(1), chmed(1M), export(1M), samu(1M),
defaults.conf(4), mcf(4), tapealert(1M), sefsysevent(4).
NOTES
A complete description of SEF sysevents is in the Sun
StorEdge SAM-FS Storage and Archive Management Guide.
Sun Microsystems Last change: 02 Jun 2004
Maintenance Commands samsharefs(1M)
NAME
samsharefs - Manipulates the Sun StorEdge QFS shared file
system configuration
SYNOPSIS
samsharefs [-h] [-q] [-R] [-s host] [-u] fs_name
AVAILABILITY
SUNWsamfs
SUNWqfs
DESCRIPTION
The samsharefs command prints and modifies the host
configuration for a Sun StorEdge QFS shared file system.
The printed hosts configuration identifies the metadata
server and the client hosts included in the Sun StorEdge QFS
shared file system. This command is only valid from the
metadata server or potential metadata server.
You create an initial hosts configuration file using vi(1)
or another text editor. The sammkfs(1M) command reads this
initial hosts configuration from
/etc/opt/SUNWsamfs/hosts.fs_name when the Sun SAM-QFS shared
file system is created.
To subsequently change the host configuration you must use
the samsharefs command. Typically, you use an editor to
edit the ASCII hosts configuration as printed by the
samsharefs command and use the samsharefs command to update
the file system host configuration.
OPTIONS
This command accepts the following options:
-h Writes a short usage message to stdout.
-q Suppresses host configuration output. By default,
the command writes the file system host
configuration, possibly modified, to stdout.
-R Specifies that the file system's host
configuration should be manipulated using the raw
disk device associated with the file system,
rather than the file system interfaces. This
option can be used to change hosts information
when the file system is not or cannot be mounted.
This option can also be used to change hosts
information when the file system is mounted, but
the active metadata server is down.
CAUTION: This option must not be executed on a
potential metadata server to change the metadata
server host without first stopping, disabling, or
disconnecting the active metadata server. Doing
so will cause file system corruption.
-s host Sets the server flag for the specified host in the
system configuration. This option declares host
to be the new metadata server host. All other
hosts's server flags are cleared.
-u Specifies that the file system's configuration is
to be updated from
/etc/opt/SUNWsamfs/hosts.fs_name. When updating
the configuration of a mounted file system, new
host entries can only be added to the end of the
existing configuration. If the server or any
host's position differs between hosts.fs_name and
the active configuration (i.e., the order of the
hosts is changed), the command issues an error
message and exits; changing these characteristics
can be done safely only on an idle, unmounted file
system. (See the -R option.)
fs_name Specifies the family set name of the Sun StorEdge
QFS shared file system.
EXAMPLES
Example 1. The following example shows how to use the
samsharefs to examine the hosts information on a mounted Sun
StorEdge QFS shared file system:
tethys# samsharefs share1
#
# Host file for family set 'share1'
#
# Version: 4 Generation: 14 Count: 3
# Server = host 0/titan, length = 112
#
titan titan.xyzco.com 1 0
tethys tethys.xyzco.com 2 0
mimas mimas.xyzco.com 0 0
Example 2. The following example shows how the hosts
configuration can be modified to add new hosts to the shared
file system. The administrator has edited
/etc/opt/SUNWsamfs/hosts.share1 and added new hosts for the
shared file system as shown. samsharefs is then run with
the -u option to update the (mounted) file system's
configuration.
titan# samsharefs share1
#
# Host file for family set 'share1'
#
# Version: 4 Generation: 14 Count: 3
# Server = host 0/titan, length = 112
#
titan titan.xyzco.com 1 0
tethys tethys.xyzco.com 2 0
mimas mimas.xyzco.com 0 0
titan# cat /etc/opt/SUNWsamfs/hosts.share1
#
# New share1 config, adds dione and rhea
#
titan titan.xyzco.com 1 0 server
tethys tethys.xyzco.com 2 0
mimas mimas.xyzco.com 0 0
dione dione.xyzco.com 0 0
rhea rhea.xyzco.com 0 0
titan# samsharefs -u share1
#
# Host file for family set 'share1'
#
# Version: 4 Generation: 15 Count: 5
# Server = host 0/titan, length = 162
#
titan titan.xyzco.com 1 0
tethys tethys.xyzco.com 2 0
mimas mimas.xyzco.com 0 0
dione dione.xyzco.com 0 0
rhea rhea.xyzco.com 0 0
Example 3. The following example shows how the hosts
configuration can be modified to change the Sun StorEdge QFS
shared file system server while the file system is mounted.
tethys# samsharefs -s tethys share1
#
# Host file for family set 'share1'
#
# Version: 4 Generation: 16 Count: 5
# Server = host 0/titan, length = 162
# Pending Server = host 1/tethys
#
titan titan.xyzco.com 1 0
tethys tethys.xyzco.com 2 0
mimas mimas.xyzco.com 0 0
dione dione.xyzco.com 0 0
rhea rhea.xyzco.com 0 0
Example 4. The following example shows how the hosts
configuration can be modified to add a new Sun StorEdge QFS
shared file system server. Because the new server's entry
is being inserted into the existing list rather than
appended to the end, the file system must be unmounted on
all hosts before executing this command, and the -R option
must be specified. Note also that this command changes the
file system server back to titan (from tethys).
tethys# samsharefs -R share1
#
# Host file for family set 'share1'
#
# Version: 4 Generation: 17 Count: 5
# Server = host 1/tethys, length = 162
#
titan titan.xyzco.com 1 0
tethys tethys.xyzco.com 2 0
mimas mimas.xyzco.com 0 0
dione dione.xyzco.com 0 0
rhea rhea.xyzco.com 0 0
tethys# cat /etc/opt/SUNWsamfs/hosts.share1
#
# New share1 config, adds server iapetus
#
titan titan.xyzco.com 1 0 server
tethys tethys.xyzco.com 2 0
iapetus iapetus.xyzco.com 3 0
mimas mimas.xyzco.com 0 0
dione dione.xyzco.com 0 0
rhea rhea.xyzco.com 0 0
tethys# samsharefs -u -R share1
#
# Host file for family set 'share1'
#
# Version: 4 Generation: 18 Count: 6
# Server = host 0/titan, length = 192
#
titan titan.xyzco.com 1 0
tethys tethys.xyzco.com 2 0
iapetus iapetus.xyzco.com 3 0
mimas mimas.xyzco.com 0 0
dione dione.xyzco.com 0 0
rhea rhea.xyzco.com 0 0
FILES
The hosts configuration for a Sun StorEdge QFS shared file
system is initialized from:
/etc/opt/SUNWsamfs/hosts.fs_name
This file is used at the time of file system creation by
sammkfs(1M) and subsequently when the -u option is specified
to samsharefs(1M).
NOTE
In Sun SAM-QFS shared file system environments, archiving
operations should be stopped on the metadata server before
changing the metadata server.
CAUTION
The -R option must not be used on a mounted file system to
change the metadata server host without first stopping,
disabling, or disconnecting the active metadata server and
ensuring that it is restarted before accessing the file
system again. Doing so will cause file system corruption.
SEE ALSO
sammkfs(1M).
Sun Microsystems Last change: 1 Dec 2004
Maintenance Commands samsnoop(1M)
NAME
samsnoop - Sun StorEdge QFS version of snoop
SYNOPSIS
samsnoop [-aCDNPSvV] [-t [r | a | d ] [ -c maxcount ]
[ -d device ] [ -i filename ] [ -n filename ]
[ -o filename ] [ -p first [ , last ] ] [ -s snaplen ]
[ -x offset [ , length ] ] [ expression ]
AVAILABILITY
SUNWsamfs
DESCRIPTION
samsnoop is a version of snoop(1M) modified to capture and
display packets from the Sun StorEdge QFS shared file sys-
tem. The arguments are identical to those of snoop(1M).
SEE ALSO
snoop(1M)
Sun Microsystems Last change: 03 Apr 2002
Maintenance Commands samstorade(1M)
NAME
samstorade - StorADE API
SYNOPSIS
samstorade [-r hostname] [-t timeout] [-s xml_message] [-d]
AVAILABILITY
SUNWsamfs
DESCRIPTION
The samstorade program is a XML interface for the Sun
StorADE (Storage Automated Diagnostic Environment) program
to access SAM-QFS attributes and health information.
The XML interface uses messages contained in the message DTD
/opt/SUNWsamfs/doc/message.dtd.
OPTIONS
The samstorade command can be customized with the following
options:
-r hostname
Specifies remote SAM-QFS host to query. The
default hostname is "localhost".
-t timeout
Specifies response timeout in milliseconds. The
default timeout value is 5 seconds.
-s xml_message
Specifies a valid XML message defined by the
message DTD /opt/SUNWsamfs/doc/message.dtd that is
sent to the sam-amld daemon. An example message
that can be sent is .
-d This is the default behavior for the samstorade
command. The /opt/SUNWsamfs/doc/message.dtd
message wrapper is removed returning the
/opt/SUNWsamfs/doc/samfm.dtd message payload.
FILES
/opt/SUNWsamfs/sbin/samstorade
/opt/SUNWsamfs/doc/message.dtd
/opt/SUNWsamfs/doc/samfm.dtd
/opt/SUNWsamfs/doc/pkg.mod
/opt/SUNWsamfs/doc/devent.mod
SEE ALSO
StorADE, rasagent(1M),
Sun Microsystems Last change: 23 Jun 2004
Maintenance Commands samtrace(1M)
NAME
samtrace - Dumps the Sun StorEdge QFS, Sun StorEdge SAM-FS,
or Sun SAM-QFS trace buffer
SYNOPSIS
samtrace [ -d corefile -n namelist ] [ -s ] [ -v ] [ -V ] [
-f ]
samtrace -k suffix [ -s ] [ -v ] [ -V ] [ -f ]
samtrace -O file
samtrace -I file [ -f ]
samtrace -c file [ -b bufs ] [ -p secs ] [ -T ticks ]
samtrace -i file [ -f ]
AVAILABILITY
SUNWqfs
SUNWsamfs
DESCRIPTION
samtrace dumps the contents of the trace buffer for the
mounted file system.
OPTIONS
-b bufs
When used with the -c option, this sets the number of
per-CPU trace read buffers allocated by samtrace to
bufs. The value of bufs must be at least 3, and must
be no more than 64. The default is 5.
-c file
Trace entries are continuously copied from the live
kernel into file until the command is killed. Periodi-
cally, file is written with the binary contents of the
kernel trace buffer; the kernel trace buffer's contents
are cleared after each copy is made. The entries in
file are written in time order, oldest first. This
option and its flags may be unavailable on some older
Linux versions.
-d corefile
The name of the corefile containing an image of the
system memory. If no corefile is specified the default
is to use the /dev/mem or /dev/kmem file from the run-
ning system.
-n namelist
The name of the namelist file corresponding to the
corefile. If none is specified the default is to use
/dev/ksyms from the running system.
-k suffix
Indicates that the corefile and namelist have the names
'vmcore.suffix' and 'unix.suffix', respectively.
-i file
file must be a file created with the -c continuous
trace option. samtrace reads file and writes a read-
able copy of the binary records in file to the standard
output.
-I file
file must be a file created with the -O trace option.
samtrace reads file and writes a sorted, readable copy
of the binary records in file to the standard output.
-O file
The system trace buffers are copied to file. This file
can later be translated for human interpretation with
the -I option.
-p secs
When used with the -c option, sets an alarm signal for
secs seconds after samtrace starts. This allows for
automatic termination of continuous samtrace operation.
-s Dumps the sam-amld command queue. Includes -v output.
-T ticks
When used with the -c option, sets the default interval
between reads of the kernel trace buffer to ticks
scheduler ticks. The contents of the kernel trace
buffers are by default copied to a samtrace buffer
whenever the trace buffer fills half-way, or 100 ticks
(1 second) has passed, whichever occurs first.
-v Verbose option, excluding inode free and hash chains.
-V Verbose option, including inode free and hash chains.
Includes -v output.
-f Decodes flag bits in the trace output.
NOTE
samtrace is a utility that is used to provide Sun Microsys-
tems analysts with troubleshooting information. It is not
intended for general use at your site.
FILES
/dev/kmem Special file that is an image of the
kernel virtual memory of the computer.
/dev/mem Special file that is an image of the
physical memory of the computer.
/dev/ksyms Character special file of kernel sym-
bols.
Sun Microsystems Last change: 9 May 2006
Maintenance Commands samu(1M)
NAME
samu - Sun StorEdge QFS and Sun StorEdge SAM operator util-
ity
SYNOPSIS
samu [-d c] [-r i] [-c string] [-f cmd-file]
AVAILABILITY
SUNWqfs
SUNWsamfs
DESCRIPTION
samu is a full screen operator interface for Sun StorEdge
QFS and Sun StorEdge SAM environments. It has a number of
displays that show the status of file systems and devices
and allows the operator to control file systems and remov-
able media devices.
OPTIONS
-d c Specifies the initial display when samu starts
execution. See DISPLAYS below.
-r i Specifies the time interval in seconds for
refreshing the display window.
-c string Specifies an initial command string that should be
executed when samu starts execution.
-f cmd-file
Specifies a file from which to read samu commands.
Each line in the file is a command.
CONTROL KEYS
The following "hot" keys are available for all displays:
q Quit
: Enter command
space Refresh display
control-l Refresh display (clear)
control-r Enable/disable refresh (default is enabled)
The following keys perform the listed functions for each of
the displays shown:
Key Function Display
control-f Next file system :a,a,g
Page forward c,h,o,p,s,t,u,v,w,A,J,K,M,P
Next stage request n
Next inode I
Next sector S
Next equipment T,U
Next filesystem N
control-b Previous file system :a,a,g
Page backward c,h,o,p,s,t,u,v,w,A,J,K,M,P
Previous stage request n
Previous inode I
Previous sector S
Previous equipment T,U
Previous filesystem N
control-d Half-page forward c,p,s,u,w,A,J,M
Next robot catalog v
Page forward g,h,S
Page arcopies forward a
Page stage queue forward n
Page partitions forward N
control-u Half-page backward c,p,s,u,w,A,J,M
Previous robot catalog v
Page backward g,h,S
Page arcopies backward a
Page stage queue backward n
Page partitions backward N
control-k Advance display format A,I,S
Select (manual,robotic,both,priority) p
Advance sort key v
Toggle path display n,u,w
control-i Detailed (2-line) display format v,D
Detailed status interpretations g,n,N
1-7 Select sort key v
/ Search for VSN v
% Search for barcode v
$ Search for slot v
The sort selections for the v display are: 1 slot, 2 count,
3 usage, 4 VSN, 5 access time, 6 barcode, 7 label time.
DISPLAYS
The following displays are available. Those displays marked
with '*' are the only ones available for Sun StorEdge QFS.
Those displays marked with @ are additionally available in
Sun StorEdge SAM environments. All others are available in
Sun StorEdge SAM environments only if samd start has been
executed.
a@ Display archiver status
c Display configuration C Memory
d* Display tracing info. D Display disk volume dictionary
f* Display filesystem info. F Optical disk label
g* Display client information
h* Display help information
l@ Display usage information I* Inode
m* Display mass-storage status J Preview shared memory
n@ Display staging activity K Kernel statistics
o Display optical disk status L Shared memory tables
p Display mount request preview M Shared memory
r Display removable media N* File system parameters
s Display device status summary P Active Services
t Display tape status R SAM-Remote info
u Display stage queue S Sector data
v Display robot VSN catalog T SCSI sense data
w Display pending stage queue U Device table
COMMANDS
The following commands may be entered after a colon (:).
Archiver commands:
aridle [ dk | rm | fs.fsname ] Idle archiving
arrerun Soft restart archiver
arrestart Restart archiver
arrmarchreq fsname.[* | archreq] Remove ArchReq
arrun [ dk | rm | fs.fsname ] Start archiving
arscan fsname[.dir | ..inodes][int] Scan filesystem
arstop [ dk | rm | fs.fsname ] Stop archiving
artrace [fs.fsname] Trace archiver
Display control commands:
refresh i Set refresh time
a filesystem Select detailed "a" display
n media Set n display media selection
p media Set p display media selection
r media Set r display media selection
u media Set u display media selection
v eq Set v display robot catalog
w media Set w display media selection
Device commands:
devlog eq [option ...] Set device logging options
idle eq Idle equipment
off eq Off equipment
on eq On equipment
readonly eq Mark equipment read-only
ro eq Mark equipment read-only
unavail eq Mark equipment unavailable
unload eq Unload mounted media/magazine
File System commands - miscellaneous:
stripe eq value Set stripe width
suid eq Turn on setuid capability
nosuid eq Turn off setuid capability
sync_meta eq value Set sync_meta mode
atime eq value Set access time (atime) update mode
trace eq Turn on file system tracing
notrace eq Turn off file system tracing
grow eq Add eq to mounted file system
shrink eq1 [eq2] Remove eq1; move to eq2 if specified
release eq Remove eq and mark files offline
alloc eq Enable allocation on partition
noalloc eq Disable allocation on partition
def_retention eq interval Set default WORM retention time
File System commands - Sun StorEdge SAM Commands:
hwm_archive eq Turn on hwm archiver start
nohwm_archive eq Turn off hwm archiver start
maxpartial eq value Set maximum partial size in kilobytes
partial eq value Set size to remain online in kilobytes
partial_stage eq value Set where to start staging if partial
stage_flush_behind eq value Set stage flush behind size in kilobytes
stage_n_window eq value Set direct stage size in kilobytes
stage_retries eq value Set number of stage retries
thresh eq high low Set high and low release thresholds
File System commands - I/O:
dio_rd_consec eq value Set number of consecutive dio reads
dio_rd_form_min eq value Set size of well-formed dio reads
dio_rd_ill_min eq value Set size of ill-formed dio reads
dio_wr_consec eq value Set number of consecutive dio writes
dio_wr_form_min eq value Set size of well-formed dio writes
dio_wr_ill_min eq value Set size of ill-formed dio writes
flush_behind eq value Set flush behind value in kilobytes
forcedirectio eq Turn on directio mode
noforcedirectio eq Turn off directio mode
force_nfs_async eq Turn on NFS async
noforce_nfs_async eq Turn off NFS async
readahead eq value Set maximum readahead in kilobytes
writebehind eq value Set maximum writebehind in kilobytes
sw_raid eq Turn on software RAID mode
nosw_raid eq Turn off software RAID mode
wr_throttle eq value Set outstanding write size in kilobytes
abr eq Enable Application Based Recovery
noabr eq Disable Application Based Recovery
dmr eq Enable Directed Mirror Reads
nodmr eq Disable Directed Mirror Reads
dio_szero eq Turn on dio sparse zeroing
nodio_szero eq Turn off dio sparse zeroing
File System commands - Sun StorEdge QFS:
mm_stripe eq value Set meta stripe width
qwrite eq Turn on qwrite mode
noqwrite eq Turn off qwrite mode
File System commands - multireader:
invalid eq interval Set multireader invalidate cache delay
refresh_at_eof eq Turn on refresh at eof mode
norefresh_at_eof eq Turn off refresh at eof mode
File System commands - shared fs:
minallocsz eq value Set minimum allocation size
maxallocsz eq value Set maximum allocation size
meta_timeo eq interval Set shared fs meta cache timeout
mh_write eq Turn on multihost read/write
nomh_write eq Turn off multihost read/write
aplease eq interval Set append lease time
rdlease eq interval Set read lease time
wrlease eq interval Set write lease time
Robot commands:
audit [-e] eq[:slot[:side]] Audit slot or library. See auditslot(1M) for information on -e.
import eq Import cartridge from mailbox
export eq:slot Export cartridge to mailbox
export mt.vsn Export cartridge to mailbox
load eq:slot[:side] Load cartridge in drive
load mt.vsn Load cartridge in drive
priority pid newpri Set load priority for process 'pid'
Stager commands:
stclear mt.vsn Clear stage request
stidle Idle staging
strun Start staging
Miscellaneous commands:
clear vsn [index] Clear load request
diskvols volume [+flag | -flag] Set or clear disk volume dictionary flags
dtrace daemon[.variable] value Set daemon trace controls
fs fsname Set filesystem (N display)
mount mntpt Select a mount point (I, N displays)
open eq Open device (F, S displays)
read addr Read device
snap file Snapshot screen to file
!shell-command Run shell command
SEE ALSO
curses(3).
mcf(4).
Sun Microsystems Last change: 30 Apr 2007
Maintenance Commands samunhold(1M)
NAME
samunhold - Releases SANergy file holds
SYNOPSIS
/opt/SUNWsamfs/sbin/samunhold mntpoint
AVAILABILITY
SUNWqfs
SUNWsamfs
DESCRIPTION
The samunhold command can be used to release SANergy file
holds. These holds can be detected when attempts are made
to unmount a file system with the umount(1M) command. If
holds are present, the umount(1M) command generates log
messages such as the following:
Inode XXXX: held by SAN, refcnt = N
SANergy File Sharing uses the following two types of leases,
both of which require holds:
o Read leases, which typically expire within a few seconds.
o Write leases, which can extend for as long as an hour.
It is preferable to allow SANergy File Sharing to clean up
the leases, but in an emergency, or in case of a SANergy
File Sharing system failure, the administrator can use the
samunhold command to avoid a reboot.
The samunhold command should only be run when SANergy File
Sharing has held inodes and is preventing a file system from
being unmounted. Prior to executing this command, the
administrator should ensure the following:
o There are no SANergy applications running on any client,
possibly including the server itself.
o The file system in question is not fused on any SANergy
clients.
o The file system is not NFS mounted.
OPTIONS
The samunhold command releases all held inodes (files) on
the file system whose root directory is the named mntpoint
argument. The samunhold command must be run as root.
EXAMPLES
The following example shows the samunhold command:
bilbo# samunhold /sam1
bilbo# umount /sam1
SEE ALSO
umount(1M).
Sun Microsystems Last change: 22 Feb 2001
Maintenance Commands save_core.sh(1M)
NAME
save_core.sh - Sun StorEdge SAM-FS or Sun SAM-QFS sam-
robotsd(1M) exception notification script
SYNOPSIS
/etc/opt/SUNWsamfs/scripts/save_core.sh prg_name pid
severity msg_no msg
AVAILABILITY
SUNWsamfs
DESCRIPTION
The /etc/opt/SUNWsamfs/scripts/save_core.sh script is
executed by sam-robotsd(1M) after it encounters abnormal or
exceptional events. A site-specific version of this script
can be substituted in the installed location.
This script labels core files and prevents existing core
files from being overwritten as more are generated. As
released, /etc/opt/SUNWsamfs/scripts/save_core.sh renames
the sam-robotsd(1M) child core files to include the program
name, process ID, and date.
OPTIONS
The sam-robotsd(1M) daemon executes
/etc/opt/SUNWsamfs/scripts/save_core.sh with the following
arguments:
prg_name The name of the program that is calling this
script.
pid The process ID of the program that is calling this
script.
severity A keyword that identifies the severity and the
syslog level of the event. The keywords are as
follows: emerg, alert, crit, err, warning,
notice, info, and debug.
msg_no The message number as found in the message
catalog.
msg The text of the translated message string. This
script expects this message to be in a 2-field
format. The first field indicates the program
that caused the core dump. The second field is
the process ID of the program that caused the core
dump.
SEE ALSO
sam-robotsd(1M).
Sun Microsystems Last change: 12 Jan 2004
Maintenance Commands sam-scannerd(1M)
NAME
sam-scannerd - Sun StorEdge SAM-FS and Sun SAM-QFS daemon
for manually-mounted devices
SYNOPSIS
/opt/SUNWsamfs/sbin/sam-scannerd mshmid pshmid
AVAILABILITY
SUNWsamfs
DESCRIPTION
sam-scannerd monitors the manually-mounted devices. It will
periodically check each device for newly inserted media. If
sam-scannerd finds media in the device, it will scan it for
a label. If a label is found, it will check the preview
table to see if there are any requests for this media. If
requests are found, the Sun StorEdge SAM-FS or Sun SAM-QFS
file system is notified and the device is assigned to the
request.
sam-scannerd is started automatically by sam-amld if there
are any manually-mounted devices defined in the configura-
tion file. See mcf(4).
mshmid is the id of the master shared memory segment created
by sam-amld. pshmid is the id of the preview shared memory
segment created by sam-amld.
SEE ALSO
sam-amld(1M), mcf(4)
Sun Microsystems Last change: 21 Feb 2003
Maintenance Commands sefreport(1M)
NAME
sefreport - Displays the content of the System Error
Facility (SEF) log
SYNOPSIS
/opt/SUNWsamfs/sbin/sefreport [-v|-t] -d file
AVAILABILITY
SUNWsamfs
DESCRIPTION
The sefreport command reads the content of a Sun StorEdge
SAM-FS or Sun SAM-QFS SEF log file and writes its output to
stdout in a human-readable format. By default, the log file
is /var/opt/SUNWsamfs/sef/sefdata. The SEF log file
contains the data gathered from the log sense pages of
peripheral tape devices used by Sun StorEdge SAM-FS and Sun
SAM-QFS file systems. For more information on the SEF log
file, including its content and format, see the sefdata(4)
man page.
The sefreport command reads the input file specified by the
file argument. If no other options are specified, the
sefreport command examines the SEF log file and generates
the following information for each record contained in file:
o The first header line states the record number, which is
its ordinal position in the file.
o The second header line contains the timestamp of the
record, the vendor name of the device from which the log
sense data was received, the product name of the device,
the revision level of the device's firmware, the string
VSN, and the Volume Serial Name (VSN) of the volume
mounted in the device when the log sense data was
generated.
Following the header lines, the log sense data for each page
in the record is printed. For each log sense page, a line
identifying the page code is printed, followed by a line of
column headings. The data is then printed in three columns
per line with the following headings: parameter code,
control, and parameter value. All data is generated in
hexadecimal notation. For the meanings of the parameter
codes, control bits, and parameter values, see your vendor
documentation for the specific device.
OPTIONS
This command accepts the following options:
-d Includes additional device information. For each
record, the command generates a third header line that
identifies the equipment number of the device as
configured in the mcf file and the path name of the
device.
-t Generates log sense output with text descriptions. On
each line of log sense data output, an additional
string containing the equipment number, page code, VSN,
and parameter code description is printed. The -t
option is not used when the -v option is specified.
-v Generates verbose output. On each line of log sense
data output, an additional string containing the
equipment number, page code, and VSN is printed. This
string is enclosed in parentheses and the items are
colon-separated.
OPERANDS
This command accepts the following operand, which must be
specified:
file Specifies the SEF log file. The SEF log file can
be read from its default location
(/var/opt/SUNWsamfs/sef/sefdata) or it can be
redirected to another file for SEF processing.
EXAMPLES
Example 1. Assume that your system is set up to write SEF
values to file /var/opt/SUNWsamfs/sef/sefdata.mid. You have
entered the following command to write the SEF data using
the report formatter:
srvr# sefreport /var/opt/SUNWsamfs/sef/sefdata.mid > ~mydir/sef.short
The file ~mydir/sef.short is as follows:
Record no. 1
Mon Mar 26 11:17:48 2001 STK 9840 1.25 VSN 002981
PAGE CODE 2
param code control param value
00h 74h 0x0
01h 74h 0x0
02h 74h 0x0
03h 74h 0x0
04h 74h 0x0
05h 74h 0x40050
06h 74h 0x0
PAGE CODE 3
param code control param value
00h 74h 0x0
01h 74h 0x0
02h 74h 0x0
03h 74h 0x0
04h 74h 0x0
05h 74h 0x140
06h 74h 0x0
PAGE CODE 6
param code control param value
00h 74h 0x0
Record no. 2
Mon Mar 26 11:30:06 2001 STK 9840 1.25 VSN 002999
PAGE CODE 2
param code control param value
00h 74h 0x0
01h 74h 0x0
02h 74h 0x0
03h 74h 0x0
04h 74h 0x0
05h 74h 0x1400a0
06h 74h 0x0
PAGE CODE 3
param code control param value
00h 74h 0x0
01h 74h 0x0
02h 74h 0x0
03h 74h 0x0
04h 74h 0x0
05h 74h 0x190
06h 74h 0x0
PAGE CODE 6
param code control param value
00h 74h 0x0
<<>>
Example 2: Assume that you also need to produce a report
with additional data. You can use the same log file as in
Example 1, but you want this report to contain more
information than sef.short, so you invoke sefreport with the
-d and -v options. The following command is entered:
srvr# sefreport -d -v /var/opt/SUNWsamfs/sef/sefdata.mid > ~mydir/sef.long
The file ~mydir/sef.long is as follows:
Record no. 1
Mon Mar 26 11:17:48 2001 STK 9840 1.25 VSN 002981
Eq no. 32 Dev name /dev/rmt/1cbn
rec pg cd param code control param value
1 2 00h 74h 0x0 (32:2:002981)
1 2 01h 74h 0x0 (32:2:002981)
1 2 02h 74h 0x0 (32:2:002981)
1 2 03h 74h 0x0 (32:2:002981)
1 2 04h 74h 0x0 (32:2:002981)
1 2 05h 74h 0x40050 (32:2:002981)
1 2 06h 74h 0x0 (32:2:002981)
rec pg cd param code control param value
1 3 00h 74h 0x0 (32:3:002981)
1 3 01h 74h 0x0 (32:3:002981)
1 3 02h 74h 0x0 (32:3:002981)
1 3 03h 74h 0x0 (32:3:002981)
1 3 04h 74h 0x0 (32:3:002981)
1 3 05h 74h 0x140 (32:3:002981)
1 3 06h 74h 0x0 (32:3:002981)
rec pg cd param code control param value
1 6 00h 74h 0x0 (32:6:002981)
Record no. 2
Mon Mar 26 11:30:06 2001 STK 9840 1.25 VSN 002999
Eq no. 31 Dev name /dev/rmt/0cbn
rec pg cd param code control param value
2 2 00h 74h 0x0 (31:2:002999)
2 2 01h 74h 0x0 (31:2:002999)
2 2 02h 74h 0x0 (31:2:002999)
2 2 03h 74h 0x0 (31:2:002999)
2 2 04h 74h 0x0 (31:2:002999)
2 2 05h 74h 0x1400a0 (31:2:002999)
2 2 06h 74h 0x0 (31:2:002999)
rec pg cd param code control param value
2 3 00h 74h 0x0 (31:3:002999)
2 3 01h 74h 0x0 (31:3:002999)
2 3 02h 74h 0x0 (31:3:002999)
2 3 03h 74h 0x0 (31:3:002999)
2 3 04h 74h 0x0 (31:3:002999)
2 3 05h 74h 0x190 (31:3:002999)
2 3 06h 74h 0x0 (31:3:002999)
rec pg cd param code control param value
2 6 00h 74h 0x0 (31:6:002999)
<<>>
FILES
/var/opt/SUNWsamfs/sef/sefdata
The default system error facility log
file for Sun StorEdge SAM-FS and Sun
SAM-QFS file systems.
SEE ALSO
mcf(4), sefdata(4), sefsysevent(4).
Sun Microsystems Last change: 3 Apr 2001
Maintenance Commands sendtrap(1M)
NAME
sendtrap - Sun StorEdge SAM-FS Simple Network Management
Protocol (SNMP) trap notification script
SYNOPSIS
/etc/opt/SUNWsamfs/scripts/sendtrap
AVAILABILITY
SUNWsamfs
SUNWqfs
DESCRIPTION
The sendtrap script publishes Sun StorEdge SAM-FS SNMP trap
events. It is executed by the syseventd(1M) daemon when it
encounters abnormal or exceptional events including
tapealert(1M) events. The SNMP version supported is
SNMPv2c.
As released, sendtrap is a script that sends a trap to the
local host.
The syseventd(1M) daemon executes sendtrap as follows:
o It is invoked with 7 arguments if it is an archiver,
stager, releaser, recycler, or file system alert.
o It is invoked with 13 arguments if it is a tapealert(1M)
event.
The arguments used are as follows:
Argument Meaning
1 A keyword identifying the category of the alert
(archiver, stager, releaser, recycler, file
system, tapeAlert(1M), and so on).
2 The subcategory or specific type of alert. For
example, keywords such as CmdErr to express errors
in the command files, ReadWarning to express tape
drive read problems, and so on.)
3 The error type. This identifies the severity and
syslog level of the event, as follows:
Error Type Values
0 Emergency
1 Alert
2 Critical
3 Error
4 Warning
4 The message number as found in the message
catalog. For tapealert(1M) events, this is a
concatenation of the Manual type (SSC2/SMC2) and
the parameter code as found in the ANSI SCSI-3
SSC2 and SMC2 Manuals at www.t10.org.
5 The system identifier. That is, the host name of
the machine upon which the event originated.
6 The text of the translated message string.
7 The date and time when the event occurred.
8 The vendor name of the device. From SCSI INQUIRY.
Used only for tapealert(1M) events.
9 The product identity of the device. From SCSI
INQUIRY. Used only for tapealert(1M) events.
10 The revision number of the device. From SCSI
INQUIRY. Used only for tapealert(1M) events.
11 The device name. For example, /dev/rmt/3cbn.
Used only for tapealert(1M) events.
12 The Volume Serial Name (VSN) of the tape. Used
only for tapealert(1M) events.
13 The probable cause of the tape alert. Used only
for tapealert(1M) events.
Configuring SNMP
To enable SNMP reporting, perform the following steps:
1. Use vi(1) or another editor to open file
/etc/opt/SUNWsamfs/defaults.conf.
2. Edit the file so that the alerts=on directive appears.
3. Save and close the defaults.conf file.
4. Issue the samd(1M) config command to reconfigure the
sam-fsd(1M) daemon.
Modifying the Trap Destination Host
By default, traps are sent to port 161 of the localhost. To
change the port number or the hostname of the trap
destination, modify the TRAP_DESTINATION="hostname:port"
variable in this script.
This trap destination hostname must be declared in NIS on
/etc/hosts.
You can specify that traps be sent to multiple hosts.
Separate multiple hostname:port specifications with a space
character. For example:
TRAP_DESTINATION="localhost:161 doodle:163 mgmt_station:1162"
Modifying the SNMP Community String
To modify the SNMP community string, modify the value of the
COMMUNITY variable in this script. By default, the SNMP
community string is set to public.
SEE ALSO
sam-fsd(1M), samd(1M), syseventd(1M), tapealert(1M).
Sun Microsystems Last change: 18 Nov 2003
Maintenance Commands set_admin(1M)
NAME
set_admin - Sets administrator privileges for Sun StorEdge
SAM-FS and Sun SAM-QFS commands
SYNOPSIS
set_admin [ sam_admin_group ]
AVAILABILITY
SUNWsamfs
DESCRIPTION
set_admin changes the group and permissions of many of the
Sun StorEdge SAM-FS and Sun StorEdge QFS administrator
commands so they can be executed by users in a selected
administrator group. You must be logged in as root to
execute this command.
OPTIONS
This command accepts the following argument:
sam_admin_group
Specify the administrator group for the Sun
StorEdge SAM-FS and Sun StorEdge QFS administrator
commands. If you wish to change the administrator
group back to the default, specify bin as the
sam_admin_group. If you do not specify a
sam_admin_group, you are prompted to enter it.
NOTES
If you change the administrator group from the default
group, bin, and subsequently run the pkgchk(1M) command on
the the Sun StorEdge SAM-FS and Sun StorEdge QFS packages,
the pkgchk(1M) command issues ERROR messages for the
commands modified by set_admin(1M).
You can ignore these messages. The pkgchk(1M) command
issues them because it detects that the group name that is
associated with the commands is different from what it was
at installation time.
SEE ALSO
pkgchk(1M)
Sun Microsystems Last change: 30 Dec 2003
Maintenance Commands set_state(1M)
NAME
set_state - Set device state
SYNOPSIS
/opt/SUNWsamfs/sbin/set_state [ -w ] state eq
AVAILABILITY
SUNWsamfs
DESCRIPTION
set_state will change the state of a removable media device
eq to state. If -w is specified, the command will wait for
the operation to complete before terminating. Note:
set_state cannot be used to change a file system partition's
allocation state.
The valid states are:
on The device is usable by Sun StorEdge SAM-FS or Sun
SAM-QFS file systems. A device moving to the on
state will be unloaded if there is media mounted.
idle The device will not be selected for use by either
Sun StorEdge SAM-FS or Sun SAM-QFS
file systems. Any existing activity will be
allowed to complete. Once there is no more
activity, the device will be placed in the off
state.
unavail The device is unavailable for use by Sun StorEdge
SAM-FS and Sun SAM-QFS file systems and most Sun
StorEdge SAM-FS and Sun SAM-QFS commands. The only
valid commands for a device in this state are
load(1M), unload(1M), and set_state(1M). A device
moving to the unavail state will be unloaded if
there is media mounted.
off The device is unusable by Sun StorEdge SAM-FS and
Sun SAM-QFS file systems. A device moving to the
off state from on, idle or unavail will be unloaded
if there is media mounted. The only state a down
device may be moved to is off.
FILES
mcf The configuration file for Sun StorEdge
SAM-FS and Sun SAM-QFS environments.
SEE ALSO
load(1M), unload(1M), mcf(4), sam-robotsd(1M)
Sun Microsystems Last change: 01 Aug 2006
Maintenance Commands showqueue(1M)
NAME
showqueue - Display content of an archiver queue files
SYNOPSIS
/opt/SUNWsamfs/sbin/showqueue [-a] [-d] [-s] [-v] [-f]
[filesystem[ archreq ...]]
/opt/SUNWsamfs/sbin/showqueue [-d] [-v] -q archreq
AVAILABILITY
SUNWsamfs
DESCRIPTION
showqueue reads the archreq files named in the argument list
and prints the information.
If there are no names in the argument list, the scanlist and
all ArchReq files are printed for all mounted filesystems.
If there is only one name in the argument list, the scanlist
and all ArchReq files are printed for that filesystem.
Otherwise, print only the listed ArchReq files.
OPTIONS
-a ArchReqs. Print only ArchReqs.
-c Use the current working directory as the base for files
to display. Without this option, showqueue uses the
standard location for all archiver data
(/var/opt/SUNWsamfs/archiver/fs_name).
-d Debug. Print ArchReq structure fields with no
interpretation.
-f Follow. If not using -q, showqueue will not terminate
after printing the requested queue information, but
will enter an endless loop, wherein it sleeps for five
seconds and then repeats the command.
-q Print the ArchReq file archreq. archreq is the actual
name of the ArchReq. This option is provided to allow
the user to examine an ArchReq that is not under con-
trol of the archiver. For instance, when the ArchReq
is imported from another system.
-s Scanlist. Print only the scanlist.
-v Print information about each file to be archived in the
ArchReq files.
Example output for: showqueue -v samfs3
showqueue -v samfs3
Filesystem samfs3:
Scan list Examine: noscan
1 2004-11-26 08:03:33 b4827632 1___ 1 b4827632
2 2005-11-26 08:07:03 background full .
Archive requests
b4827632.1.0 create 2004-11-26 08:03:33
files:10 space: 30.005M flags: start
Start archive at 2004-11-26 08:13:33
type:f ino:1104 flags:00 space: 3.000M time:1048683783 priority:0
b4827632/file0
type:f ino:1105 flags:00 space: 3.000M time:1048683784 priority:0
b4827632/file1
type:f ino:1106 flags:00 space: 3.000M time:1048683785 priority:0
b4827632/file2
type:f ino:1107 flags:00 space: 3.000M time:1048683786 priority:0
b4827632/file3
type:f ino:1108 flags:00 space: 3.000M time:1048683786 priority:0
b4827632/file4
type:f ino:1109 flags:00 space: 3.000M time:1048683787 priority:0
b4827632/file5
type:f ino:1110 flags:00 space: 3.000M time:1048683788 priority:0
b4827632/file6
type:f ino:1111 flags:00 space: 3.000M time:1048683788 priority:0
b4827632/file7
type:f ino:1112 flags:00 space: 3.000M time:1048683789 priority:0
b4827632/file8
type:f ino:1113 flags:00 space: 3.000M time:1048683790 priority:0
b4827632/file9
The scanlist shows the following:
column
1 Scanlist entry number
2-3 Time to scan directory
4 Archive Set if known
5 Archive copies expected during scan
6 Scan depth
7 Directory to scan
8 If present, start scan at this subdirectory
Sun Microsystems Last change: 18 Feb 2007
Maintenance Commands sam-stagealld(1M)
NAME
sam-stagealld - Sun StorEdge SAM-FS and Sun SAM-QFS associa-
tive staging daemon
SYNOPSIS
/opt/SUNWsamfs/sbin/sam-stagealld
AVAILABILITY
SUNWsamfs
DESCRIPTION
sam-stagealld is responsible for the associative staging
feature. It is initiated by sam-fsd. Associative staging
is activated when a regular file that has the associative
staging attribute set is staged. All files in the same
directory that have the associative staging attribute set
are staged. If a symbolic link has the associative staging
attribute set, the file pointed to by the symbolic link is
staged.
SEE ALSO
stage(1), sam-fsd(1M)
Sun Microsystems Last change: 21 Feb 2003
Maintenance Commands stageback.sh(1M)
NAME
stageback.sh - Stages files from Sun StorEdge SAM-FS or Sun
SAM-QFS archive tapes
SYNOPSIS
/opt/SUNWsamfs/examples/stageback.sh output_file
AVAILABILITY
SUNWsamfs
DESCRIPTION
The stageback.sh script stages files from Sun StorEdge
SAM-FS or Sun SAM-QFS archive tapes based on
archive_audit(1M) output. You can use this script if an
archive volume is partially corrupt and there are no other
archive copies available.
OPTIONS
This command accepts the following argument:
output_file
The name of the output file created by the
archive_audit(1M) command.
USAGE
The following steps describe how to use the stageback.sh
script.
Step 1. Copy the script from its original location in
/opt/SUNWsamfs/examples/stageback.sh to the /tmp
directory or to a different alternate location.
The script itself contains comments to guide you
in tailoring the script for your own use.
Step 2. Modify the variables you need. Generally, only
the following variables in the script need to be
modified:
MEDIA The 2-character media type of the volume
in question as defined on the mcf(4) man
page.
VSN The volume serial name of the volume in
question.
For example:
eval /opt/SUNWsamfs/bin/rearch -m lt -v TAPE66 $file
Step 3. Remove the pound character (#) from column 1 of
the line that defines the variables.
Step 4. Run stageback.sh. As its argument, include the
name of the output file created by
archive_audit(1M).
EXAMPLES
The following script has been edited to contain site-
specific information (only the edited portions of the script
are shown):
echo rearch $file
#
# Edit the following line for the correct media type and VSN
#
eval /opt/SUNWsamfs/bin/rearch -m lt -v TAPE66 $file
WARNINGS
Improper use of this script can damage user or system data.
Please refer to the Sun QFS, Sun SAM-FS, and Sun SAM-QFS
Disaster Recovery Guide or contact technical support before
using this script.
FILES
The stageback.sh script resides in the following location:
/opt/SUNWsamfs/examples/stageback.sh
SEE ALSO
stage(1), release(1).
archive_audit(1M), rearch(1M).
Sun Microsystems Last change: 12 Jan 2004
Maintenance Commands star(1M)
NAME
star - Creates tape archives and adds or extract files
SYNOPSIS
star [options] ... [file] ...
AVAILABILITY
SUNWsamfs
DESCRIPTION
This man(1) page describes the GNU version of the tar(1)
command as extended by Sun Microsystems. Sun Microsystems
has enhanced the tar(1) command to support the Sun StorEdge
SAM-FS and Sun SAM-QFS file systems. The star command saves
many files together into a single tape or disk archive, and
it can be used to restore individual files from the archive.
OPTIONS
This command accepts options in both single-character and
multicharacter equivalent option formats.
Main Operation Mode Options
-t, --list Lists the content of an
archive.
-x, -extract, -get Extracts files from an
archive.
-c, --create Creates a new archive.
-d, --diff, --compare Finds differences between
archive and file system.
-r, --append Appends files to the end of an
archive.
-u, --update Only appends files newer than
the copy in archive.
-A, --catenate, --concatenate Appends tar(1) files to an
archive.
--delete Deletes from the archive (not
on mag tapes!).
Operation Modifier Options
-W, --verify Attempts to verify the archive
after writing it.
--remove-files Removes files after adding
them to the archive.
-k, --keep-old-files Does not overwrite existing
files when extracting.
-U, --unlink-first Removes each file prior to
extracting over it.
--recursive-unlink Empties hierarchies prior to
extracting directory.
-S, --sparse Handles sparse files
efficiently.
-O, --to-stdout Extracts files to standard
output.
-G, --incremental Handles old GNU-format
incremental backup.
-g, --listed-incremental Handles new GNU-format
incremental backup.
--ignore-failed-read Does not exit with nonzero on
unreadable files.
File Attribute Handling Options
--owner=name Forces name as the owner for
added files.
--group=name Forces name as the group for
added files.
--mode=changes Forces (symbolic) mode changes
for added files.
--atime-preserve Does not change access times
on dumped files.
-m, --modification-time Does not extract file modified
time.
--same-owner Tries extracting files with
the same ownership.
--numeric-owner Specifies to always use
numbers for user/group names.
-p, --same-permissions, --preserve-permissions
Extracts all protection
information.
-s, --same-order, --preserve-order
Sorts names to extract to
match archive.
--preserve Same as specifying both -p and
-s.
Device Selection and Switching Options
-f=archive, --file=archive Uses archive file or device
archive. The archive can be
file, host:file or
user@host:file.
--force-local Specifies that archive file is
local even if has a colon.
--rsh-command=command Specifies to use remote
command instead of rsh.
-[0-7][lmh] Specifies drive and density.
-M, --multi-volume Creates/lists/extracts
multivolume archive.
-L=num, --tape-length=num Changes tape after writing num
x 1024 bytes.
-F=file, --info-script=file, --new-volume-script=file
Runs script in file at the end
of each tape (implies -M).
--volno-file=file Uses/updates the volume number
in file.
Device Blocking Options
-b=blocks, --blocking-factor=blocks
Specifies blocks x 512 bytes
per record.
--record-size=size Specifies size bytes per
record, multiple of 512.
-i, --ignore-zeros Ignores zeroed blocks in
archive (means EOF).
-B, --read-full-records Specifies to reblock as the
file is being read (for 4.2BSD
pipes).
Archive Format Selection Options
-V=name_or_pattern, --label=name_or_pattern
Creates archive with volume
name name or globbing pattern
pattern at list/extract time.
-o, --old-archive, --portability
Writes a V7 format archive.
--posix Writes a POSIX-conformant
archive (GNU). Support for
POSIX is only partially
implemented. The star command
cannot read, nor can it
produce, --posix archives. If
the POSIXLY_CORRECT
environment variable is set,
GNU extensions are disallowed
with --posix.
-z, --gzip, --ungzip Filters the archive through
gzip(1).
-Z, --compress, --uncompress Filters the archive through
compress(1).
--use-compress-program=prog Filters through prog (must
accept -d).
Local File Selection Options
-C=dir, --directory=dir Changes to directory dir.
-T=name, --files-from=name Gets names to extract or
create from file name.
--null Instructs star to expect file
names terminated with NUL
characters so star can work
correctly with file names that
contain newline characters.
Must be specified in
conjunction with the -t or the
-files-from=name option.
Disables the -C option.
--exclude=pattern Excludes files, given as a
globbing pattern.
-X=file, --exclude-from=file Excludes globbing patterns
listed in file.
-P, --absolute-names Does not strip leading slash
characters (/) from file
names.
-h, --dereference Dumps instead the files to
which symlinks point.
--no-recursion Avoids descending
automatically in directories.
-l, --one-file-system Stays in local file system
when creating archive.
-K=name, --starting-file=name Begins at file name in the
archive.
-n, --newer_than_existing Only restores files newer than
the existing copy.
-N=date, --newer=date, --after-date=date
Only restores files newer than
date.
--newer-mtime Compares date and time when
data changed only.
--backup[=control] Backs up before removal,
chooses version control. You
can use the VERSION_CONTROL
environment variable or the
control argument to specify
version control. The possible
values for control are as
follows:
control Values Version
t, numbered Makes numbered
backups.
nil, existing Makes numbered
if numbered
backups exist,
simple
otherwise.
never, simple Specifies to
always make
simple backups.
--suffix=suffix Backs up before removal.
Overrides usual suffix. By
default, the backup suffix is
a tilde character (~). You
can use this option or the
SIMPLE_BACKUP_SUFFIX
environment variable to
specify an alternative suffix.
Informative Output Message Options
--help Writes help text (which is
this man(1) page), then exits.
--version Writes the tar(1) program
version number, then exits.
-v, --verbose Lists files processed
verbosely.
--checkpoint Writes directory names while
reading the archive.
--totals Writes total bytes written
while creating archive.
-R, --block-number Shows block number within
archive with each message.
-w, --interactive, --confirmation
Prompts for confirmation for
every action.
Input File Option
file The file can be a file or a
device.
NOTES
The star(1) command defaults to -f- and -b20.
Be careful when combining options. The star(1) command
supports old-style tar combined options without the leading
"-", e.g.
/opt/SUNWsamfs/sbin/star tvbf 128 file
sets the blocksize to 64K and uses "file" as the archive.
However,
/opt/SUNWsamfs/sbin/star -tvbf 128 file
sets the blocksize to "f" and uses "128" as the archive. If
you want to use the leading "-" you should separate the
options as follows:
/opt/SUNWsamfs/sbin/star -tv -b 128 -f file
SEE ALSO
For more information about the star(1) command, enter the
following command:
/opt/SUNWsamfs/sbin/star --help
tar(1)
Sun Microsystems Last change: 17 Dec 2001
Maintenance Commands tapealert(1M)
NAME
tapealert - Decodes TapeAlert events
SYNOPSIS
tapealert -i -f /var/opt/SUNWsamfs/devlog/nn
AVAILABILITY
SUNWsamfs
DESCRIPTION
The TapeAlert feature displays diagnostic and status
messages for tape drives and automated library devices.
These messages can provide network administrators with
critical diagnostic information, such as for media or drive
failure, when user intervention is urgent and data is at
risk. TapeAlert messages also warn you when media or
devices need servicing, and the messages also provide
information regarding media or device status.
The TapeAlert feature enables a tape drive or automated
library to convey diagnostic information to network
administrators. TapeAlerts interpret log sense page 0x2e.
The log sense page contains 64 industry-standard error
flags. Robots and tape drives support TapeAlert though
their own set of specific error flags.
The Sun StorEdge SAM software automatically writes TapeAlert
events to the device log file, /var/opt/SUNWsamfs/devlog/nn.
TapeAlert events are logged in many situations, for example
positioning errors, drive self-test errors, and others. If
a TapeAlert event is logged, user action is often required.
The tapealert command reads the events logged in the device
log file, interprets them, and writes them to a text file
for easier viewing. The TapeAlert events can be used to
diagnose hardware and media problems for a particular tape
volume. In addition, you can enable real-time TapeAlert
output to be sent to you in the form of an email or pager
message.
Only unique, discrete, nonzero TapeAlert events are written
to the device log (devlog/nn). If repeated identical
TapeAlert events are detected, only one is written to the
device log. This keeps the device log manageable, accurate,
and comprehensive without becoming unwieldy. If a TapeAlert
event occurs when a drive is empty, no VSN is recorded in
the device log or sent with the sysevent. For more
information on the device log file and the information
written to it, see the devlog(4) man page.
TapeAlert writes device-specific messages to device-specific
files. For each device, whether it is an automated library
or a tape drive, TapeAlert writes messages specific to that
device in the device's own file. Messages are logged as
follows:
o For automated libraries, TapeAlerts are accessed at the
following events: Sun StorEdge SAM device
identification, move media, door lock, door unlock,
position element, exchange, and after unrecoverable
device errors.
o For tape drives, TapeAlerts are accessed at the following
events: Sun StorEdge SAM device identification, load,
unload, and after unrecoverable device errors.
The tapealert command is not supported for magneto optical
or mixed-media libraries. TapeAlert is supported on
direct-attached hosts only. TapeAlert is not supported on
network-attached hosts.
OPTIONS
The tapealert command requires you to specify one of the
following options:
-f /var/opt/SUNWsamfs/devlog/nn
Specifies the file to be read and interpreted.
For nn, enter the Equipment Ordinal of the device.
The Equipment Ordinal is the second field in the
Sun StorEdge QFS master configuration file
(/etc/opt/SUNWsamfs/mcf). Each device has its own
unique devlog/nn file. The system writes each
device's TapeAlert events to its own unique file.
For more information on mcf files, see the mcf(4)
man page.
-i Reads standard input for interpretation.
For an example of tapealert command output, see the EXAMPLES
section of this man page.
USAGE
You can create a TapeAlert sysevent event handler to record
all, or only some, automated library and tape drive
TapeAlert flags in real time in a single place. The
following sections describe the TapeAlert name-value pairs
that are needed to build an event handler and describe how
to create various types of event handlers.
TapeAlert Sysevent Class and Name-Value Pairs
To create a custom TapeAlert sysevent event handler, the
following information is required:
Field Value
Class Device
Subclass TapeAlert
Vendor SUNW
Publisher SUNWsamfs
In addition, you can include all or some of the following
TapeAlert sysevent name-value pairs:
Name Value and Data Type
VENDOR Inquiry vendor. Data type is string.
PRODUCT Inquiry product. Data type is string.
REV Inquiry revision. Data type is string.
USN Inquiry unit serial number. Data type
is string.
TOD Time of day. Data type is int32.
SET mcf file Family Set. Data type is
string.
FSEQ mcf file Family Set Equipment Ordinal.
Data type is int16.
EQ_ORD mcf file Equipment Ordinal. Data type
is int16.
NAME Device name. Data type is string.
VERSION Inquiry version. Data type is byte.
INQ_TYPE Inquiry peripheral device type. Data
type is byte.
VSN Volume serial name. Data type is
string.
FLAGS_LEN TapeAlert flags number. Data type is
int16.
FLAGS TapeAlert flags 64-1. Data type is
uint64.
Creating the Event Handler
Creating the event handler is a two-procedure process. In
the first procedure, you create the event handler itself.
In the second procedure, you create a notification
mechanism.
The following procedure describes how to create the event
handler.
1. Log in as root.
2. Create the notification system.
After the event handler is created, you need to create a
notification system. This can be done through your own
user-created script or through a C program event handler.
The following procedures describe how to create a C
program event handler and how to establish email
notification.
To Create a C Program Notifier:
The following C program, /var/tmp/event_handler.c, writes
TapeAlert events to a temporary file:
#include
#include
#include
#include
int main(int argc, char **argv)
{
char *vendor, *product, *revision, *name, *vsn;
time_t tod;
char *todstr;
short eq_ord;
uchar_t inq_type;
int flags_len;
uint64_t flags;
FILE *fp;
vendor = argv[1];
product = argv [2];
revision = argv[3];
tod = (time_t)strtol(argv[4], NULL, 10);
todstr = asctime(localtime (&tod));
*(strchr (todstr, '\n')) = '\0';
eq_ord = atoi(argv[5]);
name = argv[6];
inq_type = (uchar_t)strtol(argv[7], NULL, 16);
vsn = argv[8];
flags_len = atoi(argv[9]);
flags = (uint64_t)strtoll(argv[10], NULL, 16);
if ((fp = fopen ("/var/tmp/tapealert", "a+")) == NULL)
return 1;
fprintf (fp, "%s %-8s %-16s %-4s VSN %s\n", todstr, vendor,
product, revision, vsn);
fprintf (fp, "Eq ord. %d Dev name %s\n", eq_ord, name);
fprintf (fp, "TapeAlert %d flags %016llx\n", flags_len, flags);
fprintf (fp, "\n");
fclose (fp);
return 0;
}
After this file is created, you must compile it. After
compilation, you can run the following commands to load
the event handler into the sysevent daemon:
# syseventadm add -c Device -s TapeAlert -v SUNW -p SUNWsamfs
/var/tmp/event_handler \"\$VENDOR\" \"\$PRODUCT\" \"\$REV\" \$TOD
\$EQ_ORD \"\$NAME\" \$INQ_TYPE \"\$VSN\" \$FLAGS_LEN \$FLAGS
# syseventadm restart
The following commands show the critical clean drive
TapeAlert flag 20 active for drive 81 and 82:
# tail -f /var/tmp/tapealert
Mon Jun 16 10:42:45 2003 "EXABYTE " "EXB-89008E030203" "V39e" VSN "000166"
Eq ord. 81 Dev name "/dev/rmt/1cbn"
TapeAlert 49 flags 0000000000080000
Mon Jun 16 10:42:51 2003 "EXABYTE " "EXB-89008E030203" "V39e" VSN "000165"
Eq ord. 82 Dev name "/dev/rmt/0cbn"
TapeAlert 49 flags 0000000000080000
To Create an Email Notifier:
The following procedure describes how to enable email
notification.
1. Log in as root.
2. In the script file /var/tmp/email_pager, send yourself
or your pager a TapeAlert email by adding a line
similar to the following:
echo $2 | /usr/ucb/mail -s "TapeAlert $1" admin@support.com
3. Run commands to load the event handler in the sysevent
daemon.
Issue the syseventadm(1M) commands, as follows:
# syseventadm add -c Device -s TapeAlert -v SUNW -p SUNWsamfs
/var/tmp/email_pager $EQ_ORD "$VSN"
# syseventadm restart
EXAMPLES
Example 1. The following mcf file defines one automated
library and two tape drives:
# OVERLAND NEO Series
/dev/samst/c2t6u0 80 rb NEO_Series on
/var/opt/SUNWsamfs/catalog/NEO_Series
/dev/rmt/0cbn 81 tp NEO_Series on
/dev/rmt/1cbn 82 tp NEO_Series on
historian 90 hy - -
/var/opt/SUNWsamfs/catalog/historian
You could decode the TapeAlert flags for these devices using
the following tapealert commands:
# tapealert -f /var/opt/SUNWsam/devlog/80
# tapealert -f /var/opt/SUNWsam/devlog/81
# tapealert -f /var/opt/SUNWsam/devlog/82
Example 2. The following examples show tapealert command
output:
# tapealert -f /var/opt/SUNWsamfs/devlog/91
2003/11/18 15:05:20 Eq no. 91 Seq no. 7
Code: 0x27
Flag: Diagnostics required
Severity: Warning
Application message:
The tape drive may have a hardware fault. Run extended diagnostics
to verity and diagnose the problem. Check the tape drive users
manual for device specific instructions on running extended
diagnostics tests.
Probable cause:
The drive may have a hardware fault that may be identified by
extended diagnostics (i.e. SEND DIAGNOSTIC command).
Code: 0x32
Flag: Lost statistics
Severity: Warning
Application message:
Media statistics have been lost at some time in the past.
Probable cause:
Drive or library powered down with tape loaded.
FILES
/etc/sysevent/config/SUNW,sysevent.conf
/var/opt/SUNWsamfs/devlog/nn
SEE ALSO
samd(1M), syseventadm(1M).
devlog(4), mcf(4), sefsysevent(4).
NOTES
The T10 Technical Committee is responsible for SCSI
architecture standards. This tapealert command supports the
TapeAlert functionality as defined by T10 in the following
papers:
o SCSI Stream Commands - 2 (SSC-2). For a copy of this
paper, see www.t10.org/ftp/t10/drafts/ssc2/ssc2r08g.pdf.
o SCSI Media Changer Commands - 2 (SMC-2). For a copy of
this paper, see
www.t10.org/ftp/t10/drafts/smc2/smc2r05b.pdf.
The preceding URLs are supported as of June 2003. If you
have difficulty accessing these papers, consult the main T10
Technical Committee webpage at www.t10.org.
Portions of this man page were based on or derived from the
following T10 Technical Committe publications:
1. SCSI Stream Commands - 2 (SSC-2), Revision 08d, 9
September 2002.
2. SCSI-3 Media Changer Commands - 2 (SMC-2), Revision 5,
July 12, 2002.
TapeAlert is limited to direct attached SCSI automated
libraries and tape drives that support Log Sense Page 0x2e.
Sun is not responsible for the availability of third-party
Web sites mentioned in this document. Sun does not endorse
and is not responsible or liable for any content,
advertising, products, or other materials that are available
on or through such sites or resources. Sun will not be
reponsible for any actual or alleged damage or loss caused
by or in connection with the use of or reliance on any such
content, goods, or services that are available on or through
such sites or resources.
Sun Microsystems Last change: 18 Oct 2005
Maintenance Commands tarback.sh(1M)
NAME
tarback.sh - Reloads files from Sun StorEdge SAM-FS or Sun
SAM-QFS archive tapes
SYNOPSIS
/opt/SUNWsamfs/examples/tarback.sh
AVAILABILITY
SUNWsamfs
DESCRIPTION
The tarback.sh script reloads files from Sun StorEdge SAM-FS
or Sun SAM-QFS archive tapes. This script can be used if a
file system is lost and there are no usable samfsdump(1M)
files or copies of the .inodes files available.
USAGE
The following steps describe how to use the tarback.sh
script.
Step 1. Use sammkfs(1M) to recreate or restore the file
system.
Step 2. Use samu(1M) to set the drive you are using to
unavail.
Step 3. Copy the script from its original location in
/opt/SUNWsamfs/examples/tarback.sh to the /tmp
directory or to a different alternate location.
The script itself contains comments to guide you
in tailoring the script for your own use.
Step 4. Modify the variables you need. Generally, only
the following variables in the script need to be
modified:
Variable Name Content
EQ="eq" The Equipment Number of the
tape drive as defined in the
mcf file.
TAPEDRIVE="path" The raw path to the device
described by EQ=.
BLOCKSIZE="size" The block size in 512-byte
units. For example, specify
256 for a block size of 128
kilobytes.
MEDIATYPE="mt" The 2-character media type for
this tape as defined on the
mcf(4) man page.
VSN_LIST="vsn1 vsn2 ..."
The list of VSNs to be read.
There is no limit on the
number of VSNs that can be
specified. Use a space
character to separate the VSN
names. This list can be
continued onto another line by
using a backslash character
(\).
For example:
VSN_LIST="vsn1 vsn2 \
vsn3"
Step 5. Remove the pound character (#) from column 1 of
the line that defines the variables.
Step 6. Run tarback.sh. There are no arguments.
EXAMPLES
The following script has been edited to contain site-
specific information (only the edited portions of the script
are shown):
STAR="/opt/SUNWsamfs/sbin/star"
LOAD="/opt/SUNWsamfs/sbin/load"
UNLOAD="/opt/SUNWsamfs/sbin/unload"
EQ=28
TAPEDRIVE="/dev/rmt/3cbn"
BLOCKSIZE=256
MEDIATYPE="lt"
VSN_LIST="VSNA VSNB VSNC \
VSNZ"
WARNINGS
Improper use of this script can damage user or system data.
Please refer to the Sun QFS, Sun SAM-FS, and Sun SAM-QFS
Disaster Recovery Guide or contact technical support before
using this script.
FILES
The tarback.sh script resides in the following location:
/opt/SUNWsamfs/examples/tarback.sh
SEE ALSO
samload(1M), samu(1M), star(1M), unload(1M).
Sun Microsystems Last change: 03 Dec 2001
Maintenance Commands tplabel(1M)
NAME
tplabel - Label tape
SYNOPSIS
tplabel -vsn vvvvvv -[new | old vv...] [-b blksize] [-w]
[-V] [-erase] eq
tplabel -vsn vvvvvv -[new | old vv...] [-b blksize] [-w]
[-V] [-erase] eq:slot
DESCRIPTION
tplabel labels the tape volume specified by eq:slot. eq is
the equipment ordinal. If eq is a library, slot is the slot
in the library containing the tape cartridge.
The following sequence of labels is written:
VOL1
HDR1
HDR2
tapemark
EOF1
tapemark
tapemark
The labels conform to ANSI X3.27-1987 File Structure and
Labeling of Magnetic Tapes for Information Interchange.
-vsn vvvvvv specifies the volume serial name (VSN) of the
tape being labeled. The VSN must be one to six characters
in length. All characters in the VSN must be selected from
the 26 upper-case letters, the 10 digits, and the following
special characters: !"%&'()*+,-./:;<=>?_.
If the media being labeled was previously labeled, the VSN
must be specified by -old vv.... The "old" VSN is compared
with the VSN on the media to assure that the correct media
is being relabeled.
If the media is not labeled (i.e., blank), -new must be
specified to prevent the previous label comparison from
being made.
OPTIONS
-V Verbose, lists label information written.
-b blksize
specifies the blocksize for this tape. The value
must be one of 16, 32, 64, 128, 256, 512, 1024 or
2048 and represents the size of the tape block in
units of 1024. This option overrides the default
blocksize.
-erase Erases the media completely before a label is
written. This is a security feature that is nor-
mally not necessary. Complete media erasure will
take a long time to perform since all data in the
media is erased.
-w Wait for the labeling operation to complete. If
an error occurs, it will be reported along with a
completion code of 1. All labeling errors are
also logged. Note: Canceling a command that is
waiting for completion will not cause the opera-
tion itself to be canceled.
Sun Microsystems Last change: 08 Jan 2007
Maintenance Commands trace_rotate(1M)
NAME
trace_rotate - Rotates trace files
SYNOPSIS
trace_rotate trace_file
AVAILABILITY
SUNWsamfs
DESCRIPTION
The trace_rotate script rotates trace files generated by Sun
StorEdge SAM-FS or Sun SAM-QFS daemons. It is executed by
sam-fsd when a daemon trace file has aged or grown beyond
parameters specified in the defaults.conf file.
The process of rotating trace files assumes that you want to
keep no more than seven generations of a trace file in your
directories at one time. When the trace files are rotated,
the newest trace file is renamed trace_file.1, the next-
newest trace file is renamed trace_file.2, and so on. The
oldest trace file in the directory is deleted as new ones
are added, so the oldest trace file in the directory at any
time is always called trace_file.7. This process provides
two benefits:
o A given trace file never becomes so large that it is
unwieldy to copy or view.
o Entries are expired after a period of time. This
prevents file systems from filling up due to the volume
of trace entries.
OPTIONS
This command accepts the following arguments:
trace_file
The full path name of the trace file.
EXAMPLES
By default, trace files are not rotated. You could use the
following command line to invoke the script manually:
# trace_rotate /var/opt/SUNWsamfs/trace/sam-archiverd
You can enable this script's trace file rotation mechanism
automatically in one of the following ways:
Method 1. By using the daemon_name.age=age or the
daemon_name.size=size directive in the
defaults.conf(4) file. For more information, see
the defaults.conf(4) man page.
Method 2. By setting up a crontab(1) entry to run the
trace_rotate script. The following crontab(1)
entry maintains eight back-up files, sam-
archiverd.0 through sam-archiverd.7, plus the
original:
10 3 * * 0 /opt/SUNWsamfs/sbin/trace_rotate /var/opt/SUNWsamfs/trace/sam-archiverd
SEE ALSO
crontab(1).
sam-fsd(1M).
defaults.conf(4).
Sun Microsystems Last change: 30 Dec 2003
Maintenance Commands umount_samfs(1M)
NAME
umount_samfs - Unmounts a Sun StorEdge QFS or SAM-QFS file
system
SYNOPSIS
umount -F samfs [-f] [generic_options] [-o await_clients=n]
special | mount_point
AVAILABILITY
SUNWsamfs
DESCRIPTION
The umount command unmounts a currently mounted file system
from the file system hierarchy. The file system may be
specified by either its mount point or its special (also
known as its family set name).
For more information on the mount(1M) command, see the
mount(1M) man page and the mount_samfs(1M) man page.
For more information on the umount command, see the
umount(1M) man page.
OPTIONS
-F samfs Specifies that the file system being unmounted is
of type samfs. Both Sun StorEdge QFS and SAM-QFS
file systems are of type samfs.
-f Forcibly unmount the file system, i.e., unmount
the file system even if it is busy. This may fail
or hang in some situations, particularly on
clients if the metadata server does not have the
FS mounted.
generic_options
One or more generic Solaris file system options.
For a list of possible generic_options, see the
umount(1M) man page.
-o await_clients=n
If the mounted file system is a QFS or SAM-QFS
shared file system and the current host is the
metadata server for that file system, the umount
command will wait for the specified period (n
seconds) for any mounted clients to first unmount.
The unmount command proceeds after either the last
client host unmounts the file system, or the
waiting period expires.
special The Family Set Name from the Sun StorEdge QFS or
SAM-QFS master configuration file (mcf). For more
information on this file, see the mcf(4) man page.
mount_point
The path name or directory at which the file
system is mounted. If the mount_point had any
contents prior to the mount operation, these
become accessible after the umount command
successfully completes.
EXAMPLES
# umount samfs1
Unmount the file system whose family set name is samfs1. If
the file system is in use, the command will fail.
# umount -f -o await_clients=30 /qfs1
Forcibly unmount the file system mounted on /qfs1. If the
file system is a shared file system, and the local host is
the metadata server for that file system, then umount will
wait up to 30 seconds for the clients to unmount before
issuing the unmount. If the file system is not shared, or
has no mounted clients, or the local host is not the
metadata server, the await_clients option has no effect.
The file system is forcibly unmounted.
FILES
/etc/mnttab Table of mounted file systems.
SEE ALSO
release(1).
mount(1M), mount_samfs(1M), mountall(1M), sam-releaser(1M),
sammkfs(1M).
mount(2). umount(2).
mcf(4), mnttab(4),
Sun Microsystems Last change: 13 Mar 2006
Maintenance Commands unarchive(1M)
NAME
unarchive - Deletes archive entries
SYNOPSIS
unarchive -c copy_no [-f] [-m media_type [-v vsn]] [-M] [-o]
filename . . .
unarchive [-c copy_no] [-f] -m media_type [-v vsn] [-M] [-o]
filename . . .
unarchive -c copy_no [-f] [-m media_type [-v vsn]] [-M] [-o]
-r dirname [filename] . . .
unarchive [-c copy_no] [-f] -m media_type [-v vsn] [-M] [-o]
-r dirname [filename] . . .
AVAILABILITY
SUNWsamfs
DESCRIPTION
The unarchive command deletes archive entries for one or
more files or directories. The specifications for the
archive copy (-c copy_no) and/or the media type and VSN
(-m media_type [-v vsn]) determine which archive copy is
deleted.
There are several ways to specify one or more archive
entries to be unarchived. These ways are as follows:
o By copy number
o By copy number, media type, and VSN
o By copy number and media type
o By media type
o By media type and VSN
OPTIONS
This command accepts the following options:
-c copy_no
Deletes the specified archive copy number. If one
or more -c options are are specified, only those
archive copies (copies 1, 2, 3, or 4) are deleted.
Specify 1, 2, 3, or 4 for copy_no. Either a -c or
a -m option must be specified.
-f Suppresses errors.
-m media_type
Deletes all archive copies from the specified
media_type. For the list of possible media_type
specifications, see the mcf(4) man page. Either a
-c or a -m option must be specified. If you
specify a -m option, you can also specify a -v
option.
-M Unarchives metadata only. This includes
directories, the segment index, and removable
media files. Regular files and symbolic links are
not unarchived. If you are unarchiving a
directory, you must specify the -M option.
-o Specifies that the file must be online before its
archive entry is deleted. If the file is offline,
the unarchive command stages the file to disk
before deleting any entries.
-r dirname
Recursively deletes the archive entries of dirname
and its subdirectories. The archive entries of
files in the directories and subdirectories are
deleted.
-v vsn Deletes the archive copies on vsn. For vsn,
specify a volume serial name (VSN). If you
specify a -v option, you must also specify a -m
option.
filename Deletes the archive entries for the specified
filename.
NOTES
If the last (undamaged) copy of a file would be unarchived,
the unarchive command reports Last undamaged offline copy
and does not unarchive that copy.
SEE ALSO
mcf(4).
Sun Microsystems Last change: 08 Jan 2003
Maintenance Commands undamage(1M)
NAME
undamage - Marks archive entries as undamaged and unstaled
SYNOPSIS
/opt/SUNWsamfs/sbin/undamage -c copy_no [-f] [-m media_type
[-v vsn]] [-M] filename ...
/opt/SUNWsamfs/sbin/undamage [-c copy_no] [-f] -m media_type
[-v vsn] [-M] filename ...
/opt/SUNWsamfs/sbin/undamage -c copy_no [-f] [-m media_type
[-v vsn]] [-M] -r dirname ... filename ...
/opt/SUNWsamfs/sbin/undamage [-c copy_no] [-f] -m media_type
[-v vsn] [-M] -r dirname ... filename ...
AVAILABILITY
SUNWsamfs
DESCRIPTION
The undamage command marks archive entries for one or more
files or directories as undamaged and not stale based on the
archive copy number and/or the media type and VSN specified.
The undamage command also marks the file(s) themselves as
undamaged.
There are several ways to mark one or more archive entries
as undamaged. These ways are as follows:
o By copy number
o By copy number, media type, and VSN
o By copy number and media type
o By media type
o By media type and VSN
OPTIONS
This command accepts the following options:
-c copy_no
Marks the specified archive copy number as undamaged.
If one or more -c options are are specified, only those
archive copies (copies 1, 2, 3, or 4) are marked as
undamaged. Specify 1, 2, 3, or 4 for copy_no. Either
a -c or a -m option must be specified.
-f Suppresses errors.
-m media_type
Marks all copies from the specified media_type as
undamaged. For the list of possible media_type
specifications, see the mcf(4) man page. Either a -c
or a -m option must be specified. If you specify a -m
option, you can also specify a -v option.
-M Marks only metadata as undamaged. This includes
directories, the segment index, and removable-media
files. Regular files are not marked as undamaged. If
you are marking a directory as undamaged, you must
specify the -M option.
-r dirname ...
Recursively marks one or more specified dirnames and
subdirectories as undamaged. The archive entries of
files in the directories and subdirectories are marked
as undamaged.
-v vsn
Marks the archive copies on vsn as undamaged. For vsn,
specify a volume serial name (VSN). If you specify a
-v option, you must also specify a -m option.
filename ...
Marks the archive entries for one or more specified
filename arguments as undamaged.
EXAMPLE
The following command marks all archive copies of myfile as
undamaged:
# undamage -c1 -c2 -c3 -c4 myfile
SEE ALSO
mcf(4).
Sun Microsystems Last change: 08 Jan 2003
Maintenance Commands unload(1M)
NAME
unload - Unload media from a device
SYNOPSIS
/opt/SUNWsamfs/sbin/unload [ -w ] eq
AVAILABILITY
SUNWsamfs
DESCRIPTION
Unload the media mounted on device eq. The device specified
by eq must be a removable media device or a media changer.
If eq is a removable media device controlled by a media
changer, the medium will be moved into storage. This command
is used when a shutdown of a Sun StorEdge SAM-FS or Sun
SAM-QFS file system is required and a tape is still in a
drive. This command is also used in situations where the
system administrator wishes to remove a tape from a drive
that is currently in the unavail state.
If eq is a media changer, unload moves catalog entries from
the media changer's catalog to the historian's catalog. The
device state for device eq is set to off. When the device
state for the media changer is set to on and the media
changer has bar codes, then the catalog information for that
media changer is retrieved from the historian. If the media
changer does not have bar codes, an audit invoked by the
administrator will recover the historian information. This
command is useful for moving tapes in to and out of media
changers which do not have import/export capabilities, or
sense capability for open door. By first issuing the unload
command, the system administrator can safely open the door
to the media changer, add or remove tapes, close the door,
and re-audit the media changer.
If -w is specified, the command will wait for the operation
to complete before terminating.
FILES
mcf The configuration file for Sun StorEdge
SAM-FS or Sun SAM-QFS environment
SEE ALSO
auditslot(1M), historian(7), load(1M), set_state(1M),
mcf(4), sam-robotsd(1M)
Sun Microsystems Last change: 18 Dec 1997
Maintenance Commands unrearch(1M)
NAME
unrearch - Removes a specification to rearchive a file
SYNOPSIS
unrearch -c copy_no [-f] [-m media_type [-v vsn]] [-M]
filename . . .
unrearch [-c copy_no] [-f] -m media_type [-v vsn] [-M]
filename . . .
unrearch -c copy_no [-f] [-m media_type [-v vsn]] [-M]
-r dirname [filename] . . .
unrearch [-c copy_no] [-f] -m media_type [-v vsn] [-M]
-r dirname [filename] . . .
AVAILABILITY
SUNWsamfs
DESCRIPTION
The unrearch command lets you remove a request to rearchive
a file or a directory. For example, if you have used the
rearch(1M) command to request that a file be rearchived, you
can use the unrearch command to clear the bit that the
rearch(1M) command had set. The specifications for the
archive copy (-c copy_no) and/or the media type and VSN
(-m media_type [-v vsn]) determine which archive copy is
affected.
There are several ways to remove the request to rearchive
from one or more archive entries. These ways are as
follows:
o By copy number
o By copy number, media type, and VSN
o By copy number and media type
o By media type
o By media type and VSN
OPTIONS
This command accepts the following options:
-c copy_no
Removes the rearchive request for copy_no.
Specify 1, 2, 3, or 4 for copy_no. If one or more
-c options are are specified, the command removes
the rearchive request from only those archive
copies (copies 1, 2, 3, or 4). Either a -c or a
-m option must be specified.
-f Suppresses errors.
-m media_type
Removes rearchive requests from all archive copies
on the specified media_type. For the list of
possible media_type specifications, see the mcf(4)
man page. Either a -c or a -m option must be
specified. If you specify a -m option, you can
also specify a -v option.
-M Removes rearchive requests for metadata only.
This includes directories, the segment index, and
removable media files. Regular files and symbolic
links are not unrearchived. If you are
unarchiving a directory, you must specify the -M
option.
-r dirname
Recursively removes the rearchive requests for the
entries of dirname and its subdirectories.
Removes the archive requests of files in the
directories and subdirectories.
-v vsn Removes the rearchive requests for the archive
copies on vsn. For vsn, specify a volume serial
name (VSN). If you specify a -v option, you must
also specify a -m option.
filename Removes the rearchive requests for the specified
filename.
SEE ALSO
mcf(4), rearch(1M).
Sun Microsystems Last change: 08 Jan 2003
Maintenance Commands unreserve(1M)
NAME
unreserve - Unreserve a volume for archiving.
SYNOPSIS
/opt/SUNWsamfs/sbin/unreserve mediatype.vsn
/opt/SUNWsamfs/sbin/unreserve eq:slot[:partition]
AVAILABILITY
SUNWsamfs
DESCRIPTION
unreserve removes the assignment of the volume for archival
of specific files.
Normally, relabeling a volume will remove the reservation of
a volumes. This command is provided to unreserve a volume
without re-labeling.
The volume is determined by the specifier mediatype.vsn , or
eq:slot[:partition]
SEE ALSO
archiver(1M), archiver.cmd(1M), reserve(1M)
Sun Microsystems Last change: 19 Sep 2000