A P P E N D I X D

`mcf` File Examples

The master configuration file, `/etc/opt/SUNWsamfs/mcf`, defines the topology of the equipment managed by the Sun StorEdge QFS file system. This file specifies the devices and file systems included in the environment and contains information that enables you to identify the disk slices to be used and to organize them into Sun StorEdge QFS file systems.

This appendix provides some specific examples of `mcf` files for various types of file systems. It contains the following sections:

- Configuration Examples for Local File Systems

- Configuration Example for a Shared File System on a Solaris OS Platform

- Configuration Examples for Highly Available File Systems

- Configuration Example for a Shared File System on a Sun Cluster Platform

##

Configuration Examples for Local File Systems

Use the configuration examples in this section for configuring the `mcf` file for a Sun StorEdge QFS file system to be installed on a single Solaris OS host.

For `mcf` examples that you can use in a Sun Cluster environment, see Configuration Examples for Highly Available File Systems.

### Configuration Example 1

This example shows how to configure two Sun StorEdge QFS file systems using a server that has a Sun StorEdge Multipack desktop array connected by a SCSI attachment.

You can use the `format`(1M) command to determine how the disks are partitioned. CODE EXAMPLE D-1 shows the `format`(1M) command's output.

Note - Only the last lines of `format`(1M) output are shown.

CODE EXAMPLE D-1 `format` (1M) Command Output for Configuration Example 1
    # format < /dev/null
    Searching for disks...done
    AVAILABLE DISK SELECTIONS:
           0. c0t10d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
              /sbus@3,0/SUNW,fas@3,8800000/sd@a,0
           1. c0t11d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
              /sbus@3,0/SUNW,fas@3,8800000/sd@b,0
           2. c6t2d0 <SUN9.0G cyl 4924 alt 2 hd 27 sec 133>
              /pci@7,4000/SUNW,isptwo@3/sd@2,0
           3. c6t3d0 <SUN9.0G cyl 4924 alt 2 hd 27 sec 133>
              /pci@7,4000/SUNW,isptwo@3/sd@3,0
           4. c6t4d0 <SUN9.0G cyl 4924 alt 2 hd 27 sec 133>
              /pci@7,4000/SUNW,isptwo@3/sd@4,0
           5. c6t5d0 <SUN9.0G cyl 4924 alt 2 hd 27 sec 133>
              /pci@7,4000/SUNW,isptwo@3/sd@5,0
           6. c8t2d0 <SUN9.0G cyl 4924 alt 2 hd 27 sec 133>
              /pci@b,4000/SUNW,isptwo@3/sd@2,0
           7. c8t3d0 <SUN9.0G cyl 4924 alt 2 hd 27 sec 133>
              /pci@b,4000/SUNW,isptwo@3/sd@3,0
           8. c8t4d0 <SUN9.0G cyl 4924 alt 2 hd 27 sec 133>
              /pci@b,4000/SUNW,isptwo@3/sd@4,0
           9. c8t5d0 <SUN9.0G cyl 4924 alt 2 hd 27 sec 133>
              /pci@b,4000/SUNW,isptwo@3/sd@5,0
    Specify disk (enter its number):
    # format /dev/rdsk/c6t2d0s2
    .
    .
    .
    Part      Tag    Flag     Cylinders        Size            Blocks
      0 unassigned    wm       0               0         (0/0/0)           0
      1 unassigned    wm       0               0         (0/0/0)           0
      2     backup    wu       0 - 4923        8.43GB    (4924/0/0) 17682084
      3 unassigned    wm       0               0         (0/0/0)           0
      4 unassigned    wm       0 - 1229        2.11GB    (1230/0/0)  4416930
      5 unassigned    wm    1230 - 2459        2.11GB    (1230/0/0)  4416930
      6 unassigned    wm    2460 - 3689        2.11GB    (1230/0/0)  4416930
      7 unassigned    wm    3690 - 4919        2.11GB    (1230/0/0)  4416930

To Configure the System

Begin writing the `mcf` file for this configuration example by defining the file system and its disk partitions, as follows:

1. Write the `mcf` file.

a. Make an `ma` entry for the first file system (`qfs1`).

b. Using the information from the output of the `format` command, make an `mm` entry listing the partitions that constitute the metadata for the `qfs1` file system.

c. Using the information from the output of the `format` command, make a series of `mr` entries listing the partitions that constitute the file data for the `qfs1` file system.

d. Make similar entries for the second file system (`qfs2`).

The finished `mcf` file defines the following two file systems:

- The `qfs1` file system, which is created on slice `4` of the following disks: `c8t2d0` (metadata), `c6t2d0` (file data), and `c6t3d0` (file data).

- The `qfs2` file system, which is created on slice `5` of the following disks: `c8t2d0` (metadata), `c6t2d0` (file data), and `c6t3d0` (file data).

CODE EXAMPLE D-2 shows the resulting `mcf` file.

