JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Sun QFS File System 5.3 Configuration and Administration Guide     Sun QFS and Sun Storage Archive Manager 5.3 Information Library
search filter icon
search icon

Document Information

Preface

1.  File System Overview

General File System Configurations

File System Features

Volume Management

Support for Paged and Direct I/O

High Capacity

Fast File System Recovery

Metadata Storage

vnode Interface

Shared File System Support

Additional File System Features

Sun QFS File Systems Design Basics

Inode Files and File Characteristics

Specifying Disk Allocation Units

DAU Settings and File System Geometry

ms and ma File Systems

Dual and Single Allocation Schemes

Data Alignment

Stripe Widths on Data Disks

Stripe Widths on ms File Systems

Stripe Widths on ma File Systems Not Using Striped Groups

Stripe Widths on ma File Systems Using Striped Groups

Stripe Widths on Metadata Disks

File Allocation Methods

Metadata Allocation

Round-Robin Allocation

Striped Allocation

Striped Groups

Mismatched Striped Groups

Example of a Mismatched Striped Group

Per-Logical Unit Number (LUN) Allocation Control

2.  About the Master Configuration File

3.  mcf File Examples

4.  Configuring the File System

5.  Configuring a Shared File System

6.  Administering File System Quotas

7.  Advanced File System Topics

8.  SMB Service in SAM-QFS

9.  Configuring WORM-FS File Systems

10.  Tunable Parameters

11.  Using QFS File Systems with SANergy (SAN-QFS)

12.  Mount Options in a Shared File System

13.  Using the samu Operator Utility

File Allocation Methods

The Sun QFS software enables you to specify both round-robin and striped allocation methods. The following table shows the default file allocation methods used.

Table 1-5 Default Allocation Methods

File System
Metadata
File Data
Stand-alone file system
Striped
Striped
Shared file system
Striped
Round-robin
Striped groups
Striped
Round-robin

Metadata Allocation

Metadata allocation varies according to the type of file system:

Inodes are 512 bytes in length. Directories are initially 4 kilobytes in length. The following table shows how the system allocates metadata.

Table 1-6 Metadata Allocation

Metadata Type
Allocation Increments for ma File Systems
Allocation Increments for ms File Systems
Inodes (.inodes file)
16-kilobyte DAU
16-kilobyte, 32-kilobyte, or 64-kilobyte DAU
Indirect blocks
16-kilobyte DAU
16-kilobyte, 32-kilobyte, or 64-kilobyte DAU
Directories
4-kilobyte blocks and 16-kilobyte DAUs
4 kilobytes, up to a 32-kilobyte total, than DAU size

Round-Robin Allocation

The round-robin allocation method writes one data file at a time to each successive device in the family set. Round-robin allocation is useful for multiple data streams because in this type of environment, aggregate performance can exceed striping performance.

Round-robin disk allocation enables a single file to be written to a logical disk. The next file is written to the next logical disk, and so on. When the number of files written equals the number of devices defined in the family set, the file system starts over again with the first device selected. If a file exceeds the size of the physical device, the first portion of the file is written to the first device, and the remainder of the file is written to the next device with available storage. The size of the file being written determines the I/O size.

To specify round-robin allocation explicitly, include stripe=0 in the /etc/vfstab file.

The following figures depict round-robin allocations in ms and ma file systems. In both figures , file 1 is written to disk 1, file 2 is written to disk 2, file 3 is written to disk 3, and so on. When file 6 is created, it is written to disk 1, restarting the round-robin allocation scheme.

Figure 1-1 Round-Robin Allocation in an ms File System Using Five Devices

image:Round-Robin Allocation in an ms File System Using Five Devices

Figure 1-2 Round-Robin Allocation in an ma File System Using Five Devices

image:Round-Robin Allocation in an ma File System Using Five Devices

Striped Allocation

By default, Sun QFS file systems use a striped allocation method to spread data over all the devices in the file system family set. Striping is a method of concurrently writing files in an interlaced fashion across multiple devices.

Striping is used when performance for one file requires the additive performance of all the devices. A file system that uses striped devices addresses blocks in an interlaced fashion rather than sequentially. Striping generally increases performance because it enables multiple I/O streams to write a file simultaneously across multiple disks. The DAU and the stripe width determine the size of the I/O transmission.

