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. It includes the following topics:



Note - References to Sun StorEdge SAM-FS also apply to Sun SAM-QFS configurations when talking about storage and archive management. References to Sun StorEdge QFS also apply to Sun SAM-QFS configurations when talking about file system design and capabilities. This section refers to Sun SAM-QFS only when needed for clarity.




Creating the mcf File

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.

CODE EXAMPLE 3-1 Fields in an mcf File
     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

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.

The Equipment Ordinal Field

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 less than or equal eq_ord less than or equal 65534. 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.

As TABLE 3-1 shows, a Sun StorEdge SAM-FS file system can contain either ms or md in the Equipment Type field.

TABLE 3-1 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 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.

TABLE 3-2 Sun StorEdge QFS or Sun SAM-QFS Equipment Type Field

Equipment Type Field Content

Meaning

ma

Defines a Sun StorEdge QFS or Sun SAM-QFS file system.

md

Defines a striped or round-robin device for storing file data.

mm

Defines a metadata device for storing inode and other nondata information.

mr

Defines a round-robin or striped data device.

gXXX

Striped group data device. Striped groups start with the letter g followed by a number. The number must be an integer such that 0 less than or equal XXX less than or equal 127. For example, g12.

All members in a striped group must be the same type and size. Different striped groups within one file system are not required to have the same number of members. md, mr, and gXXX devices cannot be mixed in one file system.


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.

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

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.

The Additional Parameters Field

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.


Examples of mcf Files

Each file system configuration is unique. System requirements and actual hardware differ from site to site. The following sections show sample mcf files.

Sun StorEdge SAM-FS Volume Management Example

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.

CODE EXAMPLE 3-2 Example mcf File for a Sun StorEdge SAM-FS File System
# Sun StorEdge SAM-FS file system configuration example
#
# Equipment       Eq    Eq   Fam.  Dev.    Additional
# Identifier      Ord  Type  Set   State   Parameters
#-----------      ---   --  ------ ------  ------------------
samfs1             10  ms  samfs1
/dev/dsk/c1t1d0s6  11  md  samfs1  -
/dev/dsk/c2t1d0s6  12  md  samfs1  -
/dev/dsk/c3t1d0s6  13  md  samfs1  -
/dev/dsk/c4t1d0s6  14  md  samfs1  -
/dev/dsk/c5t1d0s6  15  md  samfs1  -

Sun StorEdge QFS and Sun SAM-QFS Volume Management Examples

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.

Example 1

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-3 Example mcf File Showing Striped Groups
# Sun StorEdge QFS file system configuration
#
# Equipment       Eq   Eq    Fam.  Dev.    Additional 
# Identifier      Ord  Type  Set   State   Parameters
#-----------      ---   --  ------ ------  ------------------
qfs1               10   ma   qfs1    -
/dev/dsk/c2t1d0s7  11   mm   qfs1    -
/dev/dsk/c3t0d0s6  12   g0   qfs1    -
/dev/dsk/c3t0d1s6  13   g0   qfs1    -
/dev/dsk/c4t0d0s6  14   g1   qfs1    -
/dev/dsk/c4t0d1s6  15   g1   qfs1    -

Example 2

CODE EXAMPLE 3-4 shows an mcf file with three Sun SAM-QFS file systems.

CODE EXAMPLE 3-4 Example mcf File Showing Three Sun SAM-QFS File Systems
# Sun SAM-QFS file system configuration example
#
 
# Equipment       Eq    Eq   Fam.  Dev.    Additional 
# Identifier      Ord  Type  Set   State   Parameters
#-----------      ---   --  ------ ------  ------------------
qfs1               10  ma   qfs1   -
/dev/dsk/c1t13d0s6 11  mm   qfs1   -
/dev/dsk/c1t12d0s6 12  mr   qfs1   -
#
qfs2               20  ma   qfs2   -
/dev/dsk/c1t5d0s6  21  mm   qfs2   -
/dev/dsk/c5t1d0s6  22  mr   qfs2   -
#
qfs3               30  ma   qfs3   -
/dev/dsk/c7t1d0s3  31  mm   qfs3   -
/dev/dsk/c6t1d0s6  32  mr   qfs3   -
/dev/dsk/c6t1d0s3  33  mr   qfs3   -
/dev/dsk/c5t1d0s3  34  mr   qfs3   -