CODE EXAMPLE D-2 `mcf` File for Sun StorEdge QFS Example 1
    # cat /etc/opt/SUNWsamfs/mcf
    #
    # Equipment         Eq   Eq     Family   Device   Additional
    # Identifier        Ord  Type    Set     State    Parameters
    #-----------        ---  ----   ------   ------   ----------
    #
    qfs1                 10    ma   qfs1       on
    /dev/dsk/c8t2d0s4    11    mm   qfs1       on
    /dev/dsk/c6t2d0s4    12    mr   qfs1       on
    /dev/dsk/c6t3d0s4    13    mr   qfs1       on
    #
    qfs2                 20    ma   qfs2       on
    /dev/dsk/c8t2d0s5    21    mm   qfs2       on
    /dev/dsk/c6t2d0s5    22    mr   qfs2       on
    /dev/dsk/c6t3d0s5    23    mr   qfs2       on

2. Modify the `/etc/vfstab` file.

Make entries in the `/etc/vfstab` file for the `qfs1` and `qfs2` file systems that you defined in the `mcf` file. The last two lines in CODE EXAMPLE D-3 show entries for these new file systems.

For a description of the fields in the `/etc/vfstab` file, see Fields in the /etc/vfstab File.

CODE EXAMPLE D-3 `/etc/vfstab` File for Sun StorEdge QFS Example 1
    # cat /etc/vfstab
    # device            device                       file            mount
    # to                to                   mount   system   fsck   at    mount
    # mount             fsck                 point   type     pass   boot  params
    # -----             ----                 -----   ----     ----   ----  ------
    fd                  -                    /dev/fd  fd       -     no    -
    /proc               -                    /proc    proc     -     no    -
    /dev/dsk/c0t10d0s1  -                    -        swap     -     no    -
    /dev/dsk/c0t10d0s0  /dev/rdsk/c0t10d0s0  /        ufs      1     no    logging
    swap                -                    /tmp     tmpfs    -     yes   -
    qfs1                -                    /qfs1    samfs    -     yes  stripe=1
    qfs2                -                    /qfs2    samfs    -     yes  stripe=1

### Configuration Example 2

This example illustrates the configuration of a Sun StorEdge QFS file system that uses round-robin allocation on four disk drives.

This example assumes the following:

- The metadata device is a single partition (`s1`) used on controller 8, disk 4.

- The data devices consist of four disks attached to controller 6. Each disk is on a separate target (1-4).

To Configure the System

This example introduces the round-robin data layout. For more information about data layout, see the Sun StorEdge QFS Configuration and Administration Guide.

1. Write the `mcf` file as described in Configuration Example 1.

CODE EXAMPLE D-4 shows the `mcf` file for this round-robin disk configuration.

CODE EXAMPLE D-4 `mcf` File for Sun StorEdge QFS Example 2
    # cat /etc/opt/SUNWsamfs/mcf
    #
    # Equipment         Eq   Eq     Family   Device   Additional
    # Identifier        Ord  Type    Set     State    Parameters
    #-----------        ---  ----   ------   ------   ----------
    #
    qfs3                 10    ma   qfs3       on
    /dev/dsk/c8t4d0s4    11    mm   qfs3       on
    /dev/dsk/c6t2d0s4    12    mr   qfs3       on
    /dev/dsk/c6t3d0s4    13    mr   qfs3       on
    /dev/dsk/c6t4d0s4    14    mr   qfs3       on
    /dev/dsk/c6t5d0s4    15    mr   qfs3       on

2. Modify the `/etc/vfstab` file.

Edit the `/etc/vfstab` file to explicitly set round-robin allocation on the file system by specifying `stripe=0` in the`mount params` field. CODE EXAMPLE D-5 shows `stripe=0` for the `qfs3` file system.

For a description of the fields in the `/etc/vfstab` file, see Fields in the /etc/vfstab File.

CODE EXAMPLE D-5 `/etc/vfstab` File for Sun StorEdge QFS Example 2
    # cat /etc/vfstab
    #device             device                        file          mount
    #to                 to                   mount    system  fsck  at    mount
    #mount              fsck                 point    type    pass  boot  params
    #-----              ----                 -----    ----    ----  ----  ------
    fd                  -                    /dev/fd  fd      -     no    -
    /proc               -                    /proc    proc    -     no    -
    /dev/dsk/c0t10d0s1  -                    -        swap    -     no    -
    /dev/dsk/c0t10d0s0  /dev/rdsk/c0t10d0s0  /        ufs     1     no    logging
    swap                -                    /tmp     tmpfs   -     yes   -
    qfs3                -                    /qfs3    samfs   -     yes   stripe=0

3. Initialize the Sun StorEdge QFS file system by using the `sammkfs`(1M) command.

The default disk allocation unit (DAU) is 64 kilobytes, but the following example sets the DAU size to 128 kilobytes:

    # sammkfs -a 128 qfs1

### Configuration Example 3

