A P P E N D I X D

`mcf` File Examples

This appendix contains some specific examples of `mcf` files for complex Sun StorEdge SAM-FS environments.

This appendix contains the following sections:

- Example Sun StorEdge SAM-FS Configuration

- Configuring a Manually Loaded Magneto-optical Drive

- Configuring a Magneto-optical Library

- Configuring a Manually Loaded DLT Drive

- Configuring a DLT Library

- Example mcf File Entries for Network Attached Libraries

##

Example Sun StorEdge SAM-FS Configuration

For the examples in this appendix, assume that the following equipment is to be included in the Sun StorEdge SAM-FS configuration:

- Two Seagate ST15230W 4-gigabyte disk drives used as cache for the file system

- One StorageTek 9730 30-slot automated library that contains two DLT tape drives

- One manually loaded DLT 2000 drive

- One HP Model C1710T magneto-optical automated library containing two HP Model C1716 magneto-optical drives

- One manually loaded HP Model C1716 magneto-optical drive

This equipment is connected to three SCSI buses with the following SCSI targets:

- The server's internal, single-ended, SCSI bus with the target IDs shown in TABLE D-1.

TABLE D-1 Target IDs for the Server's Internal Single-Ended SCSI Bus
Target ID | Equipment
--- | ---
2 | Manually loaded magneto-optical drive
3 | The Sun Solaris internal hard disk
4 | Manually loaded DLT drive

- A differential SCSI bus connected to the HP Model C1710T automated library and file system disks with target IDs shown in TABLE D-2.

TABLE D-2 Target IDs for the SCSI Bus Connected to the HP Model C1710T Automated Library
Target ID | Equipment
--- | ---
0 and 1 | Seagate 4-gigabyte disks
2 | HP C1710T automated library
5 | First optical drive
6 | Second optical drive

- A differential SCSI bus connected to the StorageTek 9730 automated library and tape drives with target IDs shown in TABLE D-3.

TABLE D-3 Target IDs for the SCSI Bus Connected to the StorageTek 9730 Automated Library
Target ID | Equipment
--- | ---
0 | StorageTek 9730 automated library
1 | First DLT 7000 drive
2 | Second DLT 7000 drive

### Example Sun StorEdge SAM-FS Disk Cache Configuration

CODE EXAMPLE D-1 shows the output from the Sun Solaris `format`(1M) command. It reports how the disks are partitioned.

CODE EXAMPLE D-1 `format` (1M) Command Example
    1. c1t0d0 <SEAGATE-ST15230W-0168 cyl 3974 alt 2 hd 19 sec 111>
    /iommu@0,10000000/sbus@0,10001000/QLGC,isp@1,10000/sd@0,0
    Current partition table (original) :
    Total disk cylinders available: 3974 + 2 (reserved cylinders)
    Part    Tag          Flag     Cylinders    Size        Blocks
    0       root         wm       0-3499       3.52GB      (3500/0/0)
    1       unassigned   wm       3500-3972    487.09MB    (473/0/0)
    2       backup       wu       0-3973       4.00GB      (3974/0/0)
    3       unassigned   wm       0            0           (0/0/0)
    4       unassigned   wm       0            0           (0/0/0)
    5       unassigned   wm       0            0           (0/0/0)
    6       unassigned   wm       0            0           (0/0/0)
    7       unassigned   wm       0            0           (0/0/0)
    2. c1t1d0 <SEAGATE-ST15230W-0168 cyl 3974 alt 2 hd 19 sec 111>
     /iommu@0,10000000/sbus@0,10001000/QLGC,isp@1,10000/sd@1,0
    Current partition table (original):
    Total disk cylinders available: 3974 + 2 (reserved cylinders)
    Part    Tag          Flag     Cylinders    Size        Blocks
    0       root         wm       1000-3973    2.99GB      (2974/0/0)
    1       unassigned   wu       0            0           (0/0/0)
    2       backup       wu       0-3973       4.00GB      (3974/0/0)
    3       unassigned   wm       0            0           (0/0/0)
    4       unassigned   wm       0            0           (0/0/0)
    5       unassigned   wm       0-999        1.01GB      (1000/0/0)
    6       unassigned   wm       0            0           (0/0/0)
    7       unassigned   wm       0            0           (0/0/0)