In a file system that uses striping, file 1 is written to disk 1, disk 2, disk 3, disk 4, and disk 5. File 2 is written to disks 1 through 5 as well. The DAU multiplied by the stripe width determines the amount of data written to each disk in a block.

When a file system writes a file to an md device, it starts by trying to fit the file into a small DAU, which is 4 kilobytes. If the file does not fit into the first eight small DAUs (32 kilobytes) allocated, the file system writes the remainder of the file into one or more large DAUs.

When a file system writes a file to an mr device, it writes first to one DAU, then to another, and so on. The mr devices have only one DAU size.

Multiple active files cause significantly more disk head movement with striped allocation than with round-robin allocation. If I/O is to occur to multiple files simultaneously, use round-robin allocation.

The following figures depict ms and ma file systems that use striped allocations. In these figures, DAU x stripe-width bytes of the file are written to disk 1, DAU x stripe-width bytes of the file are written to disk 2, and so on. The order of the stripe is first-in-first-out for the files. Striping spreads the I/O load over all the disks.

Figure 1-3 Striping in an ms File System Using Five Devices

image:Striping in an ms File System Using Five Devices

Figure 1-4 Striping in an ma File System Using Five Devices

image:Striping in an ma File System Using Five Devices

Striped Groups

A striped group is a Sun QFS allocation method designed for file systems that have extremely large I/O requirements and terabytes of disk cache. A striped group enables you to designate an Equipment Type value that accounts for multiple physical disks. Multiple striped group Equipment Type entries can make up a single Sun QFS file system. Striped groups save bitmap space and system update time for very large RAID configurations.

A striped group is a collection of devices within a Sun QFS file system. Defined in the mcf file as g XXX devices, striped groups enable one file to be written to and read from two or more devices. You can specify up to 128 striped groups within a file system.

The following figure depicts an ma file system using striped groups and a round-robin allocation. In this figure, files written to the qfs1 file system are allocated round-robin among the defined striped groups g0, g1, and g2. Each group consists of two physical RAID devices.

Figure 1-5 Sun QFS Round-Robin Striped Groups

image:round-robin striped group

For the configuration in the figure, the mount point option in /etc/vfstab is set to stripe=0. The following example shows the mcf file that declares these striped groups.

Example 1-1 mcf File Showing Striped Groups

# Equipment Eq Eq Fam Dev Additional 
# Identifier Ord Type Set State Parameters 
# 
qfs1 10 ma qfs1 
/dev/dsk/c0t1d0s6 11 mm qfs1 - 
/dev/dsk/c1t1d0s2 12 g0 qfs1 - 
/dev/dsk/c2t1d0s2 13 g0 qfs1 - 
/dev/dsk/c3t1d0s2 14 g1 qfs1 - 
/dev/dsk/c4t1d0s2 15 g1 qfs1 - 
/dev/dsk/c5t1d0s2 16 g2 qfs1 - 
/dev/dsk/c6t1d0s2 17 g2 qfs1 -

The following figure depicts a Sun QFS ma file system using striped groups and striped allocation. Files written to the qfs1 file system are striped through groups g0, g1, and g2. Each group includes four physical RAID devices. The mount point option in /etc/vfstab is set to stripe=1 or greater.

Figure 1-6 Sun QFS Striped Group Allocation

image:sun-qfs striped group allocation

Mismatched Striped Groups

You can build a file system that has mismatched striped groups, which are multiple striped groups with different numbers of devices in each group. Sun QFS file systems support mismatched striped groups, but they do not support striping on mismatched groups. File systems with mismatched striped groups are mounted as round-robin file systems.


Note - In a file system that contains mismatched striped groups, a single file cannot span multiple stripe groups. If the stripe group on which the file resides fills, it cannot be extended. If mismatched stripe groups are present, use the setfacommand's -g option to direct files into the desired group. For more information, see setfa(1) in Sun QFS and Sun Storage Archive Manager 5.3 Reference Manual.

To determine how full a stripe group is, use the samu operator utility and access the m display to display the status of mass storage.


The example in the next section shows how a file system can be set up with mismatched striped groups to store different types of files.

Example of a Mismatched Striped Group

