C H A P T E R 2

System Configuration Tasks

The installation and configuration process is described completely in the Sun StorEdge SAM-FS Installation and Upgrade Guide. This chapter provides additional information about configuring the file system used in the Sun StorEdge SAM-FS environment. This chapter contains the following sections:

- Using the File System Manager Software

- Function of the mcf File

- Initializing a File System

##

Using the File System Manager Software

The File System Manager software is a browser interface tool that enables you to configure, control, protect, and monitor one or more file systems in your network from a central location. To access this central location, you can use the web browser on any host in your network.

The goal of the software is to provide a less complex way than command-line interface (CLI) commands of performing the most common tasks associated with file systems. For instructions on installing the File System Manager software, see the Sun StorEdge SAM-FS Installation and Upgrade Guide.

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 SAM-FS software, but those additional servers must first be configured to allow File System Manager access. For instructions on adding additional managed servers, see To Add an Additional Server for File System Manager Access.

### 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 file system administration and configuration tasks.

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 page is displayed.

4. At the User Name prompt, enter `root` or another valid user name.

Note - If you have upgraded the File System Manager software from an earlier version, the `samadmin` user account is also available. You may type `samadmin` in the User Name field and then type the `samadmin` password to gain full access to all File System Manager operations.

5. At the Password prompt, enter the password.

6. Click Log In.

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

You are now logged in to File System Manager.

### Creating Additional Administrator and User Accounts

You can create additional administrator and guest accounts at any time after the initial File System Manager configuration. These guest accounts are local to the management station.

If you remove the File System Manager software, the removal scripts do not remove any additional accounts that you create manually. It is your responsibility to use one or both of the following procedures to administer any accounts you add manually.

To Create Additional Accounts

1. Outside of the browser interface, log in to the management station server as`root`.

2. Use the `useradd` and `passwd` commands to add each user.

For example, to add a user with account name `bobsmith`, type the following:

# `/usr/sbin/useradd/useradd bobsmith`

# `/usr/bin/passwd bobsmith`

Each user account that you add in this way has read-only viewing privileges for File System Manager functions. To add additional privileges see the following section, Assigning Privilege Levels.

#### Assigning Privilege Levels

You can assign users full or partial access to File System Manager functions. The following table lists the five levels of privileges you can assign to File System Manager users.

TABLE 2-1 File System Manager Permission Levels
Administrative Privilege Level | Description
--- | ---
`com.sun.netstorage.fsmgr.config` | User has unlimited access.
`com.sun.netstorage.fsmgr.operator.media` | User can add or remove libraries, add or remove stand-alone drives, reserve VSNs, import VSNs, load and unload VSNs, export VSNs, and so on.
`com.sun.netstorage.fsmgr.operator.sam.control` | User can start, stop, or idle archiving operations.
`com.sun.netstorage.fsmgr.operator.file` | User can start or stop staging, and can restore a file system.
`com.sun.netstorage.fsmgr.operator.filesystem` | User can mount or unmount a file system, edit mount options, and perform file system checks (`fsck`).

To specify full or partial configuration privileges for a user, add the following line to the `/etc/user_attr` file:

account-name`::::auths=`privilege-level

account-name is the name of the user's account and privilege-level is the level of authorization that you want to assign to the user.

For example, to assign full privileges (privilege level `com.sun.netstorage.fsmgr.config`) for user account `bobsmith`, add the following line to the `/etc/user_attr` file:

bobsmith::::auths=com.sun.netstorage.fsmgr.config

To assign `bobsmith` privileges only for staging and restoring file systems (privilege level `com.sun.netstorage.fsmgr.operator.file`) and exporting, importing, and assigning VSNs (privilege level `com.sun.netstorage.operator.media`), add the following line to the `/etc/user_attr` file:

bobsmith::::auths=com.sun.netstorage.fsmgr.operator.file, com.sun.netstorage.fsmgr.operator.media

#### Creating an Account for Multiple Users

You can create a generic File System Manager account that can be used by multiple users, and then add a role with privileges that only some of those users can access.

1. Use the `useradd` and `passwd` commands to add the account.

For example, to add a user account called `guest` for multiple users, type the following:

# `/usr/sbin/useradd/useradd guest`

# `/usr/bin/passwd guest`

2. Use the `roleadd` and `passwd` commands to add the role.

To create a role called `admin` with special privileges within the `guest` account, type the following:

# `/usr/sbin/roleadd admin`

# `/usr/bin/passwd admin`

3. Specify the privilege levels in the `/etc/user_attr` file.

To assign the `admin` role privileges to restore and stage file systems, add the following lines to the `/etc/user_attr` file:

admin::::auths=com.sun.netstorage.fsmgr.operator.file

guest::::type=normal;roles=admin