This example creates one Sun StorEdge SAM-FS file system (samfs1) on partition 0 of disk c1t0d0 and partition 5 of c1t1d0. It creates another file system (samfs2) on partition 1 of disk c1t0d0 and partition 0 of disk c1t1d0.

The following procedure explains how to begin writing the mcf file for this example configuration by defining the file systems and their disk partitions.

### To Write the `mcf` File

Follow these steps first for the `samfs1` file system and then for the `samfs2` file system.

1. Make an `ms` (mass storage) entry for the file system.

The `ms` entry is the Equipment Identifier for a Sun StorEdge SAM-FS file system.

You will use the name of the file system later when writing the `/etc/vfstab` entry for the file system and creating the file system.

Note - The name as specified in the Equipment Identifier field must be the same as the Family Set name for the file system.

2. Make a series of `md` (magnetic disk) entries listing the partitions for the file system member devices.

CODE EXAMPLE D-2 shows the `mcf` with the file systems defined.

CODE EXAMPLE D-2 Sun StorEdge SAM-FS `mcf` File Showing the File Systems
    # Disk cache configuration for 2 file systems: samfs1, samfs2
    #
    # Equipment       Eq    Eq   Fam.  Dev.    Additional
    # Identifier      Ord  Type  Set   State   Parameters
    #-----------      ---   --  ------ ------  ------------------
    samfs1             10   ms  samfs1
    /dev/dsk/c1t0d0s0  11   md  samfs1   on
    /dev/dsk/c1t1d0s5  12   md  samfs1   on
    #
    samfs2             20   ms  samfs2
    /dev/dsk/c1t1d0s0  21   md  samfs2   on
    /dev/dsk/c1t0d0s1  22   md  samfs2   on

| Caution - Be sure to specify disk partitions that are not in use on your system. Do not use overlapping partitions. If you give the wrong partition names when initializing any type of file system, you risk damaging user or system data.

##

Configuring a Manually Loaded Magneto-optical Drive

The HP Model C1716T is target ID 2 on the internal SCSI bus.

### To Configure the Drive

1. Examine the `/var/adm/messages` file to find the messages for these devices.

CODE EXAMPLE D-3 shows the information in `/var/adm/messages` associated with the HP Model C1716T and target 2. Note that the third line wraps to the next line.

CODE EXAMPLE D-3 Information in `/var/adm/messages`
    Aug 23 11:52:54 baggins unix: samst2: Vendor/Product ID = HP    C1716T
    Aug 23 11:52:54 baggins unix: samst2 at esp0: target 2 lun 0
    Aug 23 11:52:54 baggins unix: samst2 is /iommu@0,10000000/sbus@0,10001000/espdma@5,8400000/esp@5,8800000/samst@2,0

2. Issue the `cd`(1) command to change to the `/dev/samst` directory.

3. Use the `ls`(1) and `grep`(1) commands to find the correct symbolic link:

    # ls -l | grep "samst@2"

The `ls`(1) command searches for a symbolic link that points to the hardware path shown in CODE EXAMPLE D-4.

CODE EXAMPLE D-4 Path to `samst@2`
    lrwxrwxrwx   1 root     other         88 Aug 23 12:27 c0t2u0 -> /devices/iommu@0,10000000/sbus@0,10001000/espdma@5,8400000/esp@5,8800000/samst@2,0:a,raw

The Sun samst driver uses the name `/dev/samst/c0t2u0` when referencing the device.

4. Open the `/etc/opt/SUNWsamfs/mcf` file, and add the following entry for the drive:

    /dev/samst/c0t2u0  30  od  -  on

This entry contains the device name (`/dev/samst/c0t2u0`), a unique Equipment Ordinal (30), the Equipment Type of the drive (`od`), a dash (`-`) to indicate that a Family Set name is not associated with the drive, and the device state (`on`).

##

Configuring a Magneto-optical Library

The HP C1710T automated library has three SCSI devices: the robotic mechanism and the two magneto-optical drives that the automated library loads and unloads.

### To Configure the Magneto-optical Library

1. Examine the `/var/adm/messages` file to find the messages for these devices.

CODE EXAMPLE D-5 shows these messages.

CODE EXAMPLE D-5 `/var/adm/messages` for the HP Library and two Drives
    Aug 23 11:52:56 baggins unix: samst16: Vendor/Product ID = HP      C1710T
    Aug 23 11:52:56 baggins unix: samst16 at QLGC,isp0: target 2 lun 0
    Aug 23 11:52:56 baggins unix: samst16 is /iommu@0,10000000/sbus@0,10001000/QLGC,isp@1,10000/samst@2,0
    Aug 23 11:52:56 baggins unix: samst19: Vendor/Product ID = HP      C1716T
    Aug 23 11:52:56 baggins unix: samst19 at QLGC,isp0: target 5 lun 0
    Aug 23 11:52:56 baggins unix: samst19 is /iommu@0,10000000/sbus@0,10001000/QLGC,isp@1,10000/samst@5,0
    Aug 23 11:52:56 baggins unix: samst20: Vendor/Product ID = HP      C1716T
    Aug 23 11:52:56 baggins unix: samst20 at QLGC,isp0: target 6 lun 0
    Aug 23 11:52:56 baggins unix: samst20 is /iommu@0,10000000/sbus@0,10001000/QLGC,isp@1,10000/samst@6,0

2. Issue the `cd`(1) command to change to the `/dev/samst` directory.

3. Use `ls`(1) and `grep`(1) commands to find the symbolic links for the devices.

CODE EXAMPLE D-6 shows the `ls`(1) commands to use to search for the three symbolic links that point to the `/devices` files with the same Sun Solaris hardware paths shown in CODE EXAMPLE D-5.

CODE EXAMPLE D-6 `ls` (1) and `grep` (1) Commands Used to Find Symbolic Links for the Devices in CODE EXAMPLE D-5
    # ls -l | grep "samst@2"
    lrwxrwxrwx   1 root     other         74 Aug 23 12:27 c1t2u0 -> /devices/iommu@0,10000000/sbus@0,10001000/QLGC,isp@1,10000/samst@2,0:a,raw
    # ls -l | grep "samst@5"
    lrwxrwxrwx   1 root     other         74 Aug 23 12:27 c1t5u0 -> /devices/iommu@0,10000000/sbus@0,10001000/QLGC,isp@1,10000/samst@5,0:a,raw
    # ls -l | grep "samst@6"
    lrwxrwxrwx   1 root     other         74 Aug 23 12:27 c1t6u0 -> /devices/iommu@0,10000000/sbus@0,10001000/QLGC,isp@1,10000/samst@6,0:a,raw

4. Open the `/etc/opt/SUNWsamfs/mcf` file, and add the following entries for the library and drives:

    /dev/samst/c1t2u0  50  rb  hp30  on
    /dev/samst/c1t5u0  51  od  hp30  on
    /dev/samst/c1t6u0  52  od  hp30  on

The first line defines the automated library itself. It contains the `/dev/samst` name for the device `(/dev/samst/c1t2u0)` followed by a unique Equipment Ordinal (`50`), the Equipment Identifier (`rb`, for a generic SCSI-attached library), the Family Set identifier specified on all devices associated with this library (`hp30`), and the device state (`on`).

The two remaining lines define the drives inside the library. They are similar to the manually loaded drives defined in the previous section except that instead of a dash, they include the Family Set name of the library where they reside (`hp30`).

| Caution - The order of drives as specified in the `mcf`file must match the logical order of the drives in a SCSI-attached automated library. For more information, see Checking the Drive Order, or refer to your hardware documentation. Incorrect configuration can cause cartridges to be mounted in the wrong drives, which will lead to total inoperability of this software.

##

Configuring a Manually Loaded DLT Drive

When configuring DLT drives, be sure to add the DLT definitions to the`/kernel/drv/st.conf` file. DLT drives are not part of the standard Sun Solaris configuration, and the software does not recognize them if they are configured incorrectly. For more information, see Configuring Storage Devices.

### To Configure the DLT Drive

1. Examine the `/var/adm/messages` file to find the messages for these devices.

CODE EXAMPLE D-7 shows the `/var/adm/messages` file lines that refer to the manual DLT drive.

CODE EXAMPLE D-7 Information in `/var/adm/messages`
    Feb 25 13:23:29 collie scsi: [ID 365881 kern.info] /pci@1f,4000/scsi@5,1/st@0,0 (st21):
    Feb 25 13:23:29 collie       <Vendor 'DEC     ' Product 'DLT2000        '>
    Feb 25 13:23:29 collie scsi: [ID 193665 kern.info] st21 at glm3: target 0 lun 0
    Feb 25 13:23:29 collie genunix: [ID 936769 kern.info] st21 is /pci@1f,4000/scsi@5,1/st@0,0

2. Use the `ls`(1) and `grep`(1) commands to search for the symbolic links that point to the `/devices` files with the same Sun Solaris hardware paths shown in the `/var/adm/messages` file.

The following `ls`(1) and `grep`(1) commands are used to locate the DLT drive identified as `scsi@5`.

    # ls -l /dev/rmt|grep 'pci@1f,4000/scsi@5,1/st@0'|grep cbn
    lrwxrwxrwx   1 root     other         45 Feb 14 09:48 0cbn -> ../../devices/pci@1f,4000/scsi@5,1/st@0,0:cbn

When making the `mcf` entry, always use the `b` and `n` options. CODE EXAMPLE D-8 shows the symbolic link for a drive that supports compression. If the drive supports compression and you want compression in the hardware, use `cbn` as the prefix.

CODE EXAMPLE D-8 Symbolic Link Showing a Drive That Supports Compression
    lrwxrwxrwx   1 root     other         85 Aug 15 11:37 /dev/rmt/0cbn -> ../../devices/iommu@0,10000000/sbus@0,10001000/espdma@5,8400000/esp@5,8800000 st@4,0:cbn

3. Open the `/etc/opt/SUNWsamfs/mcf` file, and add the following entry for the device:

    /dev/rmt/0cbn  40  tp  -  on

This entry contains the `st` driver name for the device (`/dev/rmt/0cbn`), a unique Equipment Ordinal (`40`), the Equipment Type (`tp` for a generic tape), a dash (`-`) to indicate that a Family Set name is not associated with the manually mounted device, and the device state (`on`).

##

Configuring a DLT Library

The last piece of equipment to define is the STK 9730 automated library. This automated library has three SCSI devices: the robotic mechanism and the two DLT 7000 tape drives that the robot loads and unloads.

### To Configure the DLT Library

1. Examine the `/var/adm/messages` to find the messages for these devices.

CODE EXAMPLE D-9 shows the `/var/adm/messages` file.

CODE EXAMPLE D-9 Information in `/var/adm/messages`
    Feb  4 09:42:17 server1 samst: [ID 902828 kern.notice] samst42:     Vendor/Product ID = STK     9730
    Feb  4 09:42:17 server1 scsi: [ID 193665 kern.info] samst42 at glm3: target 0 lun 0
    Feb  4 09:42:17 server1 genunix: [ID 936769 kern.info] samst42 is /pci@6,4000/scsi@2,1/samst@0,0
    Feb  4 13:20:21 server1 scsi: [ID 365881 kern.info] /pci@6,4000/scsi@2,1/st@1,0 (st22):
    Feb  4 13:20:21 server1     <DLT 7000 tape drive>
    Feb  4 13:20:21 server1 scsi: [ID 193665 kern.info] st22 at glm3: target 1 lun 0
    Feb  4 13:20:21 server1 genunix: [ID 936769 kern.info] st22 is /pci@6,4000/scsi@2,1/st@1,0
    Feb  4 13:20:21 server1 scsi: [ID 365881 kern.info] /pci@6,4000/scsi@2,1/st@2,0 (st23):
    Feb  4 13:20:21 server1     <DLT 7000 tape drive>
    Feb  4 13:20:21 server1 scsi: [ID 193665 kern.info] st23 at glm3: target 2 lun 0
    Feb  4 13:20:21 server1 genunix: [ID 936769 kern.info] st23 is /pci@6,4000/scsi@2,1/st@2,0

2. Issue the `cd`(1) command to change to the `/dev/samst` directory.

3. Use the `ls`(1) and `grep`(1) commands to find the symbolic links that point to the `/devices` files with the same Sun Solaris hardware paths shown in the `/var/adm/messages` file:

    # cd /dev/samst
    # ls -l | grep "samst@0"
    lrwxrwxrwx   1 root     other         49 Feb  4 09:42 c6t0u0 -> ../../devices/pci@6,4000/scsi@2,1/samst@0,0:a,raw

4. Use the `ls`(1) and `grep`(1) commands to find a symbolic link in `/dev/rmt` that points to the tape devices:

    # cd /dev/rmt
    # ls -l | grep cbn
    lrwxrwxrwx   1 root     root          44 Feb  3 15:38 0cbn -> ../../devices/pci@6,4000/scsi@2,1/st@1,0:cbn
    lrwxrwxrwx   1 root     root          44 Feb  3 15:38 1cbn -> ../../devices/pci@6,4000/scsi@2,1/st@2,0:cbn

There are multiple symbolic links in the directory that point to the same hardware path. To enable hardware compression, choose the one with the `cbn` suffix. If your drive does not support hardware compression, choose the link that ends with `bn`.

5. Open the `/etc/opt/SUNWsamfs/mcf` file, and add entries for this library and its drives:

    /dev/samst/c2t0u0  60  rb  9730  on
    /dev/rmt/0cbn      61  tp  9730  on
    /dev/rmt/1cbn      62  tp  9730  on

The first line defines the automated library. It includes the `/dev/samst` name (`/dev/samst/c2t0u0`), a unique Equipment Ordinal (`60`), the Equipment Type (`rb`, for the generic robot Equipment Type), a Family Set name for the robot and the drive (`9730`), and the device state (`on`).

The second line defines the first DLT tape drive inside the library. It contains the Equipment Identifier for this tape device (`/dev/rmt/0cbn`), the Equipment Ordinal for the device (`61`), the Equipment Type (`tp`), the Family Set name (`9730`), and the device state (`on`).

The third line defines the second DLT tape drive inside the automated library.

6. If you are configuring DLT drives, add the DLT definitions to the`/kernel/drv/st.conf` file.

Configuring Storage Devices describes how to add definitions to the `/kernel/drv/st.conf` file. DLT drives are not part of the standard Sun Solaris configuration.

CODE EXAMPLE D-10 shows the completed `mcf` file.

CODE EXAMPLE D-10 Completed `mcf` File
    # Equipment         Eq   Eq    Family  Dev   Additional
    # Identifier        Ord  Type  Set     Sta   Parameters
    #
    samfs1              10   ms    samfs1
    /dev/dsk/c1t0d0s0   11   md    samfs1  on
    /dev/dsk/c1t1d0s5   12   md    samfs1  on
    #
    samfs2              20   ms    samfs2
    /dev/dsk/c1t1d0s0   21   md    samfs2  on
    /dev/dsk/c1t0d0s1   22   md    samfs2  on
    #
    /dev/samst/c0t2u0   30   od    -       on
    #
    /dev/rmt/0cbn       40   tp    -       on
    #
    /dev/samst/c1t2u0   50   rb    hp30    on
    /dev/samst/c1t5u0   51   od    hp30    on
    /dev/samst/c1t6u0   52   od    hp30    on
    #
    /dev/samst/c2t0u0   60   rb    9730    on
    /dev/rmt/0cbn       61   tp    9730    on
    /dev/rmt/1cbn       62   tp    9730    on

##

Example `mcf` File Entries for Network Attached Libraries

The following examples show `mcf` file entries for network attached devices. In these examples, the first line of each library definition is the full path to the parameters file for that library.

You create the parameters files for network attached libraries as described in Creating Parameters Files for Network Attached Automated Libraries.

Example 1. CODE EXAMPLE D-11 shows the `mcf` file for an ADIC/Grau network attached automated library.

CODE EXAMPLE D-11 ADIC/Grau Automated Library `mcf` File Entries
    #
    # Sample mcf file entries for a GRAU library - DLT
    #
    /etc/opt/SUNWsamfs/grau50  50   gr   gr50  -
    /dev/rmt/0cbn              51   lt   gr50  -
    /dev/rmt/1cbn              52   lt   gr50  -
    #
    # Sample mcf file entries for a GRAU library - HP optical
    #
    /etc/opt/SUNWsamfs/grau60   60   gr  gr60  -
    /dev/samst/c1t1u0           61   od  gr60  -

Example 2. CODE EXAMPLE D-12 shows the `mcf` file for a Fujitsu LMF network attached automated library.

CODE EXAMPLE D-12 Fujitsu LMF Automated Library `mcf` File Entries
    #
    # Sample mcf file entries for an LMF library
    #
    /etc/opt/SUNWsamfs/lmf50 50  fj  fj50  -
    /dev/rmt/0cbn            51  fd  fj50  -
    /dev/rmt/1cbn            52  fd  fj50  -

Example 3. CODE EXAMPLE D-13 shows the `mcf` file for an IBM 3494 network attached automated library.

CODE EXAMPLE D-13 IBM 3494 Automated Library `mcf` File Entries
    # The mcf file entries.
    #
    # IBM 3494 library
    #
    /etc/opt/SUNWsamfs/ibm50 50      im      ibm3494e - ibmcat
    /dev/rmt/1bn             51      tp      ibm3494e
    /dev/rmt/2bn             52      tp      ibm3494e

Example 4. CODE EXAMPLE D-14 shows the `mcf` file for a Sony network attached automated library.

CODE EXAMPLE D-14 Sony Network Attached Automated Library mcf File Entries
    #
    # Sample mcf file entries for a Sony network attached library
    #
    /etc/opt/SUNWsamfs/sonyfile 100   pe   psc  on
    /dev/rmt/1cbn               101   so   psc  on
    /dev/rmt/2cbn               102   so   psc  on

Example 5. CODE EXAMPLE D-15 shows the `mcf` file for a StorageTek ACSLS-attached automated library.

CODE EXAMPLE D-15 StorageTek Automated Library `mcf` File Entries
    # Equipment              Eq   Eq  Family  Dev  Additional
    # Identifier             Ord  Ty  Set     St   Parameters
    #
    /etc/opt/SUNWsamfs/stk50 50   sk  sk50    on
    /dev/rmt/0cbn            51   sg  sk50    on
    /dev/rmt/1cbn            52   sg  sk50    on

For more information, see the `mcf`(4) man page. There are example `mcf` files located in `/opt/SUNWsamfs/examples/mcf`.

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