Suppose that you need to create a file system at your site that contains both video and audio data.

Video files are quite large and require greater performance than audio files. You want to store them in a file system with a large striped group, because striped groups maximize performance for very large files.

Audio files are smaller and require lower performance than video files. You want to store them in a small striped group. One file system can support both video and audio files.

The following figure depicts the file system needed. It is an ma file system that uses mismatched striped groups in a striped allocation.

Figure 1-7 Sun QFS File System Using Mismatched Striped Groups in a Striped Allocation

image:Sun QFS File System Using Mismatched Striped Groups in a Striped Allocation

The following table shows the characteristics of this sample file system.

Table 1-7 Sample File System Characteristics

Characteristics
Notes
File system name
avfs
Number of stripe groups
Two. The video file group is g0. The audio file group is g1.
Stripe width
0
DAU
128 kilobytes
Number of disks for g0
Eight
Minimum block size for g0
Eight disks x 128-kilobyte DAU = 1024 kilobytes. This is the amount of data written in one block write. Each disk receives 128 kilobytes of data, so the total amount written to all disks at one time is 1024 kilobytes.
Number of disks for g1
One
Minimum block size for g1
One disk x 128-kilobyte DAU = 128 kilobytes

Add the following line to the /etc/vfstab file so that the environment recognizes the avfs file system:

avfs - /avfs samfs - no stripe=0

Note that in the /etc/vfstab file, stripe=0 is used to specify a round-robin file system. This value is used because a value greater than 0 is not supported for mismatched striped groups.

The following example shows the mcf file for file system avfs.

Example 1-2 mcf File for File System avfs

# Equipment Eq Eq Fam Dev Additional 
# Identifier Ord Type Set State Parameters 
# 
avfs 100 ma avfs 
/dev/dsk/c00t1d0s6 101 mm avfs - 
# 
/dev/dsk/c01t0d0s6 102 g0 avfs - 
/dev/dsk/c02t0d0s6 103 g0 avfs - 
/dev/dsk/c03t0d0s6 104 g0 avfs - 
/dev/dsk/c04t0d0s6 105 g0 avfs - 
/dev/dsk/c05t0d0s6 106 g0 avfs - 
/dev/dsk/c06t0d0s6 107 g0 avfs - 
/dev/dsk/c07t0d0s6 108 g0 avfs - 
/dev/dsk/c08t0d0s6 109 g0 avfs - 
# 
/dev/dsk/c09t1d0s6 110 g1 avfs -

When the mcf file for this file system is ready, you can issue the sammkfs and mount commands shown in the following example to create and mount the avfs file system.

Example 1-3 Commands to Create and Mount File System avfs

# sammkfs -a 128 avfs 
# mount avfs

After the file system is mounted, you can use the commands shown in the following example to create two directories for the two types of files.

Example 1-4 Commands to Create Directories in File System avfs

# cd /avfs 
# mkdir video 
# mkdir audio

Once the directories are created, you can use the setfa commands shown in the following example to assign the large striped group to video and the small striped group to audio. Files created in these directories are allocated on their respective striped groups because attributes are inherited.

Example 1-5 Commands to Set File Attributes

# setfa -g0 video 
# setfa -g1 audio

For more information about the sammkfs command, see sammkfs(1M) in Sun QFS and Sun Storage Archive Manager 5.3 Reference Manual. For more information about the mount commands, see mount_samfs(1M) in Sun QFS and Sun Storage Archive Manager 5.3 Reference Manual. For more information about the setfa command, see setfa(1) in Sun QFS and Sun Storage Archive Manager 5.3 Reference Manual.

Per-Logical Unit Number (LUN) Allocation Control

If necessary, you can disable allocation to a specific Sun QFS data partition by using the nalloc command, which prohibits any future allocation to that device. The feature is currently only usable on data partitions, not on metadata partitions.

Allocation to a partition can be restarted by either an alloc or on command.

The allocation state of a partition (allocflag) is persistent across boots.

The nalloc and alloc commands are available in the samu interface, and the samu on command also sets allocation to on. The samu screens display the nalloc state for partitions that have been disabled. The samtrace and samfsinfo output also include the allocation state.

For more information about the samu interface, see Chapter 13, Using the samu Operator Utility.