Example 3

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.

CODE EXAMPLE 3-5 Example mcf File Showing a Sun SAM-QFS File System and a Library
# Sun SAM-QFS file system configuration example
#
 
# 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 showing file system configuration in the mcf file, see the Sun StorEdge QFS and Sun StorEdge SAM-FS Software Installation and Configuration Guide.


Interactions Between File Settings, Options, and Directives

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.


Initializing 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.1 releases of these file systems support two different superblock designs. Both superblock designs are available to you in the 4.1 release. In CODE EXAMPLE 3-6, the samfsinfo(1M) command output shows which superblock a file system is using.

CODE EXAMPLE 3-6 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

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 icon

Caution - File systems that use a version 2 superblock cannot revert to a release prior to 4.0. You cannot use 4.1 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.

Example

CODE EXAMPLE 3-7 shows using the sammkfs(1M) command to initialize a Sun StorEdge SAM-FS file system using a version 2 superblock.

CODE EXAMPLE 3-7 Initializing a File System with a Version 2 Superblock
# sammkfs -a 64 samfs1
Building 'samfs1' will destroy the contents of devices:
                /dev/dsk/c1t9d0s2
                /dev/dsk/c8t1d0s2
                /dev/dsk/c8t5d0s2
                /dev/dsk/c8t6d0s2
Do you wish to continue? [y/N] y
total data kilobytes       = 1715453952
total data kilobytes free  = 1715453760
total meta kilobytes       = 17684128
total meta kilobytes free  = 17680304

For more information about the sammkfs(1M) command, see the sammkfs(1M) man page.


Configuration Examples

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.


procedure icon  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.

CODE EXAMPLE 3-8 Example Sun StorEdge QFS Round Robin mcf File
# Sun StorEdge QFS disk cache configuration
# Round-robin mcf example
 
# Equipment       Eq   Eq    Fam.  Dev     Additional
# Identifier      Ord  Type  Set   State   Parameters
#-----------      ---   --  ------ ------  ------------------
qfs1                1   ma   qfs1
/dev/dsk/c5t0d0s6  11   mm   qfs1    on
/dev/dsk/c1t1d0s6  12   mr   qfs1    on
/dev/dsk/c2t1d0s6  13   mr   qfs1    on
/dev/dsk/c3t1d0s6  14   mr   qfs1    on
/dev/dsk/c4t1d0s6  15   mr   qfs1    on

2. Use the mkdir(1) command to create the /qfs mount point for the /qfs1 file system.

For example:

# mkdir /qfs

3. Use the sammkfs(1M) command to initialize the file system.

The following example uses the default 64-kilobyte DAU:

# sammkfs qfs1

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:

qfs1    -    /qfs    samfs    -    yes    stripe=0

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

For example:

# mount /qfs


procedure icon  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.

CODE EXAMPLE 3-9 Example Sun StorEdge SAM-FS Round Robin mcf File
# Sun StorEdge SAM-FS disk cache configuration
# Round-robin mcf example
 
# Equipment       Eq   Eq    Fam.   Dev     Additional
# Identifier      Ord  Type  Set    State   Parameters
#-----------      ---   --  ------  ------  -----------------
samfs1              1   ms   samfs1
/dev/dsk/c1t1d0s6  11   md   samfs1  on
/dev/dsk/c2t1d0s6  12   md   samfs1  on
/dev/dsk/c3t1d0s6  13   md   samfs1  on
/dev/dsk/c4t1d0s6  14   md   samfs1  on

