C H A P T E R 2 |
Configuring the File System |
The installation and configuration process is described completely in the Sun StorageTek QFS Installation and Upgrade Guide. This chapter provides additional information about configuring the file system used in the Sun StorageTek QFS environment. This chapter contains the following sections:
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 QFS 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 QFS 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.
|
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.
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.
5. At the Password prompt, enter the password.
7. In the Storage section, click File System Manager.
You are now logged in to File System Manager.
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.
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:
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.
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.
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
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:
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:
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.
|
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 QFS 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.
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.
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
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 QFS 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.
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 QFS 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 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.
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.
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 QFS or SAM-QFS file system can contain any of the values shown in TABLE 2-2.
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 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 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.
For a SAM-QFS 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.
For a Sun StorageTek QFS shared file system, this field must contain the keyword shared.
For a Sun StorageTek QFS unshared file system, enter a dash (-) or leave this field blank.
Each file system configuration is unique. System requirements and actual hardware differ from site to site. The following code examples show sample mcf files.
CODE EXAMPLE 2-2 shows an mcf file for a Sun StorageTek QFS file system with two striped groups.
CODE EXAMPLE 2-3 shows an mcf file with three Sun StorageTek QFS file systems.
CODE EXAMPLE 2-4 shows an mcf file with one SAM-QFS file system that uses md devices. This mcf file also defines a tape library.
For more examples of file system configurations, see the Sun StorageTek QFS Installation and Upgrade Guide.
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.
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 QFS software support two different superblock designs. In CODE EXAMPLE 2-5, the samfsinfo(1M) command output shows that the samfs1 file system is using a version 2 superblock.
Be aware of the following operational and feature differences that pertain to these superblocks:
![]() |
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 QFS 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:
The preceding command builds a version 2 superblock for a stand-alone Sun StorageTek QFS or SAM-QFS 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. For information about using the sammkfs(1M) command to initialize a shared Sun StorageTek QFS file system, see the Sun StorageTek QFS Installation and Upgrade Guide.
This section presents sample configurations and shows various steps and decisions involved in setting up the mcf file on a server. It includes the following procedures:
Note that all sample SAM-QFS configurations could have automated libraries and other removable media devices defined as well, essentially extending the file system beyond the size of the disk cache. Removable media device configurations are shown in only one example. For information about configuring removable media devices, see the Sun StorageTek Storage Archive Manager Installation and Upgrade Guide.
The sample configurations assume that the file system is loaded on the system and that all file systems are unmounted.
|
This sample configuration illustrates a Sun StorageTek QFS file system that separates the metadata onto a low-latency disk. Round-robin allocation is used on four partitions. Each disk is on a separate controller.
This procedure assumes the following:
1. Use an editor to create the mcf file, as shown in CODE EXAMPLE 2-6.
2. Use the mkdir(1) command to create the /qfs mount point for the /qfs1 file system:
3. Use the sammkfs(1M) command to initialize the file system.
The following example uses the default 64-kilobyte DAU:
4. Use an editor to modify the /etc/vfstab file.
The Sun StorageTek QFS file system with mr data devices uses striped allocation as a default, so you must set stripe=0 for round-robin allocation. To explicitly set round-robin on the file system, set stripe=0, as follows:
5. Use the mount(1M) command to mount the file system:
|
In this sample configuration, file data is striped to four data partitions by default.
This procedure assumes the following:
1. Use an editor to create the mcf file, as shown in CODE EXAMPLE 2-7.
2. Use the mkdir(1) command to create the /qfs mount point for the /qfs1 file system:
3. Use the sammkfs(1M) command to initialize the file system.
The default DAU is 64 kilobytes, but the following example sets the DAU size to 128 kilobytes:
With this configuration, any file written to this file system is striped across all of the devices in increments of 128 kilobytes.
4. Use an editor to modify the /etc/vfstab file.
The Sun StorageTek QFS file system uses striped allocation by default. This example sets the stripe width as stripe=1, which is the default. The following setting stripes data across all four of the mr devices with a stripe width of 1 DAU:
5. Use the mount(1M) command to mount the file system:
|
Striped groups enable you to group RAID devices together for very large files. A DAU is represented by one bit in the bitmaps. If the striped group has n devices, n multiplied by the DAU is the minimum allocation. Only one bit in the bitmaps is used to represent n x DAU.
The minimum disk space allocated in a striped group is as follows:
minimum-disk-space-allocated = DAU x number-of-disks-in-the-group
Files with lengths less than the aggregate stripe width times the number of devices (in this example, files less than 128 kilobytes x 4 disks = 512 kilobytes in length) still use 512 kilobytes of disk space. Files larger than 512 kilobytes have space allocated for them as needed in total space increments of 512 kilobytes.
The devices within a striped group must be the same size. It is not possible to add devices to increase the size of a striped group. You can use the samgrowfs(1M) command to add additional striped groups, however. For more information about this command, see the samgrowfs(1M) man page.
This sample configuration illustrates a Sun StorageTek QFS file system that separates the metadata onto a low-latency disk. Two striped groups are set up on four drives.
This procedure assumes the following:
1. Use an editor to create the mcf file, as shown in CODE EXAMPLE 2-8.
2. Use the mkdir(1) command to create the /qfs mount point for the /qfs1 file system:
3. Use the sammkfs(1M) command to initialize the file system.
The following example sets the DAU size to 128 kilobytes:
4. Use an editor to modify the /etc/vfstab file.
The following example uses the default setting of stripe=0, which essentially specifies a round-robin allocation from striped group g0 to striped group g1:
This /etc/vfstab file sets the stripe width using the stripe= option. In this example, there are two striped groups, g0 and g1. With the stripe=0 specification, files are written round-robin around the two striped groups.
Note - To change the configuration of the striped group after it is created, you must issue another sammkfs(1M) command. |
5. Use the mount(1M) command to mount the file system:
Copyright © 2007, Sun Microsystems, Inc. All Rights Reserved.