Most of the steps required to create SAM-FS, SAM-QFS, and
QFS file systems are similar to those used to create any disk-based file
system: writing the file system control blocks to disk, updating the /etc/vfstab
file, and mounting the file system on an existing directory. One important
additional step required for SAM-FS/QFS file systems is the creation of the master configuration file (mcf file), /etc/opt/SUNWsamfs/mcf.
The mcf file determines the type and functionality of the file systems that run
on the server and identifies mass storage devices that are used to archive
files. It does not configure archiving or even determine whether archiving will
occur.
In this module we will discuss the tasks required to create
two representative file systems on a single server, a
SAM-FS file system named samfs1, and a QFS file system named qfs1.
These tasks are:
1. Creating the /etc/opt/SUNWsamfs/mcf file in which each
file system and mass storage device is defined. Entries in the mcf file
determine whether samfs reads the file system as a SAM-FS or as a QFS file
system, but does not determine whether it will archive.
2. Initializing the file systems using the sammkfs command. A file system’s DAU
may be specified using the -a allocation_size option to sammkfs when the file system is
initialized.
3. Updating the /etc/vfstab file so that the file systems
mount at boot.
4. Creating mount points
5. Mounting the file systems with the mount command. In
this paper the nosam option to the mount command is used with the representative
QFS file system qfs1 to specify that no archiving occurs and that it functions
as a QFS file system rather than as a SAM-QFS file system.
6. Checking that file systems are mounted and that SAM-FS
is functioning properly.
The mcf file (master configuration file) specifies the disk devices, removable media drives and media libraries available for SAM-FS/QFS to use. It is divided into two sections. In first section file systems are declared and are associated with disk devices. In the second section libraries and drives are declared and drives are associated with libraries. SAM-FS/QFS assumes that it can use any device included in the mcf file. Any device not included in the file is off limits and SAM-FS/QFS is not aware that such a device exists. This prevents SAM-FS/QFS from poaching devices used by other software.
File System
Declarations
Multiple file systems may be created to handle files with
different characteristics, and each must be declared in the mcf file. The line
declaring each file system is followed by lines specifying its disk devices in
the order in which they will be used by the file system. Each file system can
contain up to 252 disk slices or hardware LUNs (created with the format utility or in an array), volumes
(created with Veritas Volume Manager) or volumes/metadevices (created with
Solaris Volume Manager/Solstice DiskSuite).
Page 2
For each file system you plan to create, determine the file system type and choose a name by which the file system will be known. This name will be the Family Set Name. Also determine the disk device equipment type identifier to be assigned to each disk device in the file system, based on the size of the DAUs you want to use and whether the file system will be a SAM-FS or QFS file system. Locate the logical device name for each disk device. It will be in the standard form: /dev/dsk/cXtXdXsX for Solaris disk slices or hardware LUNs, /dev/vx/dsk/sub_disk/volume for VERITAS Volume Manager volumes or /dev/md/dsk/disk_name for SVM volumes.
*PERFORMANCE ISSUE* The equipment type identifiers for file
systems and disk devices are determined by the administrator. File systems must
meet the needs of the site and should be chosen so that writes to the file
systems waste as little disk space and system overhead as possible. This
requires that you know the kind of files written to your file systems, the size
of the writes generated by application data, and the characteristics of your
RAIDs.
For example, user application data usually written in small
files should be placed on a file system using md devices so that the small
files can take advantage of the efficiency offered by the dual allocation
scheme. On the other hand, an application that generates writes of 512 Kbytes
would be most efficiently written to a file system composed of mr devices with
a DAU of 512 Kbytes. Writing the first 32 Kbytes in 4 Kbyte chunks to an md
device instead would waste system overhead.
Every SAM-FS, SAM-QFS, and QFS file system must have an
entry in the first section of the mcf file. The following example shows the
first section of a sample mcf file with one SAM-FS file system and one QFS file
system.
Sample mcf File: File System Declarations
# Equipment Eq
Eq Family Device Addl
# Identifier Ord
Type Set
State Params
------------ ---
---- --- -----
------
samfs1 10
ms samfs1
/dev/dsk/c1t2d2s0 11
md samfs1
/dev/dsk/c6t1d0s5 12
md samfs1
qfs1 20
ma qfs1
/dev/dsk/c1t2d2s1 21
mm qfs1
/dev/dsk/c6t1d0s0 22
mr qfs1
File systems contain the following entries in the six
fields of the mcf file, in order:
Equipment Identifier.
Enter the family set name on the first line of the file system declaration. On
subsequent lines enter the logical device names of the disk devices included in
the file system. The Family Set Name used to identify a file system is selected
by the administrator and must be 31 characters or less. Disk device names are
in the form /dev/dsk/cXtXdXsX for Solaris disk
slices, /dev/vx/dsk/sub_disk/volume for VERITAS Volume Manager
volumes or /dev/md/dsk/disk_name for Solaris Volume Manager (Solstice
DiskSuite) volumes and must be 127 characters or less. Only include disk
devices not already in use. Using the wrong disk device
Page 3
names can result in the destruction of any data already on
those disk devices when the file system is initialized.
Equipment Ordinal. In
this field, specify a number between 1 and 65535 to associate with the device. You
may choose any number to associate with any file system or device, as the
equipment ordinals are assigned entirely at the discretion of the system
administrator, but these values should be chosen to reflect logical groupings.
For example, a file system and its disk drives might be assigned consecutive
numbers, with the file system first. The values shown in the sample mcf file
allow for growth of the file systems (discussed later), since there are
consecutive unused values available for each. If you added a disk device to the
file system samfs1, it could be assigned equipment ordinal 13. The format shown
above also displays the file system and its disk devices in a logical order in
command output.
Equipment Type. In
this field, specify the two-letter equipment type identifier. The file system
device type is ms for SAM-FS and ma for SAM-QFS or QFS file systems. SAM-FS
disk devices are always type md, as shown. SAM-QFS and QFS disk devices must
include at least one device of type mm, which holds metadata. Data on SAM-QFS
and QFS file systems can be held on either md or mr devices. The man page for
the mcf file lists all equipment type identifiers for file systems and disk
devices.
Family Set Name. This is a name of 31 or fewer characters and must be the same as the file system name in the equipment identifier field. Family set names associate file systems with disk devices and libraries with drives. Each disk device and its associated file system must have the same family set name. The family set name is the only way in which SAM-FS knows which disk devices belong to a specific file system, and which drives are contained in which libraries.
Additional Parameters.
This field is used for specialized configurations. The word "shared"
in this column indicates a shared qfs file system, which will be discussed
later.
Mass Storage
Device Declarations
Section two of the mcf file follows the file system
declaration. In this section each tape or magneto-optical disk library and its
drives are declared. Each library has an entry on one line, followed by the
entries for the media drives contained in that library. An automated library is a
robotically-controlled device designed to load and unload removable media
without operator intervention. Automated libraries are also referred to as
media changers, jukeboxes, robots, libraries, or media libraries. They are
attached to a SAM-FS or SAM-QFS host system.
*PERFORMANCE ISSUE* You must estimate your storage needs
when you plan your SAM-FS/QFS file system. Even a library with thousands of
tapes may be inadequate if you have very active file systems where files are
frequently modified and archived again, or if you consistently make four
archive copies of each file.
Page 4
Start with the total size of your disk cache for all archived
file systems. Multiply this amount of storage by the number of archive copies
destined to go to tape to get the total tape necessary to store all current,
online archive copies of your files. Divide this value by the proportion of
your data that will be stored only on tape because there is not enough room for
it on disk. This will equal the total tape needed just to store current archive
copies. You must then estimate how much of your tape will be obsolete archive
copies, add that amount of tape, and also add about 10% to allow for
inefficiency. That is your total tape needs. Magneto-optical disk space may be
calculated the same way.
Example: 100 Gbytes of disk cache; only 2/3 of your files
will be online at any given time because of disk space constraints. You plan to
have four archive copies of each file, and you expect your files to be modified
twice between recycling runs.
Tape storage: (100 Gbytes * 4 (current archive copies) =
400 Gbytes/[2/3](proportion of files on the disk) = 600 Gbytes * 3 (total
versions of each file on tape) = 1.8 Tbytes + (1.8 Tbytes * 0.1) = 1.981
Tbytes.
The drivers for automated libraries are provided with
SAM-FS and SAM-QFS in a kernel module called samst. Logical device names for attached libraries are configured by
the Solaris OS and the driver during the software installation. If you watch
the installation process, you will see the installation running devfsadm -i samst. The resulting logical
device name for each library is located in the directory /dev/samst. Equipment
type identifiers for robots, based on manufacturer's information, are listed in
the output of the mcf man page.
The logical device names for tape drives in the mcf file
are in the format /dev/rmt/Xcbn and are configured by drivers provided as
part of the Solaris OS. Always use the bn version of the tape’s logical device
name, which indicates the Berkeley UNIX version of the tape device name, and
the no rewind option. You can take advantage of tape drives that support
hardware compression by using the cbn version of the logical device name. For
most drives the “c” is obsolete, but it doesn’t hurt to leave it in. These names must be inserted in the mcf file
in the order in which SAM-FS or SAM-QFS will use the drives. Information on how
to determine this order is included in the documentation.
For a single robot attached to an HBA, the
order in which SAM uses tape drives is reflected in the numerical order of the
logical device names of the drives. Drives in a library will be usually be listed
in the mcf file in the order: /dev/rmt/0cbn, /dev/rmt/1cbn, /dev/rmt/2cbn, etc.
Equipment type identifiers for tape drives are
listed in the output of the mcf man page.
The samst driver is not fussy about mass storage equipment
type identifiers in the mcf file. If you do not know (or do not care to know)
the equipment type identifiers for your robots and tape drives, you can instead
use “tp” for a generic tape drive and “rb” for a generic robot instead. SAM-FS
will identify the equipment type from the equipment’s firmware and will display
the correct equipment type identifier in the output of management commands. Once
your system is up and running you can use samcmd
s to find the actual equipment type identifiers for your hardware. This
laxity in the format of mcf file entries is only true for mass storage device
equipment type identifiers. If your equipment type identifiers for file systems
and disk devices are not right, your file system will not work the way you
expected it to. If you have the generic (or wrong) equipment type identifier for
mass storage devices in your mcf file, you should correct it as soon as you
know the right type, even if it is not currently causing any problems.
Eventually you will need the right identifier for inclusion in the archiver.cmd
file, which always requires the right equipment type identifier for media
drives.
Page 5
Mass storage devices in the mcf file have the following
entries:
Equipment Identifier Each
library has an entry followed on subsequent lines with the logical device names
of the media drives included in the library in the order in which the library
will use the devices. Robot device names are in the form /dev/samst/cXtXuX.
Tape drive device names are in the form /dev/rmt/Xcbn.
Equipment Ordinal This
is a whole number chosen by the administrator and should be assigned similarly
to the way it is assigned for file systems.
Equipment Type Equipment
type identifiers for mass storage devices can be found in the man page for the
mcf file. Equipment type identifiers for mass storage devices are specific to
the device. This field is not critical. The generic identifier “rb” can be used
in place of the correct equipment type identifier for a robot, and the generic
tape identifier “tp” in place of the correct identifier for a tape drive.
SAM-FS will display the correct identifier in output (it will do this even if
the wrong identifier is used in the mcf file).
Family Set Name The
robot and its included drives must all have the same unique family set name
chosen by the administrator.
Equipment Status This
field may be left blank, or populated with the word “on” or with a dash
(-) which indicates the default of “on.” The entry “off” in this field indicates
that the SAM-FS software should not attempt to use the device. This is useful
if you must reboot a system with a bad drive in its tape library. SAM-FS will
read the mcf file, note that the device state is off for the bad drive and
ignore it, rather than mounting a tape in the drive, which might then be
destroyed.
Additional Parameters This
field may contain the name of the library catalog. By default, the catalog is
placed in the directory /var/opt/SUNWsamfs/catalog and is given a name based on
its family set name. You can specify a non-default catalog location and name instead.
This is useful if you have a shared SAM-QFS file system with a secondary server
and a network library controlled by an ACSLS workstation. You will want the
catalog to be accessible to both servers in case the primary server’s functions
must be failed over to the secondary server. The catalog can therefore be on
any NFS shared file system available to both systems. An NFS shared file system
on the ACSLS server reduces the number of “single points of failure” for the
SAM-QFS system. If the server goes down the catalog will not be available, but
no archiving will be taking place anyway. The directory containing the catalog
must exist or the catalog will not be initialized.
Manually loaded standalone tape drives may also be declared
in this section of the mcf file. For a standalone device, use the logical
device name beginning with /dev/rmt as the equipment name, and enter a dash (-)
in field four to indicate that the family set name is omitted. It is
impractical to run a production system with a manual tape drive, but they can
be convenient on a sandbox system.
Page 6
The following example builds on the mcf file constructed
above. It shows file systems, a library robot with two included drives, and a
standalone tape drive.
# Equipment Eq
Eq Family
Device Addl
# Identifier Ord
Type Set
State Params
------------ ---
---- --- -----
------
samfs1 10
ms samfs1
/dev/dsk/c1t2d2s0 11
md samfs1
/dev/dsk/c6t1d0s5 12
md samfs1
qfs1 20
ma qfs1
/dev/dsk/c1t2d2s1 21
mm qfs1
/dev/dsk/c6t1d0s0 22
mr qfs1
#Section 2. Storage Identification
/dev/samst/c0t4u0 100
s9 L180 - /acsls/catalog/L180
/dev/rmt/1cbn 101
lt L180
/dev/rmt/2cbn 102
lt L180
#
/dev/rmt/0cbn 200
dt -
For the L180 tape robot shown above:
The equipment identifier is /dev/samst/c0t4u0.
The equipment ordinal is 100.
The equipment type of the robot is s9; this identifies it
as a STK97xx series robot.
L180 is the family set name.
The device state is the default (on).
The catalog is on an NFS file system mounted on /acsls. The
directory “catalog” must exist.
For the DLT 7000 tape drives shown in this file:
The Equipment Identifiers are /dev/rmt/1cbn and
/dev/rmt/2cbn.
The equipment ordinals are 101 and 102.
The equipment type of the drive is lt, for a DLT tape
drive.
L180 is the family set name.
The device state is the default (on).
For the standalone tape device included in this file:
The equipment identifier is /dev/rmt/0cbn.
The equipment ordinal is 200.
The equipment type of the drive is dt, which identifies the
tape drive as a 4 millimeter (mm) DAT tape drive.
A dash in the family set field indicates this drive is not
associated with any family set.
The device state is the default (on).
After you have completed the mcf file, you can check it
using the sam-fsd command. Run this
command and observe the output for indications of errors in the file.
The mcf file can be edited any time to correct errors, add
disk devices to file systems, and add mass storage devices as your license
permits. After your changes are made, you must force the
Page 7
sam-fsd daemon to reread the file with samd config.
If you wish to grow a file system, edit the mcf file and add the names of
additional disk devices. If you are growing a QFS file system, you must add at
least one metadata device when you add the disk device. Force sam-fsd to reread
the mcf file with samd config, unmount
the file system, then use the command samgrowfs
to force the file system to grow.
After the mcf file is properly configured, SAM-FS, SAM-QFS,
and QFS file systems may be initialized and mounted. File systems are
initialized with the sammkfs
command. This command, used with the family set names already defined, creates
a file system consisting of all devices in the family set, writes superblocks
to the appropriate disk devices, creates the .inodes file and configures the
DAU for the file system to the default value unless you specify the -a allocation_unit option to the
sammkfs command.
The file system must be declared in the mcf file or the sammkfs command will fail. You do not
specify whether you are creating a SAM-FS or a QFS file system when you issue
the sammkfs command. That
information is included in the mcf file.
The syntax of sammkfs
is:
sammkfs [-options] fs_name
Where fs_name is the family set name of the
file system from the mcf file.
To initialize each file system, issue the sammkfs command as root with the
appropriate options as follows:
-a allocation_unit – where allocation_unit is
the DAU in kilobytes
-S – Specifies that this file system can be mounted as a
shared file system
The command shown in the following example initializes a
SAM-FS file system called samfs1 with a DAU of 32 Kbytes. It overrides the
default DAU of 64 Kbytes for a SAM-FS file system.
server# sammkfs -a 32 samfs1
The command shown in the following example initializes a QFS or SAMQFS file system called qfs1 with the default DAU of 64 Kbytes.
server# sammkfs qfs1
Enable Logging
SAM-FS/SAM-QFS logs error messages using the standard syslog utility and to a number of internal files located in /var/opt/SUNWsamfs. The /etc/syslog.conf file provides configuration instructions to the syslogd(1M) daemon, which forwards system messages to the appropriate log files or users. All logging is done based on the priority assigned to the message and the facility used by the software. By default, the SAM-QFS facility is local7. SAM-FS and SAM-QFS send messages at severity levels debug and above. Messages sent at level debug and info record routine archiver activity, and can generate large numbers of messages of little usefulness.
Page 8
Logging messages at severity level notice and above generally provides enough information for the administrator to monitor SAM-FS and SAM-QFS function.
To enable SAM logging, add a line like this one to the
/etc/syslog.conf file:
local7.notice /var/opt/SUNWsamfs/sam-log
In Solaris 9, touch the file /var/opt/SUNWsamfs/sam-log (if
you choose to send error messages to a file) and HUP syslogd. The
facility.severity entry and the message destination in the file
/etc/syslog.conf must be separated by one or more tabs only - no spaces. In Solaris
10, restart the syslog daemon using the SMF (although it still works to HUP
syslogd):
# svcadm refresh
system-log
The /etc/vfstab file must be updated for SAM-FS, SAM-QFS, and QFS file systems to mount automatically at boot. Edit the /etc/vfstab file and make an entry for each Sun SAM-FS, Sun SAM-QFS, and QFS file system. Each line consists of seven fields, separated by spaces or tab characters. For SAM-FS, SAM-QFS, or QFS file systems, the entries in the /etc/vfstab file have the form:
family_set_name - /mount_point
samfs -
yes -
Where family_set_name is the file system’s family
set name in the mcf file.
This example shows /etc/vfstab entries for the QFS file
system and the
SAM-FS file system declared in the mcf file examples above.
qfs1 -
/qfs1 samfs - yes nosam
samfs1 - /sam1 samfs
- yes
-
Although the family set names in this case reflect the type
of file system being created, family set names and mount points are chosen by
the administrator and have no special significance. The mount option nosam is
used on a QFS file system mounted on a host that has archiving software
installed. Without this option, all SAM-FS/QFS file systems will automatically
archive. On such a host, the use of the nosam option is only difference between
a SAM-QFS and a QFS file system. On a host on which Sun StorageTek QFS was
installed, no archiving software is installed, and the "nosam" option
is useless.
SAM-FS, SAM-QFS, or QFS entries in the /etc/vfstab file
have the following format for the given fields:
Device to Mount: Specify the name of the family set to
mount. This is the same as the Family Set Name for the file system from the mcf
file.
Device to fsck: Enter a dash (-). SAM-FS/QFS file
systems don't undergo fsck checks.
Page 9
Mount Point: SAM-FS/QFS mount points are simply directories
like NFS, UFS or other mount points. In
this example the mount points are /sam1 and /qfs1. These names were chosen
arbitrarily and could have been any other directory names.
FS Type: The file system type is samfs for QFS, SAM-FS, or SAM-QFS file systems.
Mount at Boot: Enter yes, as for any other file system to
be mounted at boot.
|
File System |
How configured |
|
SAM-FS |
ms Equipment Type in mcf file SUNWsamfsr and SUNWsamfsu must be installed |
|
SAM-QFS |
ma Equipment Type in mcf file SUNWsamfsr and SUNWsamfsu must be installed |
|
QFS |
ma Equipment Type in mcf file SUNWqfsr and SUNWqfsu must be installed OR nosam mount option must be used |
SAM-FS has a large number of mount options that can be
specified in the vfstab or in the file /etc/opt/SUNWsamfs/samfs.cmd. Mount
options can also be specified in the command line if you are manually mounting
a file system. For a complete list of mount options, see the mount_samfs man
page.
If you have just one or two options for each file system,
it is probably simplest to put them in the vfstab. If you have more, the use of
the file /etc/opt/SUNWsamfs/samfs.cmd makes it easier to see and manage
options. The samfs.cmd file contains mount options, listed one per line under
the family set name of the file system to which they apply in the format fs=family_set_name. If you change this file
and want the new mount options to apply to a file system immediately you must
(in this order):
1) Unmount the file system
2) Run samd config
3) Remount the file system
Otherwise the changes will apply at the next reboot.
After the SAM-FS, SAM-QFS, or QFS file system has been initialized it can be mounted. This requires two steps: creating a mount point and mounting the file system with the mount command. When you mount a SAM-FS, SAM-QFS, or QFS file system you must specify that it is file system type samfs using the -F option to mount or with an entry in the /etc/vfstab file.
The mount command used with SAM-FS/QFS is the same used to
mount any file system. Its syntax as used with SAM-FS, SAM-QFS, and QFS file
systems is:
mount -F samfs -o mount_options family_set_name /mount_point
Page 10
If the /etc/vfstab file has been updated, you can mount a
file system by typing the mount command with the family set name or the mount
point.
If you are using an automated library with a barcode reader, the library’s firmware will read all the barcode labels in the library, and inform SAM of the VSNs included in the library. SAM will then use this information to build the library catalog. Every VSN in the library will be added to the catalog, but no information about utilization is initially included nor are any flags set for the VSN. The first time SAM needs a particular VSN, it instructs the library to load that item into a drive. The library locates the VSN using the barcode reader and places it in the drive. SAM then uses a utility called tplabel to write a SAM label onto the tape itself. This label is followed by the EOD mark. Once the VSN is labeled, it is initialized in the library catalog, and information about total utilization of tape is added to the catalog. SAM relies on the tape label that it writes at the beginning of the tape to determine that it has the correct tape. It cannot read the barcode label. It can only read what has been written on tape.
Each time a file is written to the tape, the existing EOD mark is overwritten and a new EOD mark is written at the end of the file. No SAM or Solaris utility can read past an EOD mark. At a cost, some tape manufacturers provide software that will read past such a mark, but this should not be relied on.
If you are not using an automated library with a barcode
reader, you must label all media cartridges with the tplabel command before using the SAM-FS or SAM-QFS software.
You can also use the tplabel command to relabel a tape in a
library, but you should not normally need to perform this operation. Exercise
great care in relabeling any tape. When you relabel a tape, you place a new
tape label on the tape, immediately followed by a new EOD mark. If you relabel
a tape containing existing archives, you will lose all the archives on the tape
and it is likely that they can never be recovered.
If you do relabel a tape, do not change the VSN. If a
barcoded tape has a different VSN than the VSN on the barcode label, the
library will not be able to locate the tape. SAM sees only the label on tape.
The library sees only the barcode label. Those must match.
To label a new tape volume, use the tplabel command in the
following format:
tplabel -new -vsn
vsn eq:slot
Specify the tape label as the argument to -vsn. The tape
label must be between one and six characters long. Use upper case alphabetic
characters, the digits, 0 to 9, or any of the following special characters: ! ”
% & ’ ( ) * + , - ./ : ; < - > ? _
For eq, use the equipment ordinal of the drive in
which the tape is currently mounted, as specified in the mcf file. For slot,
specify the number of a storage slot in an automated library where the tape
will ordinarily reside. The slot argument is not needed if you are
labeling a tape in a manually-loaded drive.
Page 11
The following command would give a new tape the label
TAPE01. This tape is mounted in the standalone tape drive defined by equipment
ordinal 100 in the mcf file:
# tplabel -new -vsn TAPE01 100
To relabel an existing tape volume, use the tplabel command
in the following format:
# tplabel -new
-vsn vsn -old vsn eq:slot
Specify the existing VSN as the argument to the -old
option, and the same name as the argument to -vsn. Otherwise the command is
used the same way it was to label a new tape. For example:
# tplabel -new
-vsn ABC123 -old ABC123 100:20
samu
The SAM-FS operator utility samu is a curses-based utility like the vi editor. It provides
functions to monitor SAM-FS devices and other file system activity and commands
to select and set display options, control access and the activity of devices,
and take snapshots of display windows.
Using the SAM-FS operator utility is similar to using the
UNIX vi editor in areas such as paging forward or backward, entering commands,
refreshing the display, and quitting the utility.
The samu utility
accepts commands that are entered in two ways. Some commands are performed by
typing one letter while the utility is running. For example, you can quit samu by typing the letter q at any
time. Other commands are entered by typing a colon after the utility has been
invoked, followed by the actual command. For example, typing "samu"
and then ":quit" will start the samu
utility and then quit it. Available commands are listed in the samu help pages.
When samu is
started, it displays the first of its help pages.
# samu
Help information page 1/15 samu 4.6.0 Mon 20
June 2007 02:32:31 PM PST
Displays:
a Archiver
status v
Robot catalog
c Device
configuration w Pending stage queue
d Daemon
trace controls C Memory
f File
systems F
Optical disk label
h Help
information I
Inode
l License
information J Preview shared memory
m Mass storage
status L Shared memory tables
n Staging
status M
Shared memory
o Optical
disk status N File
system parameters
p Removable
media load requests R SAM-Remote
r Removable
media S Sector data
s Device
status T
SCSI sense data
t Tape drive
status U Device table
u Staging
queue
more (ctrl-f)
Page 12
This first menu is the most important and most frequently
used. It lists the displays provided by samu
and the keystrokes needed to access them. The samu utility has a large number of displays and commands. Details
of the most commonly used functions are discussed as they are used in these
documents.
You can:
-Press
Control+F to page the display forward.
-Press
Control+B to page the display backward to previous pages.
-Press
h or ? to redisplay the main help menu at any time.
Display window contents and the exact format and amount of
information displayed on the terminal may be different depending on the
terminal model and the configuration of SAM-FS.
The samu output
can be used to monitor file system status.
server# samu
f
File systems
samu 4.6.0 Thu 29 June 2007 03:31:10 PM PDT
ty eq state
device_name status high
low mountpoint
server
ms 10 on
samfs1 m----2----d 80% 70%
/sam1
md 11 on
/dev/dsk/c1t2d2s0
md 12 on
/dev/dsk/c6t1d0s5
ma 20 on
qfs1 m----2----d 80%
70% /qfs1
mm 21 on
/dev/dsk/clt2d2s1
md 22 on
/dev/dsk/c6t1d0s0
For each file system and disk device in the mcf file,
output from this command provides the following:
Equipment type
Equipment ordinal
The state of the device
Equipment type identifier
Various information on the file system status including the
mount point and the high and low water marks used for releasing (discussed
later).
To exit samu, do one of the following:
Press the q key.
Enter :quit.
Enter :q.
samcmd
The samcmd
command provides a static command-line equivalent to the samu utility. To generate the displays provided by samu, samcmd is issued at the command line followed by the same
keystrokes used to generate displays in samu.
The samcmd command does not allow
you to move between functions as samu
does and its output does not update. Using samcmd
does not tie up a terminal window, nor does it require as many processing
resources as samu.
The format of the samcmd command is: samcmd command, where command represents the keystrokes used to generate displays in samu, or the keystrokes used to enter a command after
Page 13
the colon has been entered in samu. For example, the following command provides the same output as does the f display of the samu command:
server# samcmd f
File systems samu 4.6.0 Thu 29 Jume 2007 03:31:10 PM PDT
ty eq state device_name
status
high low mountpoint server
ms 10 on samfs1
m----2----d 80% 70% /sam1
md 11 on /dev/dsk/c1t2d2s0
md 12 on /dev/dsk/c6t1d0s5
ma 20 on qfs1 m----2----d 80% 70%
/qfs1
mm 21 on /dev/dsk/clt2d2s1
md 22 on /dev/dsk/c6t1d0s0
Verifying file system
function
To verify that file systems are mounted and that SAM is
functioning properly:
1. List all SAM-FS and SAM-QFS daemons that are running
with the following command.
# pgrep -l sam
You should see the daemons sam-fsd, sam-amld, and sam-archiverd, which start automatically when a SAM-FS or SAM-QFS file system is initialized or mounted. You should also see one instance of the daemon sam-arfind for each file system mounted.
2. Check the SAM-FS log file /var/opt/SUNWsamfs/sam-log for
any messages.
3. Use the df –h
command to verify that file systems are mounted.
4. Use the c option of the samu utility to check that the software can communicate with the
mass storage device. An example of output from the samu utility c option is
shown below:
Device configuration: samu 4.6.0 Fri June 30 14:19:11
ty eq state device_name
fs family_set
s9 100 on /dev/samst/c0t4u0
L180 L180
lt 101 on /dev/rmt/1cbn
100 L180
lt 102 on /dev/rmt/2cbn
100 L180
hy 300 on historian
300
5. Use the samfsinfo(1M) command to check the DAU:
# samfsinfo samfs1
samfsinfo: filesystem samfs1 is mounted.
name: samfs1 version: 2
time: Wed June 26 15:32:42 2007
count: 2
capacity: 00064280 DAU: 64
space: 0005c6a0
ord eq capacity space
device
0 11 00032140 0002e270 /dev/dsk/c1t2d2s0
1 12 00032140 0002e430
/dev/dsk/c6t1d0s5
Page 14
# samfsinfo qfs1
samfsinfo: filesystem qfs1 is mounted.
name: qfs1 version: 2
time: Wed June 26 15:45:42 2007
count: 2
capacity: 00032140 DAU:
64
space: 0002dd80
meta capacity: 00032140 meta DAU: 16
meta space: 000309b0
ord eq capacity space
device
0 21 00032140 0002e270
/dev/dsk/c1t2d2s1
1 22 00032140 0002e430
/dev/dsk/c6t1d0s0
samfsinfo
The samfsinfo command
displays the file system structure for a specified file system. The syntax for samfsinfo is: samfsinfo fs_name where fs_name is the family set name
specified for the file system in the mcf file. The output from samfsinfo includes:
-The
information that the file system is mounted
-The file system superblock version. Unless you are
upgrading from version 3.x of the software, this will always be 2
-The
time and date that the file system was initialized
-The
size of the DAUs for metadata and data devices
-The
disk devices included in the file system, their equipment ordinals, and the
order in which SAM-FS, SAM-QFS, or QFS use the devices.
The size of the file system and its included devices is
presented in hexadecimal. This information, in decimal, is available in the
output of samcmd m and samcmd f. The command samfsinfo is useful because it is
the only command that outputs the
value of the DAU.