C H A P T E R  2

Configuring the File System

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


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 StorageTek Storage Archive Manager 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 StorageTek SAM 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.


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

1. Log in to the 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.


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 Javatrademark 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.


procedure icon  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 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 volume serial names (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 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.


procedure icon  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 StorageTek SAM software, but those additional servers must first be configured to allow File System Manager access.

1. Outside of the browser interface, use the telnet utility 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 Java Web Console framework has a default session timeout of 15 minutes. 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


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 StorageTek SAM 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 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 file is located in /opt/SUNWsamfs/examples/mcf.

An mcf 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 file:

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 StorageTek Storage Archive Manager Installation and Upgrade Guide. For information about using File System Manager, see its online help.

The following subsections describe each field in an mcf file:

The Equipment Identifier Field

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

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 file, the Equipment Ordinal (eq) 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 StorageTek SAM file system can contain either of the values shown in TABLE 2-2.


TABLE 2-2 Sun StorageTek SAM Equipment Type Field

Equipment Type Field Content

Meaning

ms

Defines a Sun StorageTek SAM 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 stand-alone, 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 StorageTek SAM 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 file with one SAM-QFS file system that uses md devices. This mcf 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 StorageTek Storage Archive Manager Installation and Upgrade Guide.

Interactions Among File Settings, Options, and Directives

The mcf 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 StorageTek SAM 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:



caution icon

Caution - File systems that use a version 2 superblock cannot revert to a release before 4U0. You cannot use 4U6 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 StorageTek Storage Archive Manager 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 StorageTek SAM 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.