C H A P T E R  4

File System Operations

This chapter presents topics related to file system operations. It presents the following topics:

Certain other types of operations and upgrades also need to be performed within Sun StorEdge QFS and Sun StorEdge SAM-FS environments. The following publications describe these other types of operations:


Initializing a File System

You can use the sammkfs(1M) command to initialize or reinitialize a Sun StorEdge QFS or Sun StorEdge SAM-FS file system. The following example shows the sammkfs(1M) command in its simplest form, with the file system name as its only argument:

# sammkfs samqfs1

The preceding command builds a version 2 superblock. The Sun StorEdge QFS and Sun StorEdge SAM-FS file systems support two different superblocks. The Sun StorEdge QFS and Sun StorEdge SAM-FS 4.1 releases support existing file systems with version 1 superblocks, but you cannot create a version 1 superblock with the 4.1 release of the software.

For more information about the sammkfs(1M) command, its options, and the implications of the version 1 and version 2 superblocks, see Initializing a File System, or see the sammkfs(1M) man page.


Propagating Configuration File Changes to the System

This section contains procedures that describe how to propagate configuration file changes out to the system. The procedures describe propogating changes for the following files:

You must perform these procedures under the following circumstances:

The following sections describe the procedures:


procedure icon  To Change archiver.cmd(4) or stager.cmd(4) Information

1. Use vi(1) or another editor to edit the archiver.cmd(4) or stager.cmd(4) file.

2. Use the archiver(1M) -lv command to verify the correctness of the archiver.cmd(4) file. (Optional)

Perform this step only if you are changing an existing archiver.cmd(4) file.

3. Save and close the file.

4. Use the samd(1M) config command to propagate the file changes and restart the system.

For example:

# samd config


procedure icon  To Change mcf(4) or defaults.conf(4) Information in a Sun StorEdge QFS Environment

1. Use vi(1) or another editor to edit the file and change the file system information.

2. Use the sam-fsd(1M) command to check the mcf file for errors. (Optional)

Perform this step if you are changing an mcf file. For example:

# sam-fsd

If the output from this command shows errors, correct them prior to proceeding to the next step.

3. Use the samd(1M) config command to propagate the mcf or defaults.conf file changes.

For example:

# samd config

For more information about these files, see the defaults.conf(4) or mcf(4) man pages.


procedure icon  To Change mcf(4) or defaults.conf(4) File System Information in a Sun StorEdge SAM-FS or Sun SAM-QFS Environment

1. Use vi(1) or another editor to edit the file and change the file system information.

2. Use the sam-fsd(1M) command to check the mcf file for errors. (Optional)

Perform this step if you are changing an mcf file. The format of this command is as follows:

# sam-fsd

If the output from this command shows errors, correct them prior to proceeding to the next step.

3. Issue a samcmd(1M) aridle command to idle the archiver for each file system defined in the mcf file. (Optional)

You must perform this step if you are removing or changing information related to one or more file systems. Use this command in the following format:

samcmd aridle fs.fsname

For fsname, specify the name of a file system defined in the mcf file. Issue this command for every file system in the mcf file that is affected by the change.

4. Issue a samcmd(1M) idle command to idle the archiver for each equipment ordinal assigned to a drive in the mcf file. (Optional)

You must perform this step if you are removing or changing information related to one or more drives. Use this command in the following format:

samcmd idle eq

For eq, specify the Equipment Ordinal of a drive defined in the mcf file. Repeat this command as necessary for all drives in your mcf file affected by the change.

5. Issue the umount(1M) command to unmount the file system(s) affected by the changes.

For more information about unmounting the file system, see Unmounting a File System.

6. Use the samd(1M) config command to propagate the changes.

For example:

# samd config

7. Use the mount(1M) command to remount the file system(s) you unmounted.

For more information about these files, see the defaults.conf(4) or mcf(4) man pages.


procedure icon  To Change mcf(4) or defaults.conf(4) Removable Media Drive Information

1. Edit the file and change the removable media drive information.

2. Use the sam-fsd(1M) command to check the mcf file for errors. (Optional)

Perform this step if you are changing an mcf file. Use this command in the following format:

# sam-fsd

If the output from this command shows errors, correct them prior to proceeding to the next step.

3. Issue a samcmd(1M) aridle command to idle the archiver for each file system defined in the mcf file. (Optional)

Perform this step if you are removing or changing information related to one or more file systems. Use this command in the following format:

samcmd aridle fs.fsname

For fsname, specify the name of a file system defined in the mcf file. Issue this command for every file system in the mcf file that is affected by the change.

4. Issue a samcmd(1M) idle command for each Equipment Ordinal assigned to a drive in the mcf file. (Optional)

Perform this step if you are removing or changing information related to one or more drives. Use this command in the following format:

samcmd idle eq

For eq, specify the Equipment Ordinal of a drive defined in the mcf file. Repeat this command as necessary for all drives in your mcf file affected by the change.

5. Use the samd(1M) stop command to stop all removable media activity.

For example:

# samd stop

6. Use the samd(1M) config command to propagate the changes and restart the system.

For example:

# samd config

For more information about these files, see the defaults.conf(4) or mcf(4) man pages.


Mounting a File System

You can mount a Sun StorEdge QFS or Sun StorEdge SAM-FS file system by using the Solaris OS mount(1M) command. This section describes the various ways that mount options can be specified.

Mount parameters are used to manipulate file system characteristics. There are several ways to specify mount parameters, and some specification methods override others. You can specify mount options in the following ways:

1. With the mount(1M) command using command line options. Highest priority. Options specified on the Solaris OS mount(1M) command line override other options specified in the /etc/vfstab file, directives specified in the samfs.cmd file, and system default settings.

2. As /etc/vfstab file settings. Second priority.

3. In the samfs.cmd file using directives. Third priority.

4. System defaults. Fourth (lowest) priority. The default system settings are the configurable settings already defined for your Solaris OS. You can override the system settings with specifications in the samfs.cmd file, in the /etc/vfstab file, and on the mount(1M) command.

You can also specify mount options by using the the samu(1M) operator utility or the samcmd(1M) command. Mount options enabled or disabled by using any of these utilities persist until the file system is unmounted.

The following sections describe the ways to specify mount options in more detail, explain when to use these files and commands, and show the order in which they take precedence. In addition to the following sections, the Sun StorEdge QFS and Sun StorEdge SAM-FS Software Installation and Configuration Guide includes information about mounting a file system.

The mount(1M) Command

The Solaris OS mount(1M) command mounts the file system and enables you to specify settings that override the settings specified in the /etc/vfstab file and in the /etc/opt/SUNWsamfs/samfs.cmd file. For example, you can specify the stripe width, readahead, writebehind, high and low water marks for disk cache utilization, and so on.

One way to use the mount(1M) command in conjunction with the samfs.cmd file is to use the samfs.cmd file as your main location for mount options and to use options on the mount(1M) command when experimenting with or tuning your system. The mount(1M) command options override both the /etc/vfstab entries and the directives in the samfs.cmd file.

Example. The following command mounts file system qfs1 at /work with setuid execution disallowed and qwrite enabled. The qfs1 file system name is the Equipment Identifier. This also appears in the mcf file's Equipment Identifier field for this file system. To specify more than one mount option, separate each with a comma.

# mount -o nosuid,qwrite qfs1 /work

For more information about the mount(1M) command, see the mount_samfs(1M) man page.

The /etc/vfstab File

The /etc/vfstab Solaris OS system file must contain a line for each Sun StorEdge QFS or Sun StorEdge SAM-FS file system that is defined in the mcf file. For each file system, you must provide information for the seven fields shown in TABLE 4-1.

TABLE 4-1 Fields in the /etc/vfstab File

Field Number

Content

1

The file system family set name.

2

The file system to samfsck(1M).

3

The mount point.

4

The file system type. This is always samfs, even for Sun StorEdge QFS file systems.

5

The samfsck(1M) pass.

6

Mount at boot options.

7

Mount parameters.


The fields in the /etc/vfstab file must be separated by either space or tab characters. The mount parameters in the seventh field, however, must each be separated by a comma character (,) without any intervening spaces.

Example. The following is an example of an /etc/vfstab file.

qfs1    -    /qfs    samfs    -    yes    stripe=0

The mount parameters field can contain any of the mount parameters listed as arguments to the -o option on the mount_samfs(1M) man page. These parameters are nearly identical to those that you can specify as directive lines in the samfs.cmd file or as arguments to the -o option on the mount(1M) command. As with the samfs.cmd file, you can include specifications for various I/O settings, readahead, writebehind, the stripe width, various storage and archive management (SAM) settings, Qwrite, and other features.

For more information about possible mount parameters, see the mount_samfs(1M) man page. For more information about modifying the /etc/vfstab file, see the vfstab(4) man page.

The samfs.cmd File

The /etc/opt/SUNWsamfs/samfs.cmd file enables you to specify mount parameters for all your Sun StorEdge QFS and Sun StorEdge SAM-FS file systems. This file can be useful when you have multiple file systems configured and you want to specify the same mount parameters for them.

The list of possible mount parameters is very comprehensive. The possible mount parameters you can specify pertain to I/O settings, readahead, writebehind, the stripe width, various storage and archive management (SAM) settings, Qwrite, and other features.

Using this file enables you to define all your mount parameters in one place in an easily readable format. Directives specified toward the beginning of this file are global directives, and they apply to all Sun StorEdge QFS and Sun StorEdge SAM-FS file systems. The second part of this file enables you to indicate the specific parameters that you want to apply to each individual file system. The ability to specify the common parameters once, and only in one place, differentiates this file from the /etc/vfstab file, in which you must specify all mount parameters for each file system in the seventh field.

The mount parameters that can be specified in the samfs.cmd file are nearly identical to those that you can specify in the /etc/vfstab file or as arguments to the -o option on the mount(1M) command. For more information about the mount parameters that can be specified in this file, see the samfs.cmd(4) man page.