This example illustrates the configuration of a Sun StorEdge QFS file system that stripes file data to four disk drives. This example assumes the following:

- The metadata device is a single partition (`s6`) used on controller 0, LUN 0.

- The data devices consist of four disks attached to controller 6. Each disk is on a separate target (2-5).

To Configure the System

1. Write the `mcf` file as shown in Configuration Example 1.

CODE EXAMPLE D-6 shows the `mcf` file for this striped disk configuration.

CODE EXAMPLE D-6 `mcf` File for Sun StorEdge QFS Example 3
    # Equipment         Eq   Eq     Family   Device   Additional
    # Identifier        Ord  Type    Set     State    Parameters
    #-----------        ---  ----   ------   ------   ----------
    #
    qfs4                 40    ma   qfs4       on
    /dev/dsk/c8t4d0s4    41    mm   qfs4       on
    /dev/dsk/c6t2d0s4    42    mr   qfs4       on
    /dev/dsk/c6t3d0s4    43    mr   qfs4       on
    /dev/dsk/c6t4d0s4    44    mr   qfs4       on
    /dev/dsk/c6t5d0s4    45    mr   qfs4       on

2. Modify the `/etc/vfstab` file.

Set the stripe width by using the `stripe=` option. CODE EXAMPLE D-7 shows the `/etc/vfstab` file with a mount parameter of `stripe=1` set for the `qfs4` file system.

For a description of the fields in the `/etc/vfstab` file, see Fields in the /etc/vfstab File.

CODE EXAMPLE D-7 `/etc/vfstab` File for Sun StorEdge QFS Example 3
    # cat /etc/vfstab
    #
    #device             device                        file         mount
    #to                 to                   mount    system fsck  at    mount
    #mount              fsck                 point    type   pass  boot  params
    #-----              ----                 -----    -----  ----  ----  ------
    fd                  -                    /dev/fd  fd     -     no    -
    /proc               -                    /proc    proc   -     no    -
    /dev/dsk/c0t10d0s1  -                    -        swap   -     no    -
    /dev/dsk/c0t10d0s0  /dev/rdsk/c0t10d0s0  /        ufs    1     no    logging
    swap                -                    /tmp     tmpfs  -     yes   -
    qfs4                -                    /qfs4    samfs  -     yes   stripe=1

The `stripe=1` specification stripes file data across all four of the `mr` data disks with a stripe width of one DAU. The DAU is the allocation unit you set when you use the `sammkfs`(1M) command to initialize the file system.

3. Initialize the Sun StorEdge QFS file system by using the `sammkfs`(1M) command.

The following example sets the DAU size to 128 kilobytes:

    # sammkfs -a 128 qfs1

With this striped disk configuration, any file written to this file system is striped across all of the devices in increments of 128 kilobytes. Files less than the aggregate stripe width times the number of devices still use 128 kilobytes of disk space. Files larger than 128 kilobytes have space allocated for them as needed in total space increments of 128 kilobytes.

### Configuration Example 4

Striped groups enable you to build RAID-0 devices of separate disk devices. With striped groups, however, there is only one DAU per striped group. This method of writing large, effective DAUs across RAID devices saves system update time and supports high-speed sequential I/O. Striped groups are useful for writing very large files to groups of disk devices.

Note - A DAU is the minimum disk space allocated. The minimum disk space allocated in a striped group is as follows: allocation-unit x number of disks in the group Writing a single byte of data consumes a DAU on every member of the striped group. Make sure that you understand the effects of using striped groups with your file system.

The devices within a striped group must be the same size. It is not possible to increase the size of a striped group. You can add additional striped groups to the file system, however.

This example illustrates the configuration of a Sun StorEdge QFS file system that separates the metadata onto a low-latency disk. The `mcf` file defines two striped groups on four drives. This example assumes the following:

- The metadata device is a single partition (`s5`) used on controller 8, disk 4.

- The data devices consist of four disks (two groups of two identical disks) attached to controller 6. Each disk is on a separate target (2-5).

To Configure the System

1. Write the `mcf` file as shown in Configuration Example 1.

CODE EXAMPLE D-8 shows a sample `mcf` file for a striped group configuration.

CODE EXAMPLE D-8 `mcf` File for Sun StorEdge QFS Example 4
    # cat /etc/opt/SUNWsamfs/mcf
    #
    # Equipment         Eq   Eq     Family   Device   Additional
    # Identifier        Ord  Type    Set     State    Parameters
    #-----------        ---  ----   ------   ------   ----------
    #
    qfs5                 50    ma   qfs5       on
    /dev/dsk/c8t4d0s5    51    mm   qfs5       on
    /dev/dsk/c6t2d0s5    52    g0   qfs5       on
    /dev/dsk/c6t3d0s5    53    g0   qfs5       on
    /dev/dsk/c6t4d0s5    54    g1   qfs5       on
    /dev/dsk/c6t5d0s5    55    g1   qfs5       on

