C H A P T E R 3 |
Volume Management |
The master configuration file (mcf) describes all devices that are under the control of, or used by, the Sun StorEdge QFS or Sun StorEdge SAM-FS software. When you create this file, you declare attributes for each device, and you group the devices comprising each file system into family sets.
The installation and configuration process is described completely in the Sun StorEdge QFS and Sun StorEdge SAM-FS Software Installation and Configuration Guide. This chapter provides additional information about configuring the file systems used in the Sun StorEdge QFS and Sun StorEdge SAM-FS environments. This chapter contains the following sections:
The first step toward configuring a Sun StorEdge QFS or Sun StorEdge SAM-FS file system is to create a master configuration file in /etc/opt/SUNWsamfs/mcf. 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 is an ASCII file that consists of lines of specification code divided into six columns, or fields. CODE EXAMPLE 3-1 shows the six fields in an mcf file line.
Equipment Equipment Equipment Family Device Additional Identifier Ordinal Type Set State Parameters |
The following rules pertain to how data can be entered in the mcf file:
For more information about writing the mcf file, see the mcf(4) man page. You can also use the SAM-QFS Manager to create an mcf file. For information about installing SAM-QFS Manager, see Sun StorEdge QFS and Sun StorEdge SAM-FS Software Installation and Configuration Guide. For information about using SAM-QFS Manager, see its online help.
The following sections 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 Family Set, 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 field must contain a numeric identifier for the file system component or device being defined. Specify a unique integer such that 1 eq_ord 65534. This is a required field.
Enter a 2-, 3-, or 4-character code for the Equipment Type field. This is a required field.
As TABLE 3-1 shows, a Sun StorEdge SAM-FS file system can contain either ms or md in the Equipment Type field.
Defines a striped or round-robin device for storing file data and metadata information. |
As TABLE 3-2 shows, a Sun StorEdge QFS or Sun SAM-QFS file system can contain either ma, md, mm, mr, or gXXX in the Equipment Type field.
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.
For lines that define a file system, 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 to groups devices with the same Family Set name together as a file system. It physically records the Family Set name on all 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 on 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.
For lines that define an automated library and its associated drives, the lines defining the devices must contain the same Family Set name.
For a standalone, manually loaded removable media device, this field can contain a dash (-).
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 enter on or off, enter a dash (-) character to indicate that this field is omitted.
For a Sun StorEdge SAM-FS file system, the Additional Parameters field is optional and can be left completely blank. By default, library catalog files are written to /var/opt/SUNWsamfs/catalog/family_set_name. Use this field if you want to specifiy an alternate path to the library catalog file.
For a Sun StorEdge QFS shared file system, this field must contain the keyword shared.
For a Sun StorEdge 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 sections show sample mcf files.
For the Sun StorEdge SAM-FS file system, you can define family sets in the /etc/opt/SUNWsamfs/mcf file in the Equipment Type field using the following equipment types:
Both metadata (including inodes, directories, allocation maps, and so on) and file data on Sun StorEdge SAM-FS file systems are located on the same disk. Data files are striped or round-robin through each disk partition defined within the same file system.
CODE EXAMPLE 3-2 shows an mcf file for a Sun StorEdge SAM-FS file system.
For the Sun StorEdge QFS and Sun SAM-QFS file systems, family sets are defined in the /etc/opt/SUNWsamfs/mcf file in the Equipment Type field using the following equipment types:
Groups are specified with g0 through g127 equipment type numbers, with the stripe width on each device being the DAU. All devices in a striped group must be the same size. Different striped groups within one file system are not required to have the same number of members. mr and gXXX devices can be mixed in a file system, but md devices cannot be mixed with either mr or gXXX devices in a file system.
Data can be striped (if all groups contain the same number of devices) or round-robin between groups. The default is round robin.
Data files are striped or round-robin through each data disk partition (mr or gXXX) defined within the same file system.
CODE EXAMPLE 3-3 shows an mcf file for a Sun StorEdge QFS or Sun SAM-QFS file system with two striped groups.
CODE EXAMPLE 3-4 shows an mcf file with three Sun SAM-QFS file systems.
CODE EXAMPLE 3-5 shows an mcf file with one Sun SAM-QFS file system that uses md devices. This mcf file also defines a tape library.
For more examples showing file system configuration in the mcf file, see the Sun StorEdge QFS and Sun StorEdge SAM-FS Software Installation and Configuration Guide.
The mcf file defines each file system, but file system behavior depends on interactions between default systems settings, settings in the /etc/vfstab file, settings in the samfs.cmd file, and options on the mount(1M) command line.
You can specify some mount options, for example 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 Mounting a File System.
The sammkfs(1M) command constructs new file systems, and its -a allocation_unit option allows you to specify the DAU setting. The number specified for allocation_unit determines the DAU setting.
The 4.2 releases of these file systems support two different superblock designs. Both superblock designs are available to you in the 4.2 release. In CODE EXAMPLE 3-6, the samfsinfo(1M) command output shows which superblock a file system is using.
The first line of the preceding output indicates that this is 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 prior to 4.0. You cannot use 4.2 release software to create a version 1 superblock. |
For more information about features that require a version 2 superblock, or on using the sammkfs(1M) command to create the version 2 superblock, see the Sun StorEdge QFS and Sun StorEdge SAM-FS Software Installation and Configuration Guide.
CODE EXAMPLE 3-7 shows using the sammkfs(1M) command to initialize a Sun StorEdge SAM-FS file system using a version 2 superblock.
For more information about the sammkfs(1M) command, see the sammkfs(1M) man page.
The rest of this chapter presents sample configurations and shows various steps and considerations in setting up the mcf file on a server. The following procedures are described:
Note that all sample Sun StorEdge 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 StorEdge QFS and Sun StorEdge SAM-FS Software Installation and Configuration Guide.
The sample configurations assume that the file system is loaded on the system and all file systems are unmounted.
To Create a Sun StorEdge QFS Round-Robin Disk Configuration |
This sample configuration illustrates a Sun StorEdge 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.
CODE EXAMPLE 3-8 shows an example mcf file.
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 StorEdge 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 the stripe=0, as follows:
5. Use the mount(1M) command to mount the file system.
To Create a Sun StorEdge SAM-FS Round-Robin Disk Configuration |
This sample configuration illustrates a Sun StorEdge SAM-FS file system. Striped allocation is used by default on four partitions. You must set stripe=0 to specify round-robin allocation. The file system is created using the sammkfs(1M) command. The data devices consist of four disks attached to four controllers. Each disk is on a separate controller.
1. Use an editor to create the mcf file.
CODE EXAMPLE 3-9 shows an example mcf file.
2. Use the mkdir(1) command to create the /samfs mount point for the /samfs1 file system.
3. Use the sammkfs(1M) command to initialize the file system.
The default DAU is 16 kilobytes, but the following example sets the DAU size to 64 kilobytes:
4. Use an editor to modify the /etc/vfstab file.
The Sun StorEdge SAM-FS file system uses striped allocation by default, so you must set stripe=0 for round-robin allocation. To explicitly set round-robin on the file system, set the stripe=0, as follows:
5. Use the mount(1M) command to mount the file system.
To Create a Sun StorEdge QFS Striped Disk Configuration |
This sample configuration illustrates a Sun StorEdge QFS file system. By default, file data is striped to four data partitions.
This procedure assumes the following:
1. Use an editor to create the mcf file.
CODE EXAMPLE 3-10 shows an example mcf file.
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 StorEdge SAM-FS file system uses striped allocation by default. This example sets the stripe width as stripe=1 DAU, which is the default. The following setting stripes data across all four of the mr devices with a stripe width of one DAU:
5. Use the mount(1M) command to mount the file system.
To Create a Sun StorEdge SAM-FS Striped Disk Configuration |
This sample configuration illustrates a Sun StorEdge SAM-FS file system.
1. Use an editor to create the mcf file.
CODE EXAMPLE 3-11 shows an example mcf file. The data devices consist of four disks attached to four controllers. Each disk is on a separate LUN.
2. Use the mkdir(1) command to create the /samfs mount point for the /samfs1 file system.
3. Use the sammkfs(1M) command to initialize the file system.
The following example uses the default 16-kilobyte DAU:
With this striped disk configuration, any file written to this file system is striped across all of the devices in increments of 16 kilobytes.
4. Use an editor to modify the /etc/vfstab file.
Specify the mount point for this file system in /etc/vfstab.
5. Use the mount(1M) command to mount the file system.
To Create a Sun StorEdge QFS Striped Groups Configuration |
Striped groups allow you to group RAID devices together for very large files. A DAU is represented by one bit in the bit maps. If the striped group has n devices, n multiplied by the DAU is the minimum allocation. Only one bit in the bit maps is used to represent n X DAU. This method of writing huge DAUs across RAID devices saves bit map space and system update time. Striped groups are useful for writing very large files to a group of RAID devices and for streaming large amounts of data to and from disk.
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 StorEdge 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.
CODE EXAMPLE 3-12 shows an example mcf file.
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, devices 12 and 13 are striped, and files are round-robin around the two striped groups. You are really treating a striped group as a bound entity. That is, you cannot change the configuration of the striped group, after it is created, without issuing another sammkfs(1M) command.
5. Use the mount(1M) command to mount the file system.
Copyright © 2004, Sun Microsystems, Inc. All rights reserved.