In the samfs.cmd file, the directives are written one per line. The file can contain comments, which must begin with a pound character (#). Characters that appear to the right of the pound character are treated as comments.

Directives that appear before any fs = line apply globally to all file systems. A line that starts with fs = must precede directives that are specific to a particular file system. Directives specific to a particular file system override global directives.

CODE EXAMPLE 4-1 is a sample samfs.cmd file that sets the low and high water marks for disk cache utilization and specifies individualized parameters for two file systems.

CODE EXAMPLE 4-1 Example samfs.cmd File
low = 50
high = 75
fs = samfs1
high = 65
writebehind = 512
readahead = 1024
fs = samfs5
partial = 64

The directives in the samfs.cmd file serve as defaults and override any default system settings, but arguments to the mount(1M) command override any directives in this file. Entries in the /etc/vfstab file also override directives specified in the samfs.cmd file.

For information about which directives can be entered in the samfs.cmd file, see the samfs.cmd(4) man page. For information about the mount(1M) command, see the mount_samfs(1M) man page.


Unmounting a File System

You can use the Solaris OS umount(1M) command to unmount Sun StorEdge QFS and Sun StorEdge SAM-FS file systems.

On Sun StorEdge SAM-FS and Sun SAM-QFS file systems, you must issue commands to stop the archiver prior to unmounting the file system. The following procedure shows you how to idle the archiver and unmount the file system. You do not need to idle the archiver if you are using a Sun StorEdge QFS file system.


procedure icon  To Unmount Sun StorEdge SAM-FS and Sun SAM-QFS File Systems

1. Issue a samcmd(1M) aridle fs.fsname command for the file system. (Optional)

Perform this step if you are unmounting a Sun StorEdge SAM-FS or Sun SAM-QFS file system. For example:

# samcmd aridle fs.samqfs2

This step in the procedure cleanly halts the archiving for file system samqfs2. Specifically, it allows archiving operations to halt at a logical place before stopping the daemons.

2. Issue a samd(1M) stop command. (Optional)

Perform this step if you are unmounting a Sun StorEdge SAM-FS or Sun SAM-QFS file system. For example:

# samd stop

3. Unmount the file system.

# umount /samqfs

Several conditions can be present in a file system at unmounting time, so you might need to issue the umount(1M) command a second time. If the file system still does not unmount, use unshare(1M), fuser(1M), or other commands in conjunction with the umount(1M) command. Unmounting procedures are also described in the Sun StorEdge QFS and Sun StorEdge SAM-FS Software Installation and Configuration Guide.


Checking File System Integrity and Repairing File Systems

Sun StorEdge QFS and Sun StorEdge SAM-FS file systems write validation records in the following records that are critical to file system operations: directories, indirect blocks, and inodes. If the file system detects corruption while searching a directory, it issues an EDOM error, and the directory is not processed. If an indirect block is not valid, it issues an ENOCSI error, and the file is not processed. TABLE 4-2 summarizes these error indicators.

TABLE 4-2 Error Indicators

Error

Solaris OS Meaning

Sun StorEdge QFS and Sun StorEdge SAM-FS Meaning

EDOM

Argument is out of domain.

Values in validation records are out of range.

ENOCSI

No CSI structure is available.

Links between structures are invalid.


In addition, inodes are validated and cross checked with directories.

You should monitor the following files for error conditions:

If a discrepancy is noted, you should unmount the file system and check it using the samfsck(1M) command.


procedure icon  To Check a File System

single-step bulletUse the samfsck(1M) command to perform a file systems check.

Use this command in the following format:

samfsck -V family_set_name

For family_set_name, specify the name of the file system as specified in the mcf file.

You can send output from samfsck(1M) to both your screen and to a file by using it in conjunction with the tee(1) command, as follows.

Nonfatal errors returned by samfsck(1M) are preceded by NOTICE. Nonfatal errors are lost blocks and orphans. The file system is still consistent if NOTICE errors are returned. You can repair these nonfatal errors during a convenient, scheduled maintenance outage.

Fatal errors are preceded by ALERT. These errors include duplicate blocks, invalid directories, and invalid indirect blocks. The file system is not consistent if these errors occur. Notify Sun if the ALERT errors cannot be explained by a hardware malfunction.

If the samfsck(1M) command detects file system corruption and returns ALERT messages, you should determine the reason for the corruption. If hardware is faulty, repair it prior to repairing the file system.

For more information about the samfsck(1M) and tee(1) commands, see the samfsck(1M) and tee(1) man pages.


procedure icon  To Repair a File System

1. Use the umount(1M) command to unmount the file system.

Run the samfsck(1M) command when the file system is not mounted.

2. Use the samfsck(1M) command to repair a file system

You can issue the samfsck(1M) command in the following format to repair a file system:

# samfsck -F -V family_set_name

For family_set_name, specify the name of the file system as specified in the mcf file.


Preserving Information for an Upgrade

If you are about to add or change disks, controllers, or other equipment in your environment, it can be difficult to correct or regenerate all the file system descriptions in the mcf file. The samfsconfig(1M) command can help you by generating information about your file system and file system components after making these changes.

The samfsconfig(1M) command examines devices and determines if any of them have Sun StorEdge QFS or Sun StorEdge SAM-FS superblocks on them. It uses information from the discovered superblocks and aggregates the devices into a format similar to an mcf file. You can save this format and edit it to recreate a damaged, missing, or incorrect mcf file.

This command returns information about each device that you specify and writes this information to stdout. The command can retrieve the family set number of the base device (the file system itself), the file system type (ma or ms), and whether the file system is a Sun StorEdge QFS shared file system.

Irregularities are flagged with one of the following:

If necessary, this command's output can be used to help regenerate the file system portions of your mcf file if your system is reconfigured or experiences a disaster. The following examples show output from the samfsconfig(1M) command.

Example 1

In this example, the system administrator has put a list of device names into a file. These device names are not accounted for in the environment. The system administrator wants to examine only these devices for Sun StorEdge QFS and Sun StorEdge SAM-FS family sets. The results show some old fragments of family sets and several complete instances.

CODE EXAMPLE 4-2 Example 1 - Output From samfsconfig (1M) Command
mn# samfsconfig -v `cat /tmp/dev_files`
Device '/dev/dsk/c0t0d0s0' doesn't have a SAM-FS superblock (SBLK).
Device '/dev/dsk/c0t0d0s1' doesn't have a SAM-FS superblock (SBLK).
Device '/dev/dsk/c0t0d0s3' doesn't have a SAM-FS superblock (SBLK).
Device '/dev/dsk/c0t0d0s4' doesn't have a SAM-FS superblock (SBLK).
Device '/dev/dsk/c0t0d0s5' doesn't have a SAM-FS superblock (SBLK).
Device '/dev/dsk/c0t0d0s6' doesn't have a SAM-FS superblock (SBLK).
Device '/dev/dsk/c0t0d0s7' doesn't have a SAM-FS superblock (SBLK).
Couldn't open '/dev/dsk/c0t1d0s0';  errno=5.
Couldn't open '/dev/dsk/c0t1d0s1';  errno=5.
Device '/dev/dsk/c0t1d0s3' doesn't have a SAM-FS superblock (SBLK).
Device '/dev/dsk/c0t1d0s4' has a SAM-FS superblock.
Device '/dev/dsk/c0t1d0s5' has a SAM-FS superblock.
Device '/dev/dsk/c0t1d0s6' has a SAM-FS superblock.
Couldn't open '/dev/dsk/c0t1d0s7';  errno=5.
Couldn't open '/dev/dsk/c0t6d0s0';  errno=16.
Couldn't open '/dev/dsk/c0t6d0s1';  errno=16.
Couldn't open '/dev/dsk/c0t6d0s3';  errno=16.
Couldn't open '/dev/dsk/c0t6d0s4';  errno=16.
Couldn't open '/dev/dsk/c0t6d0s5';  errno=16.
Couldn't open '/dev/dsk/c0t6d0s6';  errno=16.
Couldn't open '/dev/dsk/c0t6d0s7';  errno=16.
Couldn't open '/dev/dsk/c1t0d0s3';  errno=5.
Couldn't open '/dev/dsk/c1t0d0s4';  errno=5.
Couldn't open '/dev/dsk/c1t0d0s5';  errno=5.
Device '/dev/dsk/c1t0d0s6' doesn't have a SAM-FS superblock (SBLK).
Couldn't open '/dev/dsk/c1t0d0s7';  errno=5.
Couldn't open '/dev/dsk/c1t1d0s0';  errno=2.
Couldn't open '/dev/dsk/c1t2d0s3';  errno=5.
Couldn't open '/dev/dsk/c1t2d0s4';  errno=5.
Couldn't open '/dev/dsk/c1t2d0s5';  errno=5.
Device '/dev/dsk/c1t2d0s6' doesn't have a SAM-FS superblock (SBLK).
Couldn't open '/dev/dsk/c1t2d0s7';  errno=5.
Could not read from device '/dev/dsk/c1t3d0s0'; errno=5.
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/c1t4d0s6' doesn't have a SAM-FS superblock (SBLK).
Device '/dev/dsk/c1t4d0s7' doesn't have a SAM-FS superblock (SBLK).
Couldn't open '/dev/dsk/c1t5d0s3';  errno=5.
Couldn't open '/dev/dsk/c1t5d0s4';  errno=5.
Couldn't open '/dev/dsk/c1t5d0s5';  errno=5.
Device '/dev/dsk/c1t5d0s6' doesn't have a SAM-FS superblock (SBLK).
Couldn't open '/dev/dsk/c1t5d0s7';  errno=5.
Device '/dev/dsk/c3t0d0s0' doesn't have a SAM-FS superblock (SBLK).
Device '/dev/dsk/c3t0d0s1' doesn't have a SAM-FS superblock (SBLK).
Device '/dev/dsk/c3t0d0s3' has a SAM-FS superblock.
Device '/dev/dsk/c3t0d0s4' has a SAM-FS superblock.
Couldn't open '/dev/dsk/c3t0d0s7';  errno=5.
Device '/dev/dsk/c3t1d0s0' doesn't have a SAM-FS superblock (SBLK).
Device '/dev/dsk/c3t1d0s1' doesn't have a SAM-FS superblock (SBLK).
Device '/dev/dsk/c3t1d0s3' has a SAM-FS superblock.
Device '/dev/dsk/c3t1d0s4' has a SAM-FS superblock.
Couldn't open '/dev/dsk/c3t1d0s7';  errno=5.
Device '/dev/dsk/c4t0d0s0' has a SAM-FS superblock.
Could not read from device '/dev/dsk/c4t0d0s1'; errno=5.
Could not read from device '/dev/dsk/c4t0d0s3'; errno=5.
Could not read from device '/dev/dsk/c4t0d0s4'; errno=5.
Could not read from device '/dev/dsk/c4t0d0s5'; errno=5.
Device '/dev/dsk/c4t0d0s6' has a SAM-FS superblock.
Device '/dev/dsk/c4t0d0s7' has a SAM-FS superblock.
Device '/dev/dsk/c4t1d0s0' has a SAM-FS superblock.
Could not read from device '/dev/dsk/c4t1d0s1'; errno=5.
Could not read from device '/dev/dsk/c4t1d0s3'; errno=5.
Could not read from device '/dev/dsk/c4t1d0s4'; errno=5.
Could not read from device '/dev/dsk/c4t1d0s5'; errno=5.
Device '/dev/dsk/c4t1d0s6' has a SAM-FS superblock.
Device '/dev/dsk/c4t1d0s7' has a SAM-FS superblock.
Device '/dev/dsk/c4t2d0s0' has a SAM-FS superblock.
Could not read from device '/dev/dsk/c4t2d0s1'; errno=5.
Could not read from device '/dev/dsk/c4t2d0s3'; errno=5.
Could not read from device '/dev/dsk/c4t2d0s4'; errno=5.
Could not read from device '/dev/dsk/c4t2d0s5'; errno=5.
Device '/dev/dsk/c4t2d0s6' has a SAM-FS superblock.
Device '/dev/dsk/c4t2d0s7' has a SAM-FS superblock.
Device '/dev/dsk/c4t3d0s0' has a SAM-FS superblock.
Could not read from device '/dev/dsk/c4t3d0s1'; errno=5.
Could not read from device '/dev/dsk/c4t3d0s3'; errno=5.
Could not read from device '/dev/dsk/c4t3d0s4'; errno=5.
Could not read from device '/dev/dsk/c4t3d0s5'; errno=5.
Device '/dev/dsk/c4t3d0s6' has a SAM-FS superblock.
Device '/dev/dsk/c4t3d0s7' has a SAM-FS superblock.
19 SAM-FS devices found.
#
# Family Set 'samfs2' Created Mon Jun 25 10:37:52 2001
#
# Missing slices
# Ordinal 1
# /dev/dsk/c0t1d0s6    12    md   samfs2  -
#
# Family Set 'samfs1' Created Wed Jul 11 08:47:38 2001
#
# Missing slices
# Ordinal 1
# /dev/dsk/c0t1d0s4    12    md   samfs1  -
# Ordinal 2
# /dev/dsk/c0t1d0s5    13    md   samfs1  -
#
# Family Set 'samfs2' Created Sat Nov  3 17:22:44 2001
#
samfs2 ma 30 samfs2 - shared
/dev/dsk/c4t0d0s6    31    mm   samfs2  -
/dev/dsk/c4t1d0s6    32    mr   samfs2  -
/dev/dsk/c4t2d0s6    33    mr   samfs2  -
#
# Family Set 'qfs1' Created Wed Nov  7 15:16:19 2001
#
qfs1 ma 10 qfs1 -
/dev/dsk/c3t0d0s3    11    mm   qfs1  -
/dev/dsk/c3t0d0s4    12    g0   qfs1  -
/dev/dsk/c3t1d0s3    13    g0   qfs1  -
/dev/dsk/c3t1d0s4    14    g0   qfs1  -
#
# Family Set 'sharefsx' Created Wed Nov  7 16:55:19 2001
#
sharefsx ma 200 sharefsx - shared
/dev/dsk/c4t0d0s0    210    mm   sharefsx  -
/dev/dsk/c4t1d0s0    220    mr   sharefsx  -
/dev/dsk/c4t2d0s0    230    mr   sharefsx  -
/dev/dsk/c4t3d0s0    240    mr   sharefsx  -
#
# Family Set 'samfs5' Created Tue Nov 27 16:32:28 2001
#
samfs5 ma 80 samfs5 -
/dev/dsk/c4t3d0s6    82    mm   samfs5  -
/dev/dsk/c4t3d0s7    83    g0   samfs5  -
/dev/dsk/c4t0d0s7    84    g0   samfs5  -
/dev/dsk/c4t1d0s7    85    g1   samfs5  -
/dev/dsk/c4t2d0s7    86    g1   samfs5  -

Example 2

In this example, the devices flagged with a greater-than sign (>) are duplicated. The s0 slice starts at the start of disk, as does the whole disk (s2) slice. This is the style of output obtained in a Solaris 9 OS.

CODE EXAMPLE 4-3 shows the samfsconfig(1M) command and output.

CODE EXAMPLE 4-3 Example 2 - Output from samfsconfig Command
# samfsconfig /dev/dsk/c3t*
#
# Family Set 'shsam1' Created Wed Oct 17 14:57:29 2001
#
shsam1 160 ma shsam1 shared
> /dev/dsk/c3t50020F23000055A8d0s2    161    mm   shsam1  -
> /dev/dsk/c3t50020F23000055A8d0s0    161    mm   shsam1  -
/dev/dsk/c3t50020F23000055A8d0s1    162    mr   shsam1  -
> /dev/dsk/c3t50020F23000078F1d0s0    163    mr   shsam1  -
> /dev/dsk/c3t50020F23000078F1d0s2    163    mr   shsam1  -
/dev/dsk/c3t50020F23000078F1d0s1    164    mr   shsam1  -

Example 3

In this example, the whole disk slice (slice 2) is left off of the command line. This is the style of output obtained in a Solaris 9 OS.

CODE EXAMPLE 4-4 shows the samfsconfig(1M) command and output.

CODE EXAMPLE 4-4 Example 3 - Output from samfsconfig (1M) Command
# samfsconfig /dev/dsk/c3t*s[013-7]
#
# Family Set 'shsam1' Created Wed Oct 17 14:57:29 2001
#
shsam1 160 ma shsam1 shared
/dev/dsk/c3t50020F23000055A8d0s0    161    mm   shsam1  -
/dev/dsk/c3t50020F23000055A8d0s1    162    mr   shsam1  -
/dev/dsk/c3t50020F23000078F1d0s0    163    mr   shsam1  -
/dev/dsk/c3t50020F23000078F1d0s1    164    mr   shsam1  -

For more information about this command, see the samfsconfig(1M) man page.


Preparing for a Hardware Device Upgrade

Whether upgrading a server, adding a new tape drive, adding an automated library, or installing a different drive into an existing automated library, it is best to plan in advance. This section prepares you for hardware upgrades to devices within your environment.

Sun Microsystems recommends the following actions prior to the upgrade:

Examples of changes that do not require a license upgrade include adding memory and increasing disk cache. Examples of changes that require a license upgrade include adding more slots in an automated library and changing the model of your server.

You can idle the archiver in one of the following ways:

For more information, see the samcmd(1M) man page.


Adding Disk Cache to a File System

At some point, you might want to add disk partitions or disk drives in order to increase the disk cache for a file system. You accomplish this by updating the mcf file and using the samgrowfs(1M) command. You do not need to reinitialize or restore the file system.

In Sun StorEdge SAM-FS and Sun SAM-QFS environments, note that when adding disks or partitions, the system might update the Equipment Ordinal of the historian. The system automatically generates the Equipment Ordinal of the historian unless you specifically call it out. For more information, see the historian(7) man page.


procedure icon  To Add Disk Cache to a File System

1. Unmount the file system you want to expand.

For information about unmounting a file system, see Unmounting a File System.

2. If you want to rename the file system during this procedure, use the samfsck(1M) command with its -R and -F options to rename the file system. (Optional)

For more information about this command, see the samfsck(1M) man page.

3. Edit the /etc/opt/SUNWsamfs/mcf file.

You can configure up to 252 disk partitions in a file system.

To increase the size of a Sun StorEdge QFS file system, at least one new metadata partition must be added. Metadata partitions require an Equipment Type of mm. Zero or more data partitions can be added.

If you want to add new partitions for metadata or for data, add them to the mcf file after the existing disk partitions. Save the changes, and quit the editor.

Do not change the Equipment Identifier name in the /etc/opt/SUNWsamfs/mcf file. If the name in the mcf file does not match the name in the superblock, the file systems can no longer be mounted. Instead, the following message is logged in /var/adm/messages:

WARNING SAM-FS superblock equipment identifier <id>s on eq <eq> does not match <id> in mcf

4. Type the sam-fsd(1M) command to check for errors in the mcf file.

For example:

# sam-fsd

If the sam-fsd(1M) command output indicates that there are errors in the mcf file, fix them before proceeding to the next step in this procedure.

5. Type the samd(1M) config command to propagate the mcf file changes to the system.

For example:

# samd config

For more information about the samd(1M) command, see the samd(1M) man page.

6. Type the samgrowfs(1M) command on the file system that is being expanded.

For example, type the following command to expand file system samfs1:

# samgrowfs samfs1

If you renamed your file system, run the samgrowfs(1M) command on the new name. For more information about this command, see the samgrowfs(1M) man page.

7. Mount the file system.


Replacing Disks in a File System

At some point, you might want to perform the following tasks:

To accomplish these tasks, you need to back up and recreate the file system by following the steps in this procedure.


procedure icon  To Back Up and Recreate a File System

1. Back up all site-customized system files and configuration files.

Depending on your software, these files can include mcf, archiver.cmd, defaults.conf, samfs.cmd, inquiry.conf, and so on. Back up these files for all file systems in your Sun StorEdge QFS and Sun StorEdge SAM-FS environments. Also make sure that you have backup copies of files in the /etc/opt/SUNWsamfs directory, files in the /var/opt/SUNWsamfs directory, library catalogs, the historian, and any parameter files for network-attached automated libraries.

In Sun StorEdge SAM-FS and Sun SAM-QFS environments, if you do not know the names and locations of your catalog files, examine the mcf file with vi(1) or another viewing command and find the first rb entry in the mcf file. That entry contains the name of the library catalog file. If no catalog file location is specified, then the system is using the default location (/var/opt/SUNWsamfs/catalog).

2. Ensure that each file system to be modified is backed up.

The file systems should be backed up regularly according to your site's policies. This is described as the last step in the installation procedure. If you are comfortable with the backup files that already exist for your file systems, there is no need to back them up again now. If, however, you need to back up your file systems to preserve information created since the last dump file was created, do so now. For information about how to create a dump file, see the Sun StorEdge QFS and Sun StorEdge SAM-FS Software Installation and Configuration Guide.

Note that if you are using the Sun StorEdge SAM-FS or Sun SAM-QFS file system, the samfsdump(1M) command issues warnings when creating the dump file if it encounters unarchived files in the file system. If warnings are issued, these files need to be archived before unmounting the file systems.

3. Unmount the file system.

For information about unmounting a file system, see Unmounting a File System.

4. If you want to rename the file system during this procedure, use the samfsck(1M) command with its -R and -F options to rename the file system. (Optional)

For more information about this command, see the samfsck(1M) man page.

5. Edit the /etc/opt/SUNWsamfs/mcf file.

You can configure up to 252 disk partitions in a file system. Edit the mcf file to add or delete disks or partitions. New partitions must be added after existing disk partitions. Save the changes, and quit the editor.

To increase the size of a Sun StorEdge QFS file system, at least one new metadata partition must be added. Metadata partitions require an Equipment Type of mm. Zero or more data partitions can be added.

Do not change the Equipment Identifier name in the /etc/opt/SUNWsamfs/mcf file. If the name in the mcf file does not match the name in the superblock, the file systems can no longer be mounted. Instead, the following message is logged in /var/adm/messages:

WARNING SAM-FS superblock equipment identifier <id>s on eq <eq> does not match <id> in mcf

6. Type the sam-fsd(1M) command to check for errors in the mcf file.

For example:

# sam-fsd

If the sam-fsd(1M) command output indicates that there are errors in the mcf file, fix them before proceeding to the next step in this procedure.

For more information, see the sam-fsd(1M) man page.

7. Type the samd(1M) config command to propagate the mcf file changes.

For example:

# samd config

For more information, see the samd(1M) man page.

8. Type the sammkfs(1M) command to make a new file system.

For example, the following command creates samfs10:

# sammkfs samfs10

9. Type the mount(1M) command to mount the file system.

For information about mounting a Sun StorEdge QFS or Sun StorEdge SAM-FS file system, see the mount_samfs(1M) man page.

10. Type the cd(1) command to change to the mount point of the file system.

11. Use the samfsrestore(1M) or qfsrestore(1M) command to restore each file.

Restore from the the dump file you had or from the dump file created in Step 2.

For information about using these commands, see the samfsdump(1M) or qfsdump(1M) man pages, or see the Sun QFS, Sun SAM-FS, and Sun SAM-QFS Disaster Recovery Guide.

12. Use the restore.sh(1M) script to stage back all files that had been online.

Use this command in the following format:

# restore.sh log_file mount_point

For log_file, specify the name of the log file that was created by the sammkfs(1M) or the samfsrestore(1M) commands.

For mount_point, specify the mount point of the file system being restored.

For information about the restore.sh(1M) script, see the restore.sh(1M) man page.


Upgrading a Host System

When it comes time to upgrade the host system being used for the file system, take the following into account:

You can use the installation instructions in the Sun StorEdge QFS and Sun StorEdge SAM-FS Software Installation and Configuration Guide when re-installing the software.


Upgrading the Solaris OS

The following sections describe how to upgrade your Solaris OS:


procedure icon  To Upgrade Your Solaris OS in a Sun StorEdge SAM-FS or Sun SAM-QFS Environment

Many of the steps involved in upgrading your Solaris OS level are identical to the steps involved in upgrading your Sun StorEdge SAM-FS or Sun SAM-QFS environment. Some of the steps in this procedure reference procedures in the Sun StorEdge QFS and Sun StorEdge SAM-FS Software Installation and Configuration Guide.

1. Obtain the software upgrade.

The Sun StorEdge SAM-FS and Sun SAM-QFS software supports various levels of the Solaris OS. You should not reinstall your old Sun StorEdge SAM-FS or Sun SAM-QFS software onto your newly upgraded Solaris OS.

In addition, depending on the revision level currently installed and the level to which you are upgrading, you might need a new software license.

Contact your ASP or Sun Microsystems to obtain new copies of the software and to determine whether or not your site needs a new license.

2. Back up all site-customized system files and configuration files.

These files include mcf, archiver.cmd, defaults.conf, samfs.cmd, inquiry.conf, and so on. Back up these files for all file systems in your Sun StorEdge SAM-FS and Sun SAM-QFS environments.

Also make sure that you have backup copies of files in the /etc/opt/SUNWsamfs directory, files in the /var/opt/SUNWsamfs directory, library catalogs, the historian, and any parameter files for network-attached automated libraries.

If you do not know the names and locations of your catalog files, examine the mcf file with vi(1) or another viewing command and find the first rb entry in the mcf file. That entry contains the name of the library catalog file. If no catalog file location is specified, then the system is using the default location (/var/opt/SUNWsamfs/catalog).

3. Ensure that each file system affected is backed up.

The file systems should be backed up regularly according to your site's policies. This is one of the the last steps in the installation procedure. If you are comfortable with the backup files that already exist for your file systems, there is no need to back them up again now. If, however, you need to back up your file systems to preserve information created since the last dump file was created, do so now.

Note that if you are using the Sun StorEdge SAM-FS or Sun SAM-QFS file system, the samfsdump(1M) command issues warnings when creating the dump file if it encounters unarchived files in the file system. If warnings are issued, these files need to be archived before unmounting the file systems.

4. Unmount the file systems.

For information about unmounting a file system, see Unmounting a File System.

5. Remove existing Sun StorEdge SAM-FS or Sun SAM-QFS software.

Use the pkgrm(1M) command to remove the existing software. You must remove all existing Sun StorEdge SAM-FS and Sun SAM-QFS packages before installing either the new packages or the new operating system level.

For example, the following command removes the SUNWsamtp, SUNWsamfsu, and the SUNWsamfsr packages in a Sun StorEdge SAM-FS or Sun SAM-QFS environment. The SUNWsamfsr package must be removed last. Note that the SUNWsamtp package is an optional tools package, and it might not be installed on your system. An example pkgrm(1M) command is as follows:

# pkgrm SUNWsamtp SUNWsamfsu SUNWsamfsr

The information in this step assumes that you are removing software packages at the 4.1 release level or later. The software package names changed as of the 4.1 releases. If you have software packages on your system that were released prior to the 4.1 releases, see the Sun StorEdge QFS and Sun StorEdge SAM-FS Software Installation and Configuration Guide for information about removing them.

6. Upgrade the Solaris OS.

Install the new Solaris OS revision using the Sun Solaris upgrade procedures for the OS level you are installing.

7. Add the SUNWsamfsr and SUNWsamfsu packages.

The Sun StorEdge SAM-FS and Sun SAM-QFS software packages use the Solaris OS packaging utilities for adding and deleting software. You must be logged in as superuser to make changes to software packages. The pkgadd(1M) command prompts you to confirm various actions necessary to upgrade the Sun StorEdge SAM-FS and Sun SAM-QFS package.

On the installation CD-ROM, the Sun StorEdge SAM-FS and Sun SAM-QFS package resides in the /cdrom/cdrom0 directory.

Run the pkgadd(1M) command, as follows, to upgrade the packages, answering yes to each question:

# pkgadd -d . SUNWsamfsr SUNWsamfsu

During the installation, the system detects the presence of conflicting files and prompts you to indicate whether or not you want to continue with the installation. You can go to another window and copy the files you wish to save to an alternate location.

8. Update the license keys. (Optional)

Depending on the Sun StorEdge SAM-FS and Sun SAM-QFS software revision you had, and the revision to which you are upgrading, you might need to obtain new license keys for your software. Contact your ASP or Sun Microsystems for help on determining if you need a new license.

If you are upgrading from a release prior to 4.1, you need to place a new license key in the following file:

/etc/opt/SUNWsamfs/LICENSE.4.1

For more information, see the licensing information in the Sun StorEdge QFS and Sun StorEdge SAM-FS Software Installation and Configuration Guide.

9. Mount the file system(s). (Optional)

You must perform this step if you have not modified the /etc/vfstab file to have yes in the Mount at Boot field.

Use the mount(1M) command to mount the file systems and continue operation with the upgraded Sun SAM-FS or Sun SAM-QFS software.

In the following example, samfs1 is the name of the file system to be mounted.

# mount samfs1


procedure icon  To Upgrade Your Solaris OS in a Sun StorEdge QFS Environment

Many of the steps involved in upgrading your Solaris OS level are identical to the steps involved in upgrading your Sun StorEdge QFS environment. Some of the steps in this procedure reference procedures in the Sun StorEdge QFS and Sun StorEdge SAM-FS Software Installation and Configuration Guide.

1. Obtain the software upgrade.

Sun StorEdge QFS software supports various levels of the Solaris OS. You should not reinstall your old Sun StorEdge QFS software onto your newly upgraded Solaris OS.

In addition, depending on the revision level currently installed and the level to which you are upgrading, you may need a new Sun StorEdge QFS license.

Contact your ASP or Sun Microsystems to obtain new copies of the software and to determine whether or not your site needs a new license.

2. Back up all site-customized system files and configuration files.

These files include mcf, defaults.conf, samfs.cmd, and so on. Back up these files for all file systems in your Sun StorEdge QFS environment. Also make sure that you have backup copies of files in the /etc/opt/SUNWsamfs directory.

3. Ensure that each file system affected is backed up.

The file systems should be backed up regularly according to your site's policies. This is described as the last step in the installation procedure. If you are comfortable with the backup files that already exist for your file systems, there is no need to back them up again now. If, however, you need to back up your file systems to preserve information created since the last dump file was created, do so now. For information about how to create a dump file, see the Sun StorEdge QFS and Sun StorEdge SAM-FS Software Installation and Configuration Guide.

4. Unmount the file systems.

For information about unmounting a file system, see Unmounting a File System.

5. Remove existing Sun StorEdge QFS software.

Use the pkgrm(1M) command to remove the existing software. You must remove the existing Sun StorEdge QFS package before installing either the new package or the new operating system level.

For example, the following command removes the Sun StorEdge QFS software:

# pkgrm SUNWqfsu SUNWqfsr

The information in this step assumes that you are removing a software package at the 4.1 release level or later. The software package names changed as of the 4.1 releases. If you have a software package on your system that was released prior to the 4.1 releases, see the Sun QFS, Sun SAM-FS, and Sun SAM-QFS Installation and Configuration Guide, revision 4.0, for information about removing them.

6. Upgrade the Solaris OS.

Install the new Solaris OS revision using the Sun Solaris upgrade procedures for the Solaris OS level you are installing.

7. Add the packages.

The Sun StorEdge QFS software package uses the Solaris OS packaging utilities for adding and deleting software. You must be logged in as superuser to make changes to software packages. The pkgadd(1M) command prompts you to confirm various actions necessary to upgrade the Sun StorEdge QFS package.

On the installation CD-ROM, the Sun StorEdge QFS package resides in the /cdrom/cdrom0 directory.

Run the pkgadd(1M) command to upgrade the package, answering yes to each question:

# pkgadd -d . SUNWqfsr SUNWqfsu

During the installation, the system detects the presence of conflicting files and prompts you to indicate whether or not you want to continue with the installation. You can go to another window and copy any files you want to save to an alternate location.

8. Update the license keys. (Optional)

Depending on the Sun StorEdge QFS software revision you had, and the revision to which you are upgrading, you might need to obtain new license keys for your Sun StorEdge QFS software. Contact your ASP or Sun Microsystems for help on determining if you need a new license.

If you are upgrading from a Sun StorEdge QFS release prior to 4.1, you need to place a new license key in the following file:

/etc/opt/SUNWsamfs/LICENSE.4.1

For more information, see the licensing information in the Sun StorEdge QFS and Sun StorEdge SAM-FS Software Installation and Configuration Guide.

9. Update the mcf file. (Optional)

If device names have changed, it might be necessary to update the mcf file to match the new device names. Veryify the new device names, and then follow the procedure in Propagating Configuration File Changes to the System.

10. Mount the file system(s). (Optional)

Perform this step if you have not modified the /etc/vfstab file to have yes.

Use the procedure described in Mounting a File System. Continue operation with the upgraded Sun StorEdge QFS software.