In this example, when a user logs in as `guest`, File System Manager prompts the user to select either No Role or Admin. If users know the Admin role password, they can select Admin, enter the Admin password, and have privileges to restore and stage file systems. All other users must select No Role and have read-only privileges.

Because multiple users with the same privilege level can be logged in to the software concurrently, there is a risk of one user's changes overwriting another user's previous changes. To prevent this, develop policies about who can make changes and how to notify others.

### To Add an Additional Server for File System Manager Access

File System Manager is set up by default to manage the server on which it is installed. It can also be used to manage other servers running Sun StorEdge SAM-FS software, but those additional servers must first be configured to allow File System Manager access.

1. Outside of the browser interface, use telnet to connect to the server you want to add. Log in as root.

2. Use the `fsmadm`(1M) `add` command to add the management station (the system on which the File System Manager software is installed) to the list of hosts that can remotely administer this server.

Only hosts that are added to the list through this command can remotely administer the server.

For example:

    # fsmadm add management_station.sample.com

3. To ensure that the management station is successfully added, use the `fsmadm`(1M) `list` command and verify that your management station is listed in the output.

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

5. From the Servers page, click Add.

The Add Server window is displayed.

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

7. Click OK.

### Setting the Session Timeout

The Sun Web Console framework has a default session timeout of 15 minutes. If File System Manger is the only application registered in the Sun Web Console, the File System Manager installation program changes the session timeout to 60 minutes. You can change the session timeout to a different value, but it is recommended that you not set it to a value greater than 60 minutes in order to preserve security.

To change the session timeout value, enter the following command on the management station:

`/opt/SUNWfsmgr/bin/fsmgr session` <timeout-in-minutes>

For example, to change the timeout value to 45 minutes, type:

`/opt/SUNWfsmgr/bin/fsmgr session 45`

### Using the File System Manager Portal Agent

When the File System Manager software is installed, the File System Manager Portal agent is also installed. This application acts as an information source for the Sun StorEdge Management Portal application. The Sun StorEdge Management Portal provides a customizable, single secure entry point for managing or monitoring the storage environment. It enables IT managers, system administrators, and business unit managers to create views of the storage environment that best meet their needs, and it provides centralized storage management.

By default, the File System Manager Portal agent is disabled. It should be enabled only if you are using the Sun StorEdge Management Portal software. The agent is a simple servlet that responds to requests made by the Sun StorEdge Management Portal software. The agent uses the same underlying software as the File System Manager and provides a thin-scripting, remote API for a small subset of the File System Manager data. The data returned by the agent consists of server name and file system summary information.

When the File System Manager software is uninstalled, the File System Manager Portal agent is also uninstalled. If the agent is running, it is stopped, and the system boot time startup support is removed, as are all log and temporary files.

The following subsections tell you how to start and configure the agent.

To Enable the File System Manager Portal Agent

Use the following command to start the agent or restart it when it becomes unavailable:

    # /opt/SUNWfsmgr/bin/fsmgr agent config -a

See the `fsmgr`(1M) man page for more options.

#### About Port Numbers for the File System Manager Portal Agent

The File System Manager Portal Agent uses an instance of the Tomcat web server to provide the remote data access service. This service normally runs on TCP ports 31218 and 31219. You can change the service ports by editing the port numbers defined in the file `/var/opt/SUNWfsmgr/agent/tomcat/conf/server.xml`.

To change the port numbers, first stop the agent using the `fsmgr`(1M) script. Edit the `server.xml` file and modify the port numbers. Then start the agent using the `fsmgr`(1M) script as described above.

If you change the port number in `server.xml`, you must also change it in the Sun StorEdge Management Portal software. By default, the port in that software is set to 31218.

#### About Configuration and Log Files for the File System Manager Portal Agent

The following files are used for configuring and logging data from the File System Manager Portal Agent:

- `/etc/opt/SUNWfsmgr/agent/conf.sh` - The configuration script that is used when starting the Tomcat process. It defines location of Tomcat, Java, and other critical components.

- `/var/opt/SUNWfsmgr/agent/tomcat/logs` - The directory that contains the following log files:

- `catalina.out` - The general log file. It contains the log message output from both Tomcat and the agent servlet. Any errors cause log messages to be written to this file.

- `fsmgr.`date-stamp`.log` - The application and servlet log file. It contains messages specific to the loading and the running of the agent servlet. It also contains stack trace and fatal error information from the underlying software.

To verify that the agent is running, check the `catalina.out` log file or use the `ps` and `grep` commands to find the agent process:

    # /usr/ucb/ps -augxww | grep SUNWfsmgr/agent/tomcat

##

Function of the `mcf` File