2. Modify the `/etc/vfstab` file.

Set the stripe width by using the `stripe=` option. CODE EXAMPLE D-9 shows the `/etc/vfstab` file with a mount parameter of `stripe=0`, which specifies round-robin allocation between striped group `g0` and striped group `g1`.

For a description of the fields in the `/etc/vfstab` file, see "Fields in the /etc/vfstab File" on page 35.``

CODE EXAMPLE D-9 `/etc/vfstab` File for Sun StorEdge QFS Example 4
    # cat /etc/vfstab
    #device             device                        file          mount
    #to                 to                   mount    system  fsck  at    mount
    #mount              fsck                 point    type    pass  boot  params
    #-----              ----                 -----    ----    ----  ----  ------
    fd                  -                    /dev/fd  fd      -     no    -
    /proc               -                    /proc    proc    -     no    -
    /dev/dsk/c0t10d0s1  -                    -        swap    -     no    -
    /dev/dsk/c0t10d0s0  /dev/rdsk/c0t10d0s0  /        ufs     1     no    logging
    swap                -                    /tmp     tmpfs   -     yes   -
    qfs5                -                    /qfs5    samfs   -     yes   stripe=0

3. Initialize the Sun StorEdge QFS file system by using the `sammkfs`(1M) command.

The `-a` option is not used with striped groups because the DAU is equal to the size of an allocation, or the size, of each group.

    # sammkfs qfs5

In this example, there are two striped groups, `g0` and `g1`. With `stripe=0` in`/etc/vfstab`, devices 12 and 13 are striped; devices 14 and 15 are striped; and files are round-robined around the two striped groups. A striped group is treated as a bound entity. After you configure a stripe group, you cannot change it without issuing another `sammkfs`(1M) command.

##

Configuration Example for a Shared File System on a Solaris OS Platform

FIGURE D-1 illustrates a Sun StorEdge QFS shared file system configuration in a SAM-QFS environment.

FIGURE D-1 Sun StorEdge QFS Shared File System Configuration in a SAM-QFS Environment

[ D ]

FIGURE D-1 shows four network attached hosts: `titan`, `tethys`, `dione`, and `mimas`. The `tethys`, `dione`, and `mimas` hosts are clients, and `titan` is the current metadata server. The `tethys` host is a potential metadata server.

The archive media consist of a network attached library and tape drives that are fibre-attached to `titan` and `tethys`. In addition, the archive media catalog resides in a file system that is mounted on the current metadata server, `titan`.

Metadata travels to and from the clients to the metadata server over the network. The metadata server makes all modifications to the name space, thereby keeping the metadata consistent. The metadata server also provides the locking capability, the block allocation, and the block deallocation.

Several metadata disks are connected to `titan` and `tethys` and can be accessed only by the potential metadata servers. If `titan` were unavailable, you could change the metadata server to `tethys`, and the library, tape drives, and catalog could be accessed by `tethys` as part of the Sun StorEdge QFS shared file system. The data disks are connected to all four hosts by a Fibre Channel (FC) connection.

To Configure the System

1. Issue the `format`(1M) command and examine its output.

Make sure that the metadata disk partitions configured for the Sun StorEdge QFS shared file system mount point are connected to the potential metadata servers. Also make sure that the data disk partitions configured for the Sun StorEdge QFS shared file system are connected to the potential metadata servers and to all the client hosts in this file system.

If your host supports multipath I/O drivers, individual devices shown in the output of the `format`(1M) command might display multiple controllers. These correspond to the multiple paths to the actual devices.

CODE EXAMPLE D-10 shows the `format`(1M) command output for `titan`. There is one metadata disk on controller 2, and there are three data disks on controller 3.

CODE EXAMPLE D-10 `format` (1M) Command Output on `titan`
    titan<28>format
    Searching for disks...done
    AVAILABLE DISK SELECTIONS:
           0. c1t0d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
              /pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w2100002037e9c296,0
           1. c2t2100002037E2C5DAd0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
              /pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w2100002037e9c296,0
           2. c2t50020F23000065EEd0 <SUN-T300-0116 cyl 34901 alt 2 hd 128 sec 256>
              /pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w50020f23000065ee,0
           3. c3t50020F2300005D22d0 <SUN-T300-0116 cyl 34901 alt 2 hd 128 sec 256>
              /pci@8,600000/SUNW,qlc@1/fp@0,0/ssd@w50020f2300005d22,0
           4. c3t50020F2300006099d0 <SUN-T300-0116 cyl 34901 alt 2 hd 128 sec 256>
              /pci@8,600000/SUNW,qlc@1/fp@0,0/ssd@w50020f2300006099,0
           5. c3t50020F230000651Cd0 <SUN-T300-0116 cyl 34901 alt 2 hd 128 sec 256>
              /pci@8,600000/SUNW,qlc@1/fp@0,0/ssd@w50020f230000651c,0

