C H A P T E R  3

Installation and Configuration Tasks

This chapter describes the procedures for installing and configuring Sun StorEdge QFS software for the first time. Use these procedures if this is the initial installation of the Sun StorEdge QFS software package at your site. If you are upgrading Sun StorEdge QFS software on an existing server, see Chapter 5, Upgrade and Configuration Tasks.

You can install and configure the Sun StorEdge QFS file system entirely using command-line interface (CLI) commands, or you can use a combination of CLI commands and the File System Manager browser interface tool.

If you are installing a Sun StorEdge QFS shared file system or a Sun StorEdge QFS file system in a Sun Cluster environment, you must also follow the additional installation instructions in the next chapter, Configuration Tasks for a Shared or Sun Cluster Configuration.

You must be logged in as superuser to complete most of the procedures in this chapter.

This chapter contains the following sections:


Installing the Software Packages

The Sun StorEdge QFS software uses the Sun Solaris packaging utilities for adding and deleting software. The pkgadd(1M) utility prompts you to confirm various actions necessary to install the packages.


procedure icon  To Add the Packages

Follow these steps on each host in the file system.

1. Become superuser.

2. Use the cd(1) command to change to the directory where the software package release files reside.

If you are using a CD, the packages reside in the /cdrom/cdrom0 directory organized by Sun Solaris version.

3. Use the pkgadd(1M) command to add the SUNWqfsr and SUNWqfsu packages.

For example:


# pkgadd -d . SUNWqfsr SUNWqfsu

4. Enter yes or y as the answer to each of the questions.

When you install SUNWqfsr and SUNWqfsu, you are asked whether you want to define an administrator group. Select y to accept the default (no administrator group), or select n if you want to define an administrator group. You can reset permissions on certain commands later by using the set_admin(1M) command. For more information on this command, see Adding the Administrator Group or the set_admin(1M) man page.

5. Issue the pkginfo(1M) command and examine its output to make sure that a Sun StorEdge QFS package is installed.

Each host must have the SUNWqfsr and SUNWqfsu packages installed on it.

CODE EXAMPLE 3-1 shows the needed SUNWqfsr/SUNWqfsu packages.


CODE EXAMPLE 3-1 pkginfo (1M) Command Example on a Sun StorEdge QFS File System
# pkginfo | grep SUNWqfs
system  SUNWqfsr     Sun QFS software Solaris 9 (root)
system  SUNWqfsu     Sun QFS software Solaris 9 (usr)

Installing the Linux Client Software

If you are installing the Sun StorEdge QFS software onto Linux clients in a shared environment, see the README file on Disk 1 of the Sun StorEdge QFS Linux Client installation package for instructions.


procedure icon  To Set Up PATH and MANPATH Variables

In order to have access to the commands and man pages for the Sun StorEdge QFS commands, you must modify your PATH and MANPATH environment variables.

Follow these steps on each host in the fie system.

1. For users who will need to access the Sun StorEdge QFS user commands (for example, sls(1)), add /opt/SUNWsamfs/bin to the users' PATH variables.

2. Use vi(1) or another editor to edit your system setup files to include the correct paths to commands and man pages.

CODE EXAMPLE 3-2 shows how your .profile file might look after editing.


CODE EXAMPLE 3-2 Finished .profile File
PATH=$PATH:/opt/SUNWsamfs/bin:/opt/SUNWsamfs/sbin 
MANPATH=$MANPATH:/opt/SUNWsamfs/man
export PATH MANPATH

When you have finished editing, the path statement in your .cshrc file might look like the following line:


set path = ($path /opt/SUNWsamfs/bin /opt/SUNWsamfs/sbin)

CODE EXAMPLE 3-3 shows how the MANPATH in your .login file might look after you have finished editing.


CODE EXAMPLE 3-3 Finished MANPATH in the .login File
setenv MANPATH /usr/local/man:opt/SUNWspro/man:/$OPENWINHOME/\
share/man:/opt/SUNWsamfs/man

Installing and Using the File System Manager Software

Perform the tasks in this section if you want to be able to use the File System Manager software to configure, control, monitor, or reconfigure your Sun StorEdge QFS environment.

The procedures in this section are as follows:



Note - File System Manager does not support file systems in Sun Cluster environments.




procedure icon  To Install the File System Manager Software

1. Ensure that you have met the installation requirements in Verifying Requirements for File System Manager.

2. Log in to the server that you want to use as the management station.

This can be the same server on which you installed the SUNWqfsr and SUNWqfsu packages.

3. Become superuser.

4. Use the cd(1) command to change to the directory where the software package release files reside on your server.

5. Execute the fsmgr_setup script to start the installation process.

For example:


# ./fsmgr_setup

6. Answer the questions as prompted by the fsmgr_setup script.

During the installation procedure, you are asked questions about your environment. The script prompts you to enter passwords for the SAMadmin role and for the samadmin and samuser login IDs.



Note - When installing File System Manager, you must enter a password for all users and roles as prompted by the install script. If you leave a password blank, the Java Web Console will display an "Authentication Error" message when you try to log in.



The fsmgr_setup script automatically installs the following:

The installation scripts prompt you to specify whether you want to install localized packages.