The master configuration file (`mcf`), located in `/etc/opt/SUNWsamfs/mcf`, describes all devices that are under the control of, or used by, the Sun StorEdge SAM-FS software. When you create this ASCII file at system configuration time, you declare attributes for each device, and you group the devices in each file system into family sets.

The `mcf`(4) file contains the information that these file systems need in order to identify and organize RAID and disk devices into file systems. It also contains entries for each automated library or device included in a file system. A sample `mcf`(4) file is located in `/opt/SUNWsamfs/examples/mcf`.

An `mcf`(4) file consists of lines of specification code divided into six columns, or fields, as shown in CODE EXAMPLE 2-1.

CODE EXAMPLE 2-1 Fields in an `mcf` File
         Equipment    Equipment    Equipment    Family    Device    Additional
         Identifier   Ordinal      Type         Set       State     Parameters

Follow these rules when entering data in the `mcf`(4) file:

- Enter either space or tab characters between the fields in the file.

- You can include comment lines in an `mcf`(4) file. Comment lines start with a pound character (`#`).

- Some fields are optional. Use a dash character (-) to indicate that an optional field contains no meaningful information.

For more information about writing the `mcf` file, see the `mcf`(4) man page. You can also use File System Manager to automatically create an `mcf` file. For information about installing File System Manager, see the Sun StorEdge SAM-FS Installation and Upgrade Guide. For information about using File System Manager, see its online help.

The following subsections describe each field in an `mcf`(4) file:

- The Equipment Identifier Field

- The Equipment Ordinal Field

- The Equipment Type Field

- The Family Set Field

- The Device State Field

- The Additional Parameters Field

### The Equipment Identifier Field

The Equipment Identifier field is a required field. Use the Equipment Identifier field to specify the following kinds of information:

- The file system name. If this field contains a file system name, it must be identical to the name in the Family Set field, and the subsequent lines in the `mcf`(4) file must define all the disks or devices included in the file system. More than one file system can be declared in an `mcf`(4) file. Typically, the first data line in an `mcf`(4) file declares the first file system, and subsequent lines specify the devices included in the file system. Other file systems declared in the `mcf`(4) file can be preceded by a blank comment line for readability. File system names must start with an alphabetic character and can contain only alphabetic characters, numeric characters, or underscore (_) characters.

- A disk partition or slice description. A `/dev/` entry in this field identifies a disk partition or slice.

- An automated library or optical drive description. A `/dev/samst` entry identifies an automated library or optical drive. If you are configuring a network-attached automated library, see the Sun StorEdge SAM-FS Installation and Upgrade Guide for more information.

- A tape drive description. This entry can be in one of two forms:

- A `/dev/rmt` entry.

- A path to a symbolic link that points to the same file to which the `/dev/rmt` link points. If you specify a tape drive in this manner, be sure to create the link before mounting the file system.

If the Equipment Identifier field contains the name of a file system, it is limited to 31 characters. For all other content, this field is limited to 127 characters.

### The Equipment Ordinal Field

For each row in the `mcf`(4) file, the Equipment Ordinal field must contain a numeric identifier for the file system component or device being defined. Specify a unique integer between 1 and 65534, inclusive. This is a required field.

### The Equipment Type Field

Enter a 2-, 3-, or 4-character code for the Equipment Type field. This is a required field.

The Equipment Type field in a Sun StorEdge SAM-FS file system can contain any of the values shown in TABLE 2-2.

TABLE 2-2 Sun StorEdge SAM-FS Equipment Type Field
Equipment Type Field Content | Meaning
--- | ---
ms | Defines a Sun StorEdge SAM-FS file system.
`md` | Defines a striped or round-robin device for storing file data.

Besides the file system equipment types, other codes are used to identify automated libraries and other devices. For more information about specific equipment types, see the `mcf`(4) man page.

### The Family Set Field

The Family Set field contains the name for a group of devices. This is a required field.

Family set names must start with an alphabetic character and can contain only alphabetic characters, numeric characters, or underscore (_) characters.

The lines that define the disk devices in a file system must all contain the same family set name. The software uses the family set name to group devices together as a file system. It physically records the family set name on all of the devices in the file system when the `sammkfs`(1M) command is issued. You can change this name by using the `-F` and `-R` options together in the `samfsck`(1M) command. For more information about the `sammkfs`(1M) command, see the `sammkfs`(1M) man page. For more information about the `samfsck`(1M) command, see the `samfsck`(1M) man page.

The lines that define the devices in an automated library, as well as the lines that define the devices in the library's associated drives, must contain the same family set name.

For a standalone, manually loaded removable media device, this field can contain a dash (-).

You can create a comment that is associated with a specific family set by inserting the identifier #family-set-name: just before the first device in that family set. Any comments that are added between that comment line and the last device in the family set will be associated with that family set. If the family set is later deleted through the File System Manager software, any related comments will also be deleted from the `mcf` file.

### The Device State Field

The Device State field specifies the state of the device when the file system is initialized. Valid device states are on and off. This is an optional field. If you do not want to specify a value, insert a dash character (-) to indicate that this field is omitted.

### The Additional Parameters Field

For a Sun StorEdge SAM-FS file system, the Additional Parameters field is optional and can be left blank. By default, library catalog files are written to`/var/opt/SUNWsamfs/catalog/`family-set-name. Use this field if you want to specify an alternative path to the library catalog file.

### Example `mcf` File

Each file system configuration is unique. System requirements and actual hardware differ from site to site. CODE EXAMPLE 2-2 shows an `mcf`(4) file with one SAM-QFS file system that uses `md` devices. This `mcf`(4) file also defines a tape library.

CODE EXAMPLE 2-2 Example `mcf` File Showing a File System and a Library
    # Equipment        Eq    Eq   Fam.  Dev.    Additional
    # Identifier       Ord  Type  Set   State   Parameters
    #-----------       ---   --  ------ ------  ----------
    samfs1             10    ma   samfs1  -
    /dev/dsk/c1t2d0s6  11    mm   samfs1  -
    /dev/dsk/c1t3d0s6  12    md   samfs1  -
    /dev/dsk/c1t4d0s6  13    md   samfs1  -
    /dev/dsk/c1t5d0s6  14    md   samfs1  -
    # scalar 1000 and 12 AIT tape drives
    /dev/samst/c5t0u0  30    rb   robot1  -
    /dev/rmt/4cbn     101    tp   robot1  on
    /dev/rmt/5cbn     102    tp   robot1  on
    /dev/rmt/6cbn     103    tp   robot1  on
    /dev/rmt/7cbn     104    tp   robot1  off
    /dev/rmt/10cbn    105    tp   robot1  on
    /dev/rmt/11cbn    106    tp   robot1  on
    /dev/rmt/3cbn     107    tp   robot1  on
    /dev/rmt/2cbn     108    tp   robot1  on
    /dev/rmt/1cbn     109    tp   robot1  on
    /dev/rmt/0cbn     110    tp   robot1  on
    /dev/rmt/9cbn     111    tp   robot1  on
    /dev/rmt/8cbn     112    tp   robot1  on

For more examples of file system configurations, see the Sun StorEdge SAM-FS Installation and Upgrade Guide.

### Interactions Among File Settings, Options, and Directives

The `mcf`(4) file defines each file system, but file system behavior depends on interactions among default system settings, settings in the `/etc/vfstab` file, settings in the `samfs.cmd` file, and options in the `mount`(1M) command.

You can specify some mount options, such as the stripe width, in more than one place. When this happens, settings in one place can override the settings in another.

For information about the various ways to specify mount options, see Setting Up Mount Parameters.

##

Initializing a File System

If you want to create a new file system or replace an old or damaged file system, you must initialize it using the `sammkfs`(1M) command.

The `sammkfs`(1M) command constructs new file systems, and its `-a` allocation-unit`` option enables you to specify the DAU setting.

Version 4U2 and later releases of the Sun StorEdge SAM-FS software support two different superblock designs. In CODE EXAMPLE 2-3, the `samfsinfo`(1M) command output shows that the `samfs1` file system is using a version 2 superblock.

CODE EXAMPLE 2-3 `samfsinfo` (1M) Command Example
    # samfsinfo samfs1
    name:     samfs1       version:        2
    time:     Wed Feb 21 13:32:18 1996
    count:    1
    capacity:      001240a0          DAU:         16
    space:         000d8ea0
    ord  eq   capacity      space   device
      0  10   001240a0   000d8ea0   /dev/dsk/c1t1d0s0

Be aware of the following operational and feature differences that pertain to these superblocks:

- Releases before 4U0 support only the version 1 superblock design.

- The 4U0 and later releases support the version 2 superblock. If you installed the 4U0 software as an upgrade, you must use the 4U0 or later `sammkfs`(1M) command to reinitialize your existing file systems before you attempt to use any of the features that depend on the version 2 superblock. Certain features, such as access control lists (ACLs), are supported only in the version 2 superblock. Reinitializing a file system is described as a step in the software installation upgrade process, but you can do this any time after the software is installed.

| Caution - File systems that use a version 2 superblock cannot revert to a release before 4U0. You cannot use 4U5 release software to create a version 1 superblock.

For more information about features that require a version 2 superblock, or about using the `sammkfs`(1M) command to create the version 2 superblock, see the Sun StorEdge SAM-FS Installation and Upgrade Guide.

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 for a Sun StorEdge SAM-FS file system.

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

Copyright © 2006, Sun Microsystems, Inc. All Rights Reserved.