2. Use the mkdir(1) command to create the /samfs mount point for the /samfs1 file system.

For example:

# mkdir /samfs

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:

# sammkfs -a 64 samfs1

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:

samfs1    -    /samfs    samfs    -    yes    stripe=0

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

For example:

# mount /samfs


procedure icon  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.

CODE EXAMPLE 3-10 Example Sun StorEdge QFS Striped Disk mcf File
# Sun StorEdge QFS disk cache configuration
# Striped Disk mcf example
 
# Equipment       Eq   Eq    Fam.  Dev.    Additional
# Identifier      Ord  Type  Set   State   Parameters
#-----------      ---   --  ------ ------  ------------------
qfs1               10   ma  qfs1
/dev/dsk/c0t1d0s6  11   mm  qfs1     on
/dev/dsk/c1t1d0s6  12   mr  qfs1     on
/dev/dsk/c2t1d0s6  13   mr  qfs1     on
/dev/dsk/c3t1d0s6  14   mr  qfs1     on
/dev/dsk/c4t1d0s6  15   mr  qfs1     on

2. Use the mkdir(1) command to create the /qfs mount point for the /qfs1 file system.

For example:

# mkdir /qfs

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:

# sammkfs -a 128 qfs1

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:

qfs1    -    /qfs    samfs    -    yes    stripe=1

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

For example:

# mount /qfs


procedure icon  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.

CODE EXAMPLE 3-11 Example Sun StorEdge SAM-FS Striped Disk mcf File
# Sun StorEdge SAM-FS disk cache config
# Striped Disk mcf example
 
# Equipment       Eq   Eq    Fam.  Dev.    Additional
# Identifier      Ord  Type  Set   State   Parameters
#-----------      ---   --  ------ ------  ------------------
samfs1             10   ms  samfs1
/dev/dsk/c1t1d0s6  11   md  samfs1   on
/dev/dsk/c2t1d0s6  12   md  samfs1   on
/dev/dsk/c3t1d0s6  13   md  samfs1   on
/dev/dsk/c4t1d0s6  14   md  samfs1   on

2. Use the mkdir(1) command to create the /samfs mount point for the /samfs1 file system.

For example:

# mkdir /samfs

3. Use the sammkfs(1M) command to initialize the file system.

The following example uses the default 16-kilobyte DAU:

# sammkfs samfs1

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.

For example:

# mount /samfs


procedure icon  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.



Note - The minimum disk space allocated in a striped group is as follows:

minimum_disk_space_allocated = DAU x number_of_disks_in_the_group

Writing a single byte of data fills the entire minimum disk space allocated in a striped group. Striped groups are used for very specific applications. Make sure that you understand the effects of using striped groups with your file system.



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.

CODE EXAMPLE 3-12 Example Sun StorEdge QFS Striped Group mcf File
# Sun StorEdge QFS disk cache configuration
# Striped Groups mcf example
 
# Equipment       Eq   Eq    Fam.  Dev.    Additional 
# Identifier      Ord  Type  Set   State   Parameters
#-----------      ---   --  ------ ------  ------------------
qfs1               10   ma  qfs1
/dev/dsk/c0t1d0s6  11   mm  qfs1     on
/dev/dsk/c1t1d0s6  12   g0  qfs1     on
/dev/dsk/c2t1d0s6  13   g0  qfs1     on
/dev/dsk/c3t1d0s6  14   g1  qfs1     on
/dev/dsk/c4t1d0s6  15   g1  qfs1     on

2. Use the mkdir(1) command to create the /qfs mount point for the /qfs1 file system.

For example:

# mkdir /qfs

3. Use the sammkfs(1M) command to initialize the file system.

The following example sets the DAU size to 128 kilobytes:

# sammkfs -a 128 qfs1

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:

 qfs1    -    /qfs    samfs    -    yes   stripe=0

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.

For example:

# mount /qfs