After installing the packages, it starts the Tomcat Web Server, enables logging, and creates the SAMadmin role.

7. Use vi(1) or another editor to edit your system setup files to include the correct paths to commands and man pages.

CODE EXAMPLE 3-4 shows how your .profile file might look after editing.


CODE EXAMPLE 3-4 Finished .profile File
PATH=$PATH:/opt/SUNWfsmgr/bin
MANPATH=$MANPATH:/opt/SUNWfsmgr/man
export PATH MANPATH

When you have finished editing, the path statement in your .cshrc file might look like the following line:


set path = ($path /opt/SUNWfsmgr/bin)

CODE EXAMPLE 3-5 shows how the MANPATH in your .login file might look after you have finished editing.


CODE EXAMPLE 3-5 Finished MANPATH in the .login File
setenv MANPATH /usr/local/man:opt/SUNWspro/man:/$OPENWINHOME/\
share/man:/opt/SUNWsamfs/man:/opt/SUNWfsmgr/man

8. Log in to the Sun StorEdge QFS server and become superuser.

9. Use the ps(1) and grep(1) commands to make sure that the rpcbind service is running.


# ps -ef | grep rpcbind

10. Examine the output from the preceding commands.

The output should contain a line similar to the following:


root   269     1  0   Feb 08 ?        0:06 /usr/sbin/rpcbind

If rpcbind does not appear in the output, enter the following command to start the rpcbind service:


# /usr/sbin/rpcbind

11. (Optional) Start the File System Manager (fsmgmtd) daemon.

If you did not choose to start the File System Manager daemon automatically during the installation process, do one of the following:

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

Using the File System Manager Software

After File System Manager is installed, you can log in to the software using two possible user names (samadmin and samuser) and two different roles (SAMadmin or no role). The tasks you can perform using the File System Manager differ as follows, depending on the user name and the role you assume at login:

Only the Sun StorEdge QFS administrator should log in using the SAMadmin role. All other users should log in as samuser.

With regard to system administration, be aware that the Solaris OS root user on the server that hosts File System Manager is not necessarily the administrator of the File System Manager. Only samadmin has administrator privileges for the File System Manager application. The root user is the administrator of the management station.

By default, File System Manager is set up to manage the server on which it is installed. It can also be used to manage other servers running Sun StorEdge QFS software, but those additional servers must first be configured to allow File System Manager access. For instructions on adding additional managed servers, see the Sun StorEdge QFS Configuration and Administration Guide or the File System Manager online help.


procedure icon  To Invoke File System Manager for the First Time

Perform this procedure if you want to invoke File System Manager and use it, rather than CLI commands, to perform some of the configuration steps.

1. Log in to server where File System Manager is installed, or in to any computer that has network access to it.

2. If you upgraded from a previous version of the software, open the web browser and clear the browser cache.

3. From the web browser, invoke the File System Manager software.

The URL is as follows:


https://hostname:6789

For hostname, type the name of the host where the File System Manager software is installed. If you need to specify a domain name in addition to the host name, specify the hostname in this format: hostname.domainname.

Note that this URL begins with https, not http. The Sun Java Web Console login screen appears.

4. At the User Name prompt, enter samadmin.

5. At the Password prompt, enter the password you entered when you answered questions during the fsmgr_setup script's processing in To Install the File System Manager Software.

6. Click the SAMadmin role.



Note - Only the Sun StorEdge QFS administrator should log in with the SAMadmin role.



7. At the Role Password prompt, enter the password you entered in Step 5.

8. Click Log In.

9. In the Storage section, click File System Manager.

You are now logged in to the File System Manager interface.

If you need help accomplishing this task, click Help. After you add the servers, see the following sections for more information about configuring your environment using the File System Manager.


Setting Up the Environment Configuration

Each Sun StorEdge QFS environment is unique. The system requirements and hardware that are used differ from site to site. It is up to you, the system administrator at your site, to set up the specific configuration for your Sun StorEdge QFS environment.

The master configuration file, /etc/opt/SUNWsamfs/mcf, defines the topology of the equipment managed by the Sun StorEdge QFS file system. This file specifies the devices and file systems included in the environment and contains information that enables you to identify the disk slices to be used and to organize them into Sun StorEdge QFS file systems.

You can edit the mcf file in either of two ways:

There are examples of mcf files in /opt/SUNWsamfs/examples. Example mcf file configurations can also be found in Appendix D of this manual.



Note - For information about file system design considerations, see the Sun StorEdge QFS Configuration and Administration Guide.



The following sections provide examples and describe activities related to creating and maintaining the mcf file:



Note - The instructions in this section are for creating an mcf file in a Sun StorEdge QFS environment. If you are creating a SAM-QFS environment, follow the instructions in this section for configuring the file system portion of the mcf file. Then follow the instructions in the Sun StorEdge SAM-FS Installation and Upgrade Guide for library and drive configuration.




procedure icon  To Create an mcf File Using the File System Manager Software

When you configure Sun StorEdge QFS file systems using the File System Manager software, it creates or edits the appropriate Sun StorEdge QFS configuration files, including the mcf file, on that server. You can use either File System Manager or the CLI to further edit these files later.

To add a server and create a file system:

1. Log in to the File System Manager browser interface as an administrator user.

The Servers page is displayed.

2. If you have not already added the server to be managed, click Add to add it now.

The Add Server page is displayed.

3. In the Server Name or IP Address field, type the name of the server or the IP address of the server.

4. Click OK.

5. Click New File System.

The New File System wizard is displayed.

Complete the steps for creating a new file system. When you complete this process, the mcf file is created. For more information, see the File System Manager online help.


procedure icon  To Create an mcf File Using a Text Editor

single-step bulletUse vi(1) or another editor to create the mcf file.

When you create the mcf file, follow these guidelines:

CODE EXAMPLE 3-6 shows the fields of each line entry in the mcf file.


CODE EXAMPLE 3-6 mcf File Fields
#
# Sun QFS file system configuration
#
# Equipment       Equip  Equip Fam   Dev    Additional
# Identifier      Ord    Type  Set   State  Parameters
# ----------      -----  ----- ----  -----  ----------

For more information, see the mcf(4) man page.



caution icon

Caution - Be sure to specify disk partitions that are not in use on your system. Do not use overlapping partitions.

If you give the wrong partition names when creating any type of file system, you risk damaging user or system data. The risk is greatest if the partition named contains a UFS file system that is not mounted currently.



CODE EXAMPLE 3-7 shows file system entries in an mcf file for a Sun StorEdge QFS file system that is local to one Solaris OS host.


CODE EXAMPLE 3-7 Example Sun StorEdge QFS mcf File
#
# Sun QFS file system configuration
#
# Equipment       Equip  Equip Fam   Dev    Additional
# Identifier      Ord    Type  Set   State  Parameters
# ----------      -----  ----- ----  -----  ----------
qfs1               1     ma    qfs1  on
/dev/dsk/c1t0d0s0 11     mm    qfs1  on
/dev/dsk/c1t1d0s4 12     mr    qfs1  on
/dev/dsk/c1t2d0s4 13     mr    qfs1  on
/dev/dsk/c1t3d0s4 14     mr    qfs1  on



Note - If you change the mcf file after the Sun StorEdge QFS file system is in use, you must convey the new mcf specifications to the Sun StorEdge QFS software. For information about propagating mcf file changes to the system, see the Sun StorEdge QFS Configuration and Administration Guide.



For information about editing the mcf file on multiple hosts in a Sun StorEdge QFS shared file system or a file system in a Sun Cluster environment, see Editing mcf Files on Other Hosts.


procedure icon  To Verify the mcf File

The procedures in this section show you how to verify the correctness of the mcf configuration file.

Perform these verifications on all hosts if you are configuring a Sun StorEdge QFS shared file system or a Sun StorEdge QFS highly available file system.

1. Enter the sam-fsd(1M) command.

2. Examine the output for errors, as follows:

If your mcf file has errors, refer to the mcf(4) man page for information about how to create this file correctly. You can also refer to the example mcf files in Appendix D.


Setting Up Mount Parameters

Use the procedures in this section to specify mount parameters for the Sun StorEdge QFS file system.

You can specify mount parameters in the following ways:

Updating the /etc/vfstab File and Creating the Mount Point

This section describes how to edit the /etc/vfstab file.



Note - Even though /global is used in this chapter's examples as the mount point for file systems mounted in a Sun Cluster environment, it is not required. You can use any mount point.



TABLE 3-1 shows the values you can enter in the fields in the /etc/vfstab file.


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

Field

Field Title and Contents

1

Device to Mount. The name of the Sun StorEdge QFS file system to be mounted. This must be the same as the file system's Family Set name specified in the mcf file.

2

Device to fsck(1M). Must be a dash (-) character, which indicates that there are no options. This prevents the Solaris system from performing an fsck(1M) process on the Sun StorEdge QFS file system. For more information about this process, see the fsck(1M) or samfsck(1M) man page.

3

Mount Point. For example:

  • /qfs1 for a local Sun StorEdge QFS file system on a single host.
  • /global/qfs1 for a Sun StorEdge QFS shared file system in a Sun Cluster environment.
  • /global/qfs1 for a Sun StorEdge QFS highly available file system in a Sun Cluster environment.

4

File System Type. Must be samfs.

5

fsck(1M) Pass. Must be a dash (-) character, which indicates that there are no options.

6

Mount at Boot. Either yes or no.

  • Specifying yes in this field indicates that the Sun StorEdge QFS file system is to be mounted automatically at boot time. Do not specify yes if you are creating a file system for use in a Sun Cluster environment.
  • Specifying no in this field indicates that you do not want to mount the file system automatically. Specify no in this field if you are creating a file system for use in a Sun Cluster environment to indicate that the file system is under Sun Cluster software control.

For information about the format of these entries, see the mount_samfs(1M) man page.

7

Mount Parameters. A list of comma-separated parameters (with no spaces) that are used in mounting the file system. You can specify mount options on the mount(1M) command, in the /etc/vfstab file, or in a samfs.cmd file. Mount options specified on the mount(1M) command override those specified in the /etc/vfstab file and in the samfs.cmd file. Mount options specified in the /etc/vfstab file override those in the samfs.cmd file.

For example, stripe=1 specifies a stripe width of one DAU. For a list of available mount options, see the mount_samfs(1M) man page.



procedure icon  To Update the /etc/vfstab File Using File System Manager

When you create a file system using File System Manager, a default /etc/vfstab file is created. However, mount options specified in File System Manager are written to the samfs.cmd file rather than to the /etc/vfstab file. For more information, see To Create and Edit the samfs.cmd File Using File System Manager.

To edit the mount options in the /etc/vfstab file, use the following command-line procedure, To Update the /etc/vfstab File and Create the Mount Point Using a Text Editor.


procedure icon  To Update the /etc/vfstab File and Create the Mount Point Using a Text Editor

Follow these steps on all hosts if you are configuring a Sun StorEdge QFS shared file system or a Sun StorEdge QFS highly available file system.

For debugging purposes, if you are configuring a Sun StorEdge QFS shared file system, the mount options should be the same on all hosts that can mount the file system.

1. Use vi(1) or another editor to open the /etc/vfstab file.

2. Create an entry for each Sun StorEdge QFS file system.

CODE EXAMPLE 3-9 shows header fields and entries for a local Sun StorEdge QFS file system.


CODE EXAMPLE 3-9 Example /etc/vfstab File Entries for a Sun StorEdge QFS File System
#DEVICE    DEVICE   MOUNT  FS    FSCK  MOUNT    MOUNT
#TO MOUNT  TO FSCK  POINT  TYPE  PASS  AT BOOT  PARAMETERS
#
qfs1       -        /qfs1  samfs -     yes      stripe=1

TABLE 3-1 shows the various fields in the /etc/vfstab file and their contents.

If you are configuring a file system for a Sun Cluster environment, the required and recommended mount options vary according to the type of file system you are configuring. TABLE 3-2 explains the mount options.


TABLE 3-2 Mount Options for a Sun Cluster File System

File System Type

Required Options

Recommended Options

Sun StorEdge QFS shared file system

shared

forcedirectio

sync_meta=1

mh_write

qwrite

nstreams=1024

rdlease=300

aplease=300

wrlease=300

Sun StorEdge QFS shared file system to support Oracle Real Application Clusters database files

shared

forcedirectio

sync_meta=1

mh_write

qwrite

nstreams=1024

stripe>=1

rdlease=300

aplease=300

wrlease=300

 

Sun StorEdge QFS highly available file system

None

sync_meta=1


You can specify most of the mount options listed in TABLE 3-2 in either the /etc/vfstab file or the samds.cmd file. The one exception is the shared option, which must be specified in the /etc/vfstab file.



Tip - In addition to the mount options mentioned in TABLE 3-2, you can also specify the trace mount option for configuration debugging purposes.



3. Use the mkdir(1) command to create the file system mount point.

The mount point location varies, depending on where the file system is to be mounted. The following examples illustrate this.

Example 1. This example assumes that /qfs1 is the mount point of the qfs1 file system. This is a local file system. It can exist on a standalone server or on a local node in a Sun Cluster environment.


# mkdir /qfs1

Example 2. This example assumes that /global/qfs1 is the mount point of the qfs1 file system, which is a Sun StorEdge QFS shared file system to be mounted in a Sun Cluster environment.


# mkdir /global/qfs1



Note - If you configured multiple mount points, repeat these steps for each mount point, using a different mount point (such as /qfs2) and Family Set name (such as qfs2) each time.



Creating and Editing the samfs.cmd File

You can create the /etc/opt/SUNWsamfs/samfs.cmd file as the place from which the system reads mount parameters.

You can manage certain features more easily from a samfs.cmd file. These features include the following:

If you are configuring multiple Sun StorEdge QFS systems with multiple mount parameters, consider creating the samfs.cmd file.


procedure icon  To Create and Edit the samfs.cmd File Using File System Manager

If you specify non-default mount options when creating a file system in File System Manager, the samfs.cmd file is automatically created or updated with those mount options.

To edit a file system's mount options:

1. From the Servers page, click the name of the server on which the file system is located.

The File Systems Summary page is displayed.

2. Select the radio button next to the file system whose mount options you want to edit.

3. From the Operations menu, choose Edit Mount Options.

The Edit Mount Options page is displayed.

4. Make your edits in the fields.

For more information about the fields on the Edit Mount Options page, see the File System Manager online help.

5. Click Save.


procedure icon  To Create and Edit the samfs.cmd File Using a Text Editor

1. Use vi(1) or another editor to create the samfs.cmd file.

Create lines in the samfs.cmd file to control mounting, performance features, or other aspects of file system management. For more information about the samfs.cmd file, see the Sun StorEdge QFS Configuration and Administration Guide, or see the samfs.cmd(4) man page.

shows a samfs.cmd file for a Sun StorEdge QFS file system.


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

2. If you are creating a multihost file system, copy lines as necessary to the samfs.cmd file on other hosts.

If you have created a samfs.cmd file on one host in a Sun Cluster environment to describe a particular file system's mount parameters, copy those lines to the samfs.cmd files on all the nodes that can access that file system.

For debugging purposes, the samfs.cmd file, as it pertains to a specific file system, should be the same on all hosts. For example, if the qfs3 file system is accessible from all nodes in a Sun Cluster environment, then the lines in the samfs.cmd file that describe the qfs3 file system should be identical on all the nodes in the Sun Cluster environment.

Depending on your site needs, it might be easier to manage mount options from the samfs.cmd file rather than from the /etc/vfstab file. The /etc/vfstab file overrides the samfs.cmd file in the event of conflicts.

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


Initializing the Environment

This section tells you how to initialize the environment and the Sun StorEdge QFS file system and how to mount the file system.


procedure icon  To Initialize the Environment

single-step bulletUse the samd(1M) config command to initialize the Sun StorEdge QFS environment:


# samd config

Repeat this command on each host if you are configuring a Sun StorEdge QFS shared file system or a Sun StorEdge QFS highly available file system.


procedure icon  To Initialize the File System

This procedure shows how to use the sammkfs(1M) command and the Family Set names that you have defined to initialize a file system.



Note - The sammkfs(1M) command sets one tuning parameter, the disk allocation unit (DAU). You cannot reset this parameter without reinitializing the file system. For information about how the DAU affects tuning, see the Sun StorEdge QFS Configuration and Administration Guide or see the sammkfs(1M) man page.



single-step bulletUse the sammkfs(1M) command to initialize a file system for each Family Set name defined in the mcf file.



caution icon

Caution - Running sammkfs(1M) creates a new file system. It removes all references to the data currently contained in the partitions associated with the file system in the /etc/opt/SUNWsamfs/mcffile.



Initializing a Sun StorEdge QFS File System

CODE EXAMPLE 3-11 shows the command to use to initialize a Sun StorEdge QFS file system with the Family Set name of qfs1.


CODE EXAMPLE 3-11 Initializing Example File System qfs1
# sammkfs -a 128 qfs1
Building `qfs1' will destroy the contents of devices:
                /dev/dsk/c1t0d0s0
                /dev/dsk/c3t1d0s6
                /dev/dsk/c3t1d1s6
                /dev/dsk/c3t2d0s6
Do you wish to continue? [y/N]

Enter y in response to this message to continue the file system creation process.

Initializing a Sun StorEdge QFS Shared File System

If you are configuring a Sun StorEdge QFS shared file system, enter the sammkfs(1M) command on the metadata server only.

Enter the sammkfs(1M) command at the system prompt. The -S option specifies that the file system be a Sun StorEdge QFS shared file system. Use this command in the following format:


sammkfs -S -a allocation-unit fs-name

TABLE 3-3 sammkfs (1M) Command Arguments

Argument

Meaning

allocation-unit

The number of bytes, in units of 1024 (1-kilobyte) blocks, to be allocated to a disk allocation unit (DAU). The specified allocation-unit value must be a multiple of 8 kilobytes. For more information, see the Sun StorEdge QFS Configuration and Administration Guide or the sammkfs(1M) man page.

fs-name

The Family Set name of the file system as defined in the mcf file.


 

For example, you might use the following sammkfs(1M) command to initialize a Sun StorEdge QFS shared file system and identify it as shared:


# sammkfs -S -a 512 sharefs1

If the shared keyword appears in the mcf file, the file system must be initialized as a shared file system with the -S option to the sammkfs(1M) command. You cannot mount a file system as shared if it was not initialized as shared.

If you are initializing a file system as a Sun StorEdge QFS shared file system, file /etc/opt/SUNWsamfs/hosts.fs-name must already exist when you issue the sammkfs(1M) command. The sammkfs(1M) command uses the hosts file when it creates the file system. You can use the samsharefs(1M) command to replace or update the contents of the hosts file at a later date. For more information, see Creating the Shared Hosts File.

Mounting the File System

The mount(1M) command mounts a file system. It also reads the /etc/vfstab and samfs.cmd configuration files. For information about the mount(1M) command, see the mount_samfs(1M) man page.

Use one or more of the procedures in this section to mount your file system.


procedure icon  To Mount the File System Using File System Manager

1. From the Servers page, click the name of the server on which the file system is located.

The File Systems Summary page is displayed.

2. Select the radio button next to the file system that you want to mount.

3. From the Operations menu, choose Mount.


procedure icon  To Mount the File System on One Host From the Command Line

Perform this procedure on all Sun StorEdge QFS file systems, as follows:

1. Use the mount(1M) command to mount the file system.

Specify the file system mount point as the argument. For example:


# mount /qfs1

2. Use the mount(1M) command with no arguments to verify the mount.

This step confirms that the file system is mounted and shows how to set permissions. CODE EXAMPLE 3-12 shows the output from a mount(1M) command issued to verify whether example file system qfs1 is mounted.


CODE EXAMPLE 3-12 Using the mount (1M) Command to Verify That a File System Is Mounted
# mount
<<< information deleted >>>
/qfs1 on qfs1 read/write/setuid/dev=8001b1 on Mon Jan 14 12:21:03 2002
<<< information deleted >>>

3. (Optional) Use the chmod(1) and chown(1) commands to change the permissions and ownership of the file system's root directory.

If this is the first time the file system has been mounted, it is typical to perform this step.

For example:


# chmod 755 /qfs1# chown root:other /qfs1


procedure icon  To Verify Metadata Server Changes

If you are creating a Sun StorEdge QFS shared file system in either a Solaris OS or a Sun Cluster environment, perform this procedure to verify that the file system is configured so that you can change the metadata server.

If you are creating a Sun StorEdge QFS shared file system in a Solaris OS environment, perform these steps on each metadata server or potential metadata server.

If you are creating a Sun StorEdge QFS shared file system in a Sun Cluster environment, perform these steps on all hosts that can mount the file system.

1. Log in to the metadata server as superuser.

2. Use the samsharefs(1M) command to change the metadata server.

For example:


ash# samsharefs -s oak qfs1

3. Use the ls(1) -al command to verify that the files are accessible on the new metadata server.

For example:


oak# ls -al /qfs1

4. Repeat Step 2 and Step 3 to change back to the original metadata server.

For more information on completing the configuration of file systems in a shared or Sun Cluster Environment, see Configuration Tasks for a Shared or Sun Cluster Configuration after completing the rest of the rest of the procedures in this chapter as needed.


Performing Additional Configuration Tasks

This section outlines additional tasks that you might need to complete in order to finish the configuration of the Sun StorEdge QFS environment. Some of these tasks are optional, depending on your specific environment. The following tasks are covered:

Sharing the File System With NFS Client Systems

Perform this task if you are configuring a file system and you want the file system to be NFS shared.

The procedures in this section use the Sun Solaris share(1M) command to make the file system available for mounting by remote systems. The share(1M) commands are typically placed in the /etc/dfs/dfstab file and are executed automatically by the Sun Solaris OS when you enter init(1M) state 3.


procedure icon  To NFS-Share the File System in a Sun Cluster Environment

The following is a general description of how to NFS-share a file system in a Sun Cluster environment. For more information on NFS-sharing file systems that are controlled by HA Storage Plus, see the Sun StorEdge QFS Configuration and Administration Guide, the Sun Cluster Data Service for Network File System (NFS) Guide for Solaris OS, and your NFS documentation.

1. Locate the dfstab.resource-name file.

The Pathprefix property of HA StorageHA Storage Plus specifies the directory in which the dfstab.resource-name file resides.

2. Use vi(1) or another editor to add a share(1M) command to the Pathprefix/SUNW.nfs/dfstab.resource-name file.

For example:


share -F nfs -o rw /global/qfs1


procedure icon  To NFS-Share the File System in a Solaris OS Environment

If you are configuring a Sun StorEdge QFS shared file system, you can perform this procedure from the metadata server or from one of the shared clients.

1. Use vi(1) or another editor to add a share(1M) command to the /etc/dfs/dfstab file.

For example, add a line like the following to direct the Solaris OS to NFS share the new Sun StorEdge QFS file system:


share -F nfs -o rw=client1:client2 -d "QFS" /qfs1

2. Use the ps(1) and grep(1) commands to determine whether nfs.server is running.

For example:


# ps -ef | grep nfsd	root   694     1  0   Apr 29 ?        0:36 /usr/lib/nfs/nfsd -a 16en17     29996 29940  0 08:27:09 pts/5    0:00 grep nfsd# ps -ef | grep mountd	root   406     1  0   Apr 29 ?       95:48 /usr/lib/autofs/automountd	root   691     1  0   Apr 29 ?        2:00 /usr/lib/nfs/mountden17     29998 29940  0 08:27:28 pts/5    0:00 grep mountd

In this sample output, the lines that contain /usr/lib/nfs indicate that the NFS server is mounted.

3. If nfs.server is not running, start it.

For example:


# /etc/init.d/nfs.server start

4. (Optional) Type the share(1M) command at a root shell prompt.

Perform this step if you want to NFS-share the new Sun StorEdge QFS file system immediately.

When you have finished NFS-sharing the file system, you are ready to mount it, as described in the next procedure, To Mount the File System on NFS Clients in a Solaris OS Environment.

Notes on NFS-Sharing

If no NFS-shared file systems exist when the Sun Solaris OS boots, the NFS server is not started. CODE EXAMPLE 3-13 shows the commands to use to enable NFS-sharing. You must change to run level 3 after adding the first share entry to this file.


CODE EXAMPLE 3-13 NFS Commands
# init 3
# who -r
.       run-level 3  Dec 12 14:39     3    2  2
# share
-          /qfs1  -   "QFS"

Some NFS mount parameters can affect the performance of an NFS-mounted Sun StorEdge QFS file system. You can set these parameters in the /etc/vfstab file as follows:

For more information about these parameters, see the mount_nfs(1M) man page.


procedure icon  To Mount the File System on NFS Clients in a Solaris OS Environment

If you are configuring a Sun StorEdge QFS shared file system, you can perform this procedure from the metadata server or from one of the shared clients.



Note - In Sun StorEdge QFS shared file systems, there can sometimes be a significant delay in the file system's response to NFS client requests. As a consequence, the system might generate an error instead of retrying the operation.

To avoid this situation, it is recommended that you mount the file system on NFS clients with either the hard option enabled or with the soft, retrans, and timeo options enabled. If you use the soft option, also specify retrans=120 (or greater) and timeo=3000 (or greater). These mount options can be specified in the /etc/vfstab file, as shown in the procedure below.



1. On each NFS client system, use vi(1) or another editor to edit the /etc/vfstab file, and add a line to mount the server's Sun StorEdge QFS file system at a convenient mount point.

The following example mounts server:/qfs1 on the /qfs1 mount point:


server:/qfs1    -    /qfs1    nfs    -   no intr,timeo=60

2. Save and close the /etc/vfstab file.

3. Enter the mount(1M) command.

The following mount(1M) command mounts the qfs1 file system:


client# mount /qfs1

Alternatively, the automounter can do this, if you prefer. Follow your site procedures for adding server:/qfs1 to your automounter maps. For more information about automounting, see the automountd(1M) man page.


procedure icon  To Change Default Values

The /opt/SUNWsamfs/examples/defaults.conf file contains default settings for the Sun StorEdge QFS environment. You can change these settings at any time after the initial installation.

Before changing any default settings, examine the defaults.conf(4) man page to discern the types of behavior this file controls.

Follow these steps for each host that you want to include in a Sun StorEdge QFS shared file system or a Sun StorEdge QFS highly available file system.



Note - For debugging purposes, the defaults.conf file should be the same on all hosts.



1. Use the cp(1) command to copy /opt/SUNWsamfs/examples/defaults.conf to its functional location.

For example:


# cp /opt/SUNWsamfs/examples/defaults.conf /etc/opt/SUNWsamfs/defaults.conf

2. Use vi(1) or another editor to edit the file.

Edit the lines that control aspects of the system that you want to change. Remove the pound character (#) from column 1 of the lines you change.

For example, if you are configuring a Sun StorEdge QFS shared file system in a Sun Cluster environment, you might specify the following settings, which are helpful during debugging:


# File defaults.conf
trace
all=on
endtrace

3. Use the samd(1M) config command to restart the sam-fsd(1M) daemon and enable the daemon to recognize the changes in the defaults.conf file.

Configuring the Remote Notification Facility

The Sun StorEdge QFS software can be configured to notify you when potential problems occur in its environment. The system sends notification messages to a management station of your choice. The Simple Network Management Protocol (SNMP) software manages the exchange of information between network devices such as servers, automated libraries, and drives.

The Sun StorEdge QFS Management Information Base (MIB) defines the types of problems, or events, that the Sun StorEdge QFS software can detect. The software can detect errors in configuration, tapealert(1M) events, and other atypical system activity. For complete information about the MIB, see /opt/SUNWsamfs/mibs/SUN-SAM-MIB.mib.

The following procedures describe how to enable and disable remote notification.


procedure icon  To Enable Remote Notification

1. Ensure that the management station is configured and known to be operating correctly.

Setting Up the Network Management Station describes this prerequisite.

2. Using vi(1) or another editor, examine the /etc/hosts file to ensure that the management station to which notifications should be sent is defined. If it is not defined, add a line that defines the appropriate host.

The following sample file defines a management station with a host name of mgmtconsole.


CODE EXAMPLE 3-14 Example /etc/hosts File
999.9.9.9       localhost
999.999.9.999   loggerhost      loghost
999.999.9.998   mgmtconsole
999.999.9.9     samserver

3. Save your changes to /etc/hosts and exit the file.

4. Using vi(1) or another editor, open the file /etc/opt/SUNWsamfs/scripts/sendtrap and locate the TRAP_DESTINATION=`hostname` directive.

This line specifies that remote notification messages be sent to port 161 of the server upon which the Sun StorEdge QFS software is installed. Note the following:

For example:


TRAP_DESTINATION="localhost:161 doodle:163 mgmt_station:1162"

5. Locate the COMMUNITY="public" directive in /etc/opt/SUNWsamfs/scripts/sendtrap.

This line acts as a password. It prevents unauthorized viewing or use of SNMP trap messages. Examine this line and do one of the following, depending on the community string value of your management station:

6. Save your changes to /etc/opt/SUNWsamfs/scripts/sendtrap and exit the file.


procedure icon  To Disable Remote Notification

The remote notification facility is enabled by default. If you want to disable remote notification, perform this procedure.

1. If the file /etc/opt/SUNWsamfs/defaults.conf does not already exist, use the cp(1) command to copy file /opt/SUNWsamfs/examples/defaults.conf to /etc/opt/SUNWsamfs/defaults.conf.

2. Using vi(1) or another editor, open the file /etc/opt/SUNWsamfs/defaults.conf and find the line that specifies SNMP alerts.

The line is as follows:


#alerts=on

3. Edit the line to disable SNMP alerts.

Remove the # symbol and change on to off. After editing, the line is as follows:


alerts=off

4. Save your changes and exit the file.

5. Use the samd(1M) config command to restart the sam-fsd(1M) daemon.


# samd config

This command restarts the sam-fsd(1M) daemon and enables the daemon to recognize the changes in the defaults.conf file.

Adding the Administrator Group

By default, only the superuser can execute Sun StorEdge QFS administrator commands. However, during installation you can create an administrator group. Members of the administrator group can execute all administrator commands except for star(1M), samfsck(1M), samgrowfs(1M), sammkfs(1M), and samd(1M). The administrator commands are located in /opt/SUNWsamfs/sbin.

After installing the package, you can use the set_admin(1M) command to add or remove the administrator group. You must be logged in as superuser to use the set_admin(1M) command. You can also undo the effect of this selection and make the programs in /opt/SUNWsamfs/sbin executable only by the superuser. For more information about this command, see the set_admin(1M) man page.


procedure icon  To Add the Administrator Group

1. Choose an administrator group name, or select a group that already exists in your environment.

2. Use the groupadd(1M) command, or edit the /etc/group file.

The following is an entry from the /etc/group file that designates an administrator group for the Sun StorEdge QFS software. In this example, the samadm group consists of both the adm and operator users.


samadm::1999:adm,operator


procedure icon  To Enable Logging

The Sun StorEdge QFS system logs errors, cautions, warnings, and other messages using the standard Sun Solaris syslog(3) interface. By default, the Sun StorEdge QFS facility is local7.

1. Use vi(1) or another editor to open the /etc/syslog.conf file.

2. In the file /opt/SUNWsamfs/examples/syslog.conf_changes, find the logging line, which is similar, if not identical, to the following:


local7.debug  /var/adm/sam-log



Note - The preceding entry is all one line and has a TAB character (not a space) between the fields.



The default facility is local7. If you set logging to something other than local7 in the /etc/syslog.conf file, edit the defaults.conf file and reset it there, too. For more information, see the defaults.conf(4) man page.

3. Append the logging line from /opt/SUNWsamfs/examples/syslog.conf_changes to the /etc/syslog.conf file.

For example:


# cp /etc/syslog.conf /etc/syslog.conf.orig
# cat /opt/SUNWsamfs/examples/syslog.conf_changes >> /etc/syslog.conf

4. Create an empty log file and send the syslogd process a HUP signal.

For example, to create a log file in /var/adm/sam-log and send the HUP to the syslogd daemon, type the following:


# touch /var/adm/sam-log
# pkill -HUP syslogd

For more information, see the syslog.conf(4) and syslogd(1M) man pages.

5. (Optional) Use the log_rotate.sh(1M) command to enable log file rotation.

Log files can become very large, and the log_rotate.sh(1M) command can help in managing log files. For more information, see the log_rotate.sh(1M) man page.

Configuring Other Products

The Sun StorEdge QFS installation and configuration process is complete. You can configure other Sun products at this time.

For example, if you want to configure an Oracle database, see the Sun Cluster Data Service for Oracle Real Application Clusters Guide for Solaris OS. The Oracle Real Application Clusters application is the only scalable application that the Sun StorEdge QFS software supports in Sun Cluster environments.


Backing Up Data

This section describes the recommended procedures for regularly backing up important data and files in a Sun StorEdge QFS environment.

Setting Up Dump Files

File systems are made up of directories, files, and links. The Sun StorEdge QFS file system keeps track of all the files in the .inodes file. The .inodes file resides on a separate metadata device. The file system writes all file data to the data devices.

It is important to use the qfsdump(1M) command periodically to create a dump file of metadata and file data. The dump process saves the relative path information for each file contained in a complete file system or in a portion of a file system. This protects your data in the event of a disaster.

You can create dump files as often as once or twice a day, depending on your site's requirements. By dumping file system data on a regular basis, you can restore old files and file systems. You can also move files and file systems from one server to another.

The following are some guidelines for creating dump files:

You can run the qfsdump(1M) command manually or automatically. Even if you implement this command to be run automatically, you might also need to run it manually from time to time, depending on your site's circumstances. In the event of a disaster, you can use the qfsrestore(1M) command to re-create your file system. You can also restore a single directory or file. For more information, see the qfsdump(1M) man page and see the Sun StorEdge SAM-FS Troubleshooting Guide.

For more information about creating dump files, see the qfsdump(1M) man page. The following sections describe procedures for issuing this command both manually and automatically.


procedure icon  To Run the qfsdump(1M) Command Automatically Using cron

Perform this step for each Sun StorEdge QFS file system in your environment. Make sure you save each dump file in a separate file.

single-step bulletFor each file system, make an entry in the root crontab file so that the cron daemon runs the qfsdump(1M) command periodically.

For example:


10 0 * * * (cd /qfs1; /opt/SUNWsamfs/sbin/qfsdump -f /dev/rmt/0cbn)

This entry executes the qfsdump(1M) command at 10 minutes after midnight. It uses the cd(1) command to change to the mount point of the qfs1 file system, and it executes the /opt/SUNWsamfs/sbin/qfsdump command to write the data to tape device /dev/rmt/0cbn.


procedure icon  To Run the qfsdump(1M) Command Manually From the Command Line

1. Use the cd(1) command to go to the directory that contains the mount point for the file system.

For example:


# cd /qfs1

2. Use the qfsdump(1M) command to write a dump file to a file system outside of the one you are dumping.

For example:


# qfsdump -f /save/qfs1/dump_file

Backing Up Configuration Files

The Sun StorEdge QFS software regularly accesses several files that have been created as part of this installation and configuration procedure. You should back up these files regularly to a file system that is outside the file system in which they reside. In the event of a disaster, you can then restore these files from your backup copies.

The following files are among those that you should back up regularly and whenever you modify them:

For more information about the files you should protect, see the Sun StorEdge SAM-FS Troubleshooting Guide.