CODE EXAMPLE D-11 shows the `format`(1M) command output for `tethys`. There is one metadata disk on controller 2, and there are four data disks on controller 7.

CODE EXAMPLE D-11 `format` (1M) Command Output on `tethys`
    tethys<1>format
    Searching for disks...done
    AVAILABLE DISK SELECTIONS:
           0. c0t1d0 <IBM-DNES-318350Y-SA60 cyl 11112 alt 2 hd 10 sec 320>
              /pci@1f,4000/scsi@3/sd@1,0
           1. c2t2100002037E9C296d0 <SUN36G cyl 24620 alt 2 hd 27 sec 107>
              /pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w2100002037e9c296,0
           2. c2t50020F23000065EEd0 <SUN-T300-0116 cyl 34901 alt 2 hd 128 sec 256>
              /pci@1f,4000/SUNW,qlc@4/ssd@w50020f23000065ee,0
           3. c7t50020F2300005D22d0 <SUN-T300-0116 cyl 34901 alt 2 hd 128 sec 256>
              /pci@1f,4000/SUNW,qlc@5/ssd@w50020f2300005d22,0
           4. c7t50020F2300006099d0 <SUN-T300-0116 cyl 34901 alt 2 hd 128 sec 256>
              /pci@1f,4000/SUNW,qlc@5/ssd@w50020f2300006099,0
           5. c7t50020F230000651Cd0 <SUN-T300-0116 cyl 34901 alt 2 hd 128 sec 256>
              /pci@1f,4000/SUNW,qlc@5/ssd@w50020f230000651c,0

Note the following in CODE EXAMPLE D-11:

- The data disks on `titan`'s controller 3 are the same disks as on `tethys`'s controller 7. You can verify this by looking at the World Wide Name, which is the last component in the device name. For `titan`'s number 3 disk, the World Wide Name is `50020f2300005d22`. This is the same name as number 3 on controller 7 on `tethys`.

- For `titan`'s metadata disk, the World Wide Name is `50020F23000065EE`. This is the same metadata disk as `tethys`'s controller 2, target 0.

CODE EXAMPLE D-12 shows the `format`(1M) command output for `mimas`. This shows three data disks on controller 1 and no metadata disks.

CODE EXAMPLE D-12 `format` (1M) Command Output on `mimas`
    mimas<9>format
    Searching for disks...done
    AVAILABLE DISK SELECTIONS:
           0. c0t0d0 <SUN18G cyl 7506 alt 2 hd 19 sec 248>
              /pci@1f,4000/scsi@3/sd@0,0
           1. c1t50020F2300005D22d0 <SUN-T300-0116 cyl 34901 alt 2 hd 128 sec 256>
              /pci@1f,4000/SUNW,qlc@4/fp@0,0/ssd@w50020f2300005d22,0
           2. c1t50020F2300006099d0 <SUN-T300-0116 cyl 34901 alt 2 hd 128 sec 256>
              /pci@1f,4000/SUNW,qlc@4/fp@0,0/ssd@w50020f2300006099,0
           3. c1t50020F230000651Cd0 <SUN-T300-0116 cyl 34901 alt 2 hd 128 sec 256>
              /pci@1f,4000/SUNW,qlc@4/fp@0,0/ssd@w50020f230000651c,0

As shown in CODE EXAMPLE D-11 and CODE EXAMPLE D-12, the data disks on `titan`'s controller 3 are the same disks as those on `mimas`'s controller 1. You can verify this by looking at the World Wide Name, which is the last component in the device name.

Note - All the data disk partitions must be connected and accessible from all the hosts that share this file system. All the disk partitions, for both data and metadata, must be connected and accessible to all potential metadata servers. You can use the `format`(1M) command to verify these connections. For some storage devices, it is possible that the `format`(1M) command's output does not present unique worldwide Names. If you find that this is the case, see the `libdevid`(3LIB) man page for information about finding such devices on different hosts.

2. Use `vi`(1) or another editor to create the `mcf` file on the metadata server.

The only difference between the `mcf` file of a shared Sun StorEdge QFS file system and an unshared Sun StorEdge QFS file system is the presence of the `shared` keyword in the Additional Parameters field of the file system name line for a Sun StorEdge QFS shared file system.

Note - If Sun StorEdge QFS or SAM-QFS file systems are already operational on the Sun StorEdge QFS shared file system's metadata server or on any of the client host systems, select a Family Set name and select equipment ordinals that do not conflict with existing Family Set names or equipment ordinals on any host that will be included in the Sun StorEdge QFS shared file system.

CODE EXAMPLE D-13 shows a fragment of the `mcf` file for `titan` that defines several disks for use in the Sun StorEdge QFS shared file system. It shows the `shared` keyword in the Additional Parameters field on the file system name line.

CODE EXAMPLE D-13 Sun StorEdge QFS Shared File System `mcf` File Example for `titan`
    # Equipment                      Eq   Eq    Family   Dev   Addl
    # Identifier                     Ord  Type  Set      Stat  Params
    ------------                     ---  ----  ------   ----  ------
    sharefs1                         10   ma    sharefs1 on    shared
    /dev/dsk/c2t50020F23000065EEd0s6 11   mm    sharefs1 on
    /dev/dsk/c3t50020F2300005D22d0s6 12   mr    sharefs1 on
    /dev/dsk/c3t50020F2300006099d0s6 13   mr    sharefs1 on
    /dev/dsk/c3t50020F230000651Cd0s6 14   mr    sharefs1 on

##

Configuration Examples for Highly Available File Systems

The Sun Cluster software moves a Sun StorEdge QFS highly available file system from a failing node to a viable node in the event of a node failure.

Each node in the Sun Cluster environment that can host this file system must have an `mcf` file. During the file system configuration process, you copy `mcf` file lines from the metadata server's `mcf` file to other nodes in the Sun Cluster environment. For more information, see Editing mcf Files on Other Hosts.

### To Create an `mcf` File for a Highly Available File System

The procedure for creating an `mcf` file for a Sun StorEdge QFS highly available file system is as follows:

1. Make an `ma` entry for the file system.

2. Make an `mm` entry listing the partitions that constitute the metadata for the `qfs1` file system.

3. Make a series of `mr`, `gXXX`, or `md` entries listing the partitions that constitute the file data for the `qfs1` file system.

You can use the `scdidadm`(1M) command to determine the partitions to use.

Example 1. CODE EXAMPLE D-14 shows an `mcf` file entry for a Sun StorEdge QFS highly available file system that uses raw devices.

CODE EXAMPLE D-14 `mcf` File That Specifies Raw Devices
    #Equipment            Eq   Eq     Family   Additional
    #Identifier           Ord  Type   Set      Parameters
    #-------------------- ---  ----   ------   ----------
    qfs1                   1   ma    qfs1     on
    /dev/global/dsk/d4s0  11   mm    qfs1
    /dev/global/dsk/d5s0  12   mr    qfs1
    /dev/global/dsk/d6s0  13   mr    qfs1
    /dev/global/dsk/d7s0  14   mr    qfs1

Example 2. CODE EXAMPLE D-15 shows an `mcf` file entry for a Sun StorEdge QFS highly available file system that uses Solaris Volume Manager metadevices. In this example, the Solaris Volume Manager metaset in use is named `red`.

CODE EXAMPLE D-15 `mcf` File That Specifies Solaris Volume Manager Devices
    #Equipment            Eq   Eq     Family   Additional
    #Identifier           Ord  Type   Set      Parameters
    #-------------------- ---  ----   ------   ----------
    qfs1                   1   ma    qfs1     on
    /dev/md/red/dsk/d0s0  11   mm    qfs1
    /dev/md/red/dsk/d1s0  12   mr    qfs1

Example 3. CODE EXAMPLE D-16 shows an `mcf` file entry for a Sun StorEdge QFS highly available file system that uses VxVm devices.

CODE EXAMPLE D-16 `mcf` File That Specifies VxVM Devices
    #Equipment            Eq   Eq     Family   Additional
    #Identifier           Ord  Type   Set      Parameters
    #-------------------- ---  ----   ------   ----------
    qfs1                   1   ma    qfs1     on
    /dev/vx/dsk/oradg/m1  11   mm    qfs1
    /dev/vx/dsk/oradg/m2  12   mr    qfs1

##

Configuration Example for a Shared File System on a Sun Cluster Platform

In this example, `ash` and `elm` are nodes in a Sun Cluster environment. Host `ash` is the metadata server. The keyword `shared` in this example's `mcf` file indicates to the system that this is a shared file system. This example builds upon Example: Verifying Devices and Device Redundancy.

### To Create an `mcf` File for a Shared File System in a Sun Cluster Environment

You must create the `mcf` file on the node that you want to designate as the metadata server. The procedure for creating an `mcf` file for a Sun StorEdge QFS shared file system in a Sun Cluster environment is as follows:

1. Use the `scdidadm`(1M) `-L` command to obtain information about the devices included in the Sun Cluster environment.

The `scdidadm`(1M) command administers the device identifier (DID) devices. The `-L` option lists all the DID device paths, including those on all nodes in the Sun Cluster environment.

CODE EXAMPLE D-17 uses Sun StorEdge T3 arrays in a RAID-5 configuration. The output shows that you can use devices 4 through 9 for configuring the disk cache for a shared file system.

CODE EXAMPLE D-17 `scdidadm` (1M) Command Example
    ash# scdidadm -L
    1        ash:/dev/rdsk/c0t6d0        /dev/did/rdsk/d1
    2        ash:/dev/rdsk/c1t1d0        /dev/did/rdsk/d2
    3        ash:/dev/rdsk/c1t0d0        /dev/did/rdsk/d3
    4        elm:/dev/rdsk/c6t50020F2300004921d1 /dev/did/rdsk/d4
    4        ash:/dev/rdsk/c5t50020F2300004921d1 /dev/did/rdsk/d4
    5        elm:/dev/rdsk/c6t50020F2300004921d0 /dev/did/rdsk/d5
    5        ash:/dev/rdsk/c5t50020F2300004921d0 /dev/did/rdsk/d5
    6        elm:/dev/rdsk/c6t50020F23000049CBd1 /dev/did/rdsk/d6
    6        ash:/dev/rdsk/c5t50020F23000049CBd1 /dev/did/rdsk/d6
    7        elm:/dev/rdsk/c6t50020F23000049CBd0 /dev/did/rdsk/d7
    7        ash:/dev/rdsk/c5t50020F23000049CBd0 /dev/did/rdsk/d7
    8        elm:/dev/rdsk/c6t50020F23000055A8d0 /dev/did/rdsk/d8
    8        ash:/dev/rdsk/c5t50020F23000055A8d0 /dev/did/rdsk/d8
    9        elm:/dev/rdsk/c6t50020F23000078F1d0 /dev/did/rdsk/d9
    9        ash:/dev/rdsk/c5t50020F23000078F1d0 /dev/did/rdsk/d9
    10       elm:/dev/rdsk/c0t6d0        /dev/did/rdsk/d10
    11       elm:/dev/rdsk/c1t1d0        /dev/did/rdsk/d11
    12       elm:/dev/rdsk/c1t0d0        /dev/did/rdsk/d12

2. Using the output from the `scdidadm`(1M) `-L` command, use the `format`(1M) command to display the information for the devices in the Sun Cluster environment. CODE EXAMPLE D-18 shows the `format` command output from all the `/dev/did` devices. You will need this information when you build the `mcf` file.

CODE EXAMPLE D-18 `format` (1M) Command Output
    ash# format /dev/did/rdsk/d4s2
    selecting /dev/did/rdsk/d4s2
    Primary label contents:
    Volume name = <        >
    ascii name  = <SUN-T300-0118 cyl 34530 alt 2 hd 64 sec 32>
    pcyl        = 34532
    ncyl        = 34530
    acyl        =    2
    nhead       =   64
    nsect       =   32
    Part      Tag    Flag     Cylinders         Size            Blocks
      0        usr    wm       0 - 17264       16.86GB    (17265/0/0) 35358720
      1        usr    wm   17265 - 34529       16.86GB    (17265/0/0) 35358720
      2     backup    wu       0 - 34529       33.72GB    (34530/0/0) 70717440
      3 unassigned    wu       0                0         (0/0/0)            0
      4 unassigned    wu       0                0         (0/0/0)            0
      5 unassigned    wu       0                0         (0/0/0)            0
      6 unassigned    wu       0                0         (0/0/0)            0
      7 unassigned    wu       0                0         (0/0/0)            0
    ash# format /dev/did/rdsk/d5s2
    selecting /dev/did/rdsk/d5s2
    Volume name = <        >
    ascii name  = <SUN-T300-0118 cyl 34530 alt 2 hd 192 sec 64>
    pcyl        = 34532
    ncyl        = 34530
    acyl        =    2
    nhead       =  192
    nsect       =   64
    Part      Tag    Flag     Cylinders         Size            Blocks
      0        usr    wm       0 - 17264      101.16GB    (17265/0/0) 212152320
      1        usr    wm   17265 - 34529      101.16GB    (17265/0/0) 212152320
      2     backup    wu       0 - 34529      202.32GB    (34530/0/0) 424304640
      3 unassigned    wu       0                0         (0/0/0)             0
      4 unassigned    wu       0                0         (0/0/0)             0
      5 unassigned    wu       0                0         (0/0/0)             0
      6 unassigned    wu       0                0         (0/0/0)             0
      7 unassigned    wu       0                0         (0/0/0)             0
    ash# format /dev/did/rdsk/d6s2
    selecting /dev/did/rdsk/d6s2
    Volume name = <        >
    ascii name  = <SUN-T300-0118 cyl 34530 alt 2 hd 64 sec 32>
    pcyl        = 34532
    ncyl        = 34530
    acyl        =    2
    nhead       =   64
    nsect       =   32
    Part      Tag    Flag     Cylinders         Size            Blocks
      0        usr    wm       0 - 17264       16.86GB    (17265/0/0) 35358720
      1        usr    wm   17265 - 34529       16.86GB    (17265/0/0) 35358720
      2     backup    wu       0 - 34529       33.72GB    (34530/0/0) 70717440
      3 unassigned    wu       0                0         (0/0/0)            0
      4 unassigned    wu       0                0         (0/0/0)            0
      5 unassigned    wu       0                0         (0/0/0)            0
      6 unassigned    wu       0                0         (0/0/0)            0
      7 unassigned    wu       0                0         (0/0/0)            0
    ash# format /dev/did/rdsk/d7s2
    selecting /dev/did/rdsk/d7s2
    Volume name = <        >
    ascii name  = <SUN-T300-0118 cyl 34530 alt 2 hd 192 sec 64>
    pcyl        = 34532
    ncyl        = 34530
    acyl        =    2
    nhead       =  192
    nsect       =   64
    Part      Tag    Flag     Cylinders         Size            Blocks
      0        usr    wm       0 - 17264      101.16GB    (17265/0/0) 212152320
      1        usr    wm   17265 - 34529      101.16GB    (17265/0/0) 212152320
      2     backup    wu       0 - 34529      202.32GB    (34530/0/0) 424304640
      3 unassigned    wu       0                0         (0/0/0)             0
      4 unassigned    wu       0                0         (0/0/0)             0
      5 unassigned    wu       0                0         (0/0/0)             0
      6 unassigned    wu       0                0         (0/0/0)             0
      7 unassigned    wu       0                0         (0/0/0)             0
    ash# format /dev/did/rdsk/d8s2
    selecting /dev/did/rdsk/d8s2
    Volume name = <        >
    ascii name  = <SUN-T300-0118 cyl 34530 alt 2 hd 128 sec 128>
    pcyl        = 34532
    ncyl        = 34530
    acyl        =    2
    nhead       =  128
    nsect       =  128
    Part      Tag    Flag     Cylinders         Size            Blocks
      0        usr    wm       0 - 17264      134.88GB    (17265/0/0) 282869760
      1        usr    wm   17265 - 34529      134.88GB    (17265/0/0) 282869760
      2     backup    wm       0 - 34529      269.77GB    (34530/0/0) 565739520
      3 unassigned    wu       0                0         (0/0/0)             0
      4 unassigned    wu       0                0         (0/0/0)             0
      5 unassigned    wu       0                0         (0/0/0)             0
      6 unassigned    wu       0                0         (0/0/0)             0
      7 unassigned    wu       0                0         (0/0/0)             0
    ash# format /dev/did/rdsk/d9s2
    selecting /dev/did/rdsk/d9s2
    Volume name = <        >
    ascii name  = <SUN-T300-0118 cyl 34530 alt 2 hd 128 sec 128>
    pcyl        = 34532
    ncyl        = 34530
    acyl        =    2
    nhead       =  128
    nsect       =  128
    Part      Tag    Flag     Cylinders         Size            Blocks
      0        usr    wm       0 - 17264      134.88GB    (17265/0/0) 282869760
      1        usr    wm   17265 - 34529      134.88GB    (17265/0/0) 282869760
      2     backup    wu       0 - 34529      269.77GB    (34530/0/0) 565739520
      3 unassigned    wu       0                0         (0/0/0)             0
      4 unassigned    wu       0                0         (0/0/0)             0
      5 unassigned    wu       0                0         (0/0/0)             0
      6 unassigned    wu       0                0         (0/0/0)             0
      7 unassigned    wu       0                0         (0/0/0)             0

The `format`(1M) command reveals the space available on a device, but it does not reveal whether a disk is mirrored or striped. CODE EXAMPLE D-18's `format`(1M) output reveals the following information that is used during creation of the `mcf` file shown in CODE EXAMPLE D-19:

- Output for devices `d4s0` and `d6s0` shows 16.86 Gbytes each. These devices are assigned equipment ordinal `501` and Equipment Ordinal `502`, respectively, in the `mcf` file. They are the appropriate size to use for metadata slices.

- Output for devices `d8s0` and `d9s0` shows 134.88 Gbytes each. These devices are assigned equipment ordinal `503` and Equipment Ordinal `504`, respectively, in the `mcf` file. They are the are the appropriate size to be used for storing data.

3. Make an `ma` entry for the file system.

In this line entry, include the `shared` keyword in the Additional Parameters field.

4. Make an `mm` entry listing the partitions that constitute the metadata for the `qfs1` file system.

Put the file system's `mm` devices on mirrored (RAID-1) disks. The `mm` devices should constitute about 10% of the space allocated for the entire file system.

5. Make a series of `mr` entries listing the partitions that constitute the file data for the `qfs1` file system.

CODE EXAMPLE D-19 shows the resulting `mcf` file.

CODE EXAMPLE D-19 `mcf` File on Metadata Server `ash`
    #Equipment            Eq   Eq     Family   Additional
    #Identifier           Ord  Type   Set      Parameters
    #-------------------- ---  ----   ------   ----------
    #
    # Family Set sqfs1 (shared FS for SunCluster)
    #
    sqfs1                500   ma    sqfs1    shared
    /dev/did/dsk/d4s0    501   mm    sqfs1    -
    /dev/did/dsk/d6s0    502   mm    sqfs1    -
    /dev/did/dsk/d8s0    503   mr    sqfs1    -
    /dev/did/dsk/d9s0    504   mr    sqfs1    -

Copyright © 2006, Sun Microsystems, Inc. All Rights Reserved.