Library Table of Contents Index Previous Next Comments

Assigning tape aliases

Why to assign tape aliases  Top

When you use more than one tape drive (or tape stacker or medium changer) on a filer, Data ONTAP assigns the addresses on a first-come, first-served basis when the software is installed. However, if a filer shares tape drives, or if tape drives are moved around, the software-assigned addresses do not move with the physical devices. After reboot, these addresses are not necessarily reassigned in the same order.

If you use large or multi-filer configurations, or if your filers share backup tape devices, the filers may assign different names to the same tape drives. Tape aliasing enables you to make sure that the same name is always associated with the same tape drive.

What tape aliasing does  Top

Tape aliasing provides a correspondence between the logical names of backup devices (for example, st0 or mc1) and a name permanently assigned to a port or to a tape drive or medium changer.

Note
st0 and st00 are considered different logical names.

You can use tape aliases as arguments to the dump, restore, and snapmirror store commands.

Note
Logical and worldwide names are used only to access a device. Once accessed, the device returns all error messages using the physical path name.

Names available for aliasing  Top

The two kinds of names available for aliasing are physical path names (PPNs) and worldwide names (WWNs).

What physical path names are  Top

Physical path names (PPNs) are the numerical address sequences that Data ONTAP assigns to tape drives and tape libraries based on which SCSI-2/3 adapter or switch (specific location) they are connected to on the filer. PPNs are also known as electrical names.

Format of the PPN  Top

Direct-attached devices

PPNs of direct-attached devices use the following format:

host_adapter.device_id_lun

For example, the PPN 8.6 indicates that the host adapter number is 8, the device ID is 6, and the logical unit number (LUN) is 0.

Note
On disk drives, the LUN is always 0 and is therefore never shown. On tape drives and medium changers, the LUN is also not shown if it is 0.

Switch-attached devices

PPNs of switch-attached devices use the following format:

switch:port_id.device_id_lun

For example, the PPN MY_SWITCH:5.3L2 indicates that the tape drive that is connected to port 5 of a switch called MY_SWITCH is set with SCSI ID 3 and has the LUN 2.

The LUN is determined by the drive itself. Both Fibre Channel and SCSI tape drives and libraries, as well as disks, have PPNs.

Examples using PPNs  Top

In the following example, the dump command is using the tape device name of a tape drive:

dump 0f /dev/nrst0a /vol/vol0 

In the following example, the same dump command is using the PPN of the tape drive:

dump 0f /dev/nr.MY_SWITCH:5.6.a /vol/vol0

PPNs of tape drives and libraries do not change unless the name of the switch changes, the tape drive or library moves, or the tape drive or library is reconfigured. PPNs remain unchanged after reboot.

For example, if a tape drive named MY_SWITCH:5.3L2 is removed and a new tape drive with the same SCSI ID and LUN is connected to port 5 of switch MY_SWITCH, the new tape drive would be accessible via the name MY_SWITCH:5.3L2.

What worldwide names are  Top

Tape drives and libraries are assigned worldwide names (WWNs) at the time of manufacture. WWNs are similar to the media access control (MAC) addresses on Ethernet cards. All Fibre Channel devices have WWNs, but SCSI-attached devices do not have WWNs and cannot be accessed by them.

Accessing a tape drive or library via the WWN allows multiple filers to track the same device. Depending on whether a tape drive is connected to a Fibre Channel switch or hub or is directly attached to a Fibre Channel adapter, different filers may have different PPNs for the same device. Using the WWN in these cases eliminates any confusion.

Also, if a switch is renamed or a tape drive is moved on the filer, the WWN of the tape drive or library does not change, and scripts or backup programs do not need to change the name of the tape drive or library to which they are backing up.

Format of the WWN  Top

The WWN of a tape device uses the following format:

WWN[#:###:######:######]L##

# is a hexadecimal character and L is the LUN of the device. If the LUN is 0, it is not shown.

Each WWN consists of eight bytes, and the format for the WWN is not case-sensitive.

Examples using WWNs  Top

In the following example, the dump command uses the logical name of a tape drive:

dump 0f /dev/nrst0a /vol/vol0 

In the following example, the same dump command uses the worldwide name of the tape drive:

dump 0f /dev/nr.WWN[2:000:00e08b:01523e].a /vol/vol0

Displaying existing aliases  Top

To display existing aliases, complete the following step:

Step

Action

1

Enter the following command:

storage alias
Result

A display like the following appears:

Alias               Mapping
----------------------------------------
st0                 MY_SWITCH:5.3L3
st2                 MY_SWITCH:5.4L6
mc1                 2:4e3:38fe3f:758eab
mc348               MY_SWITCH:5.3L0

In this example, the display shows that there are two tape drives and two medium changers attached to the filer. Tape drives st0 and st2 and medium changer mc348 are attached to port 5 of the switch MY_SWITCH. Medium changer mc1 has the worldwide name 2:4e3:38fe3f:758eab.

Displaying information about tape drives or libraries  Top

To display information about tape drives and tape libraries (medium changers) to help you assign tape aliases, complete the following step.

Step

Action

1

Enter the following command:

storage show {tape | me} [{alias | PPN | WWN}]

alias is the logical name of the tape drive or medium changer.

PPN is the physical path name.

WWN is the worldwide name.

Examples

 
storage show tape
     Tape Drive:        MY_SWITCH:5.3L4
     Description:       Quantum DLT7000
     Serial Number:     12345679
     World Wide Name:   WWN[2:333:444444:555555]L4
     Alias Name(s):     st0  st1  st2  st3
     Tape Drive:        MY_SWITCH:5.3L5
     Description:       Quantum DLT7000
     Serial Number:     12345678
     World Wide Name:   WWN[2:777:888888:999999]L5
     Alias Name(s):     st10  st11  st12  st13
storage show tape st0
     Tape Drive:        MY_SWITCH:5.3L4
     Description:       Quantum DLT7000
     Serial Number:     12345679
     World Wide Name:   WWN[2:333:444444:555555]L4
     Alias Name(s):     st0  st1  st2  st3
storage show tape MY_SWITCH:5.3L4
     Tape Drive:        MY_SWITCH:5.3L4
     Description:       Quantum DLT7000
     Serial Number:     12345679
     World Wide Name:   WWN[2:333:444444:555555]L4
     Alias Name(s):     st0  st1  st2  st3

Assigning tape aliases  Top

To assign an alias to a tape drive or medium changer, complete the following step.

Step

Action

1

Enter the following command:

storage alias [alias {PPN | WWN}]

alias is the logical name of the tape drive or medium changer to which you want to add the alias.

PPN is the physical path name to which you want to assign the tape drive or medium changer.

WWN is the worldwide name to which you want to assign the tape drive or medium changer.

Example
storage alias st0 MY_SWITCH:5.3L3
           storage alias mc80 WWN[2:4e3:38fe3f:758eab]
Result

The tape device st0 is assigned the PPN MY_SWITCH:5.3L3. The medium changer mc80 is assigned the WWN WWN[2:4e3:38fe3f:758eab].

Removing tape aliases  Top

To remove an alias from a tape drive or medium changer, complete the following step.

Step

Action

1

Enter the following command:

storage unalias {alias | -a | -m | -t}

alias is the logical name of the tape drive or medium changer from which you want to remove the alias.

-a removes all aliases.

-m removes the aliases from all medium changers.

-t removes the aliases from all tape drives.

Example
storage unalias st0
           storage unalias mc80
Result

The aliases are removed from the tape device st0 and from the medium changer mc80.

Propagating tape aliases to multiple filers  Top

If you need to use the same set of tape drives to back up more than one filer, you can save the tape alias information in a file.

To propagate tape aliases to multiple filers, complete the following steps.

Step

Action

1

Create a file named tape_alias containing the tape alias information.

Example

storage unalias -a
storage alias st0 8.6
storage alias st1 8.7
storage alias mc0 8.1
2

Copy the file to the root volume of each filer.

3

Execute the following command on each filer:

source /vol/root_volume_name/tape_alias

root_volume_name specifies the root volume.

Result

The filers all contain the same configuration information.

To ensure that multiple filers assign the same alias to a tape drive or medium changer, you can type the same set of storage alias commands on each filer.

Alternatively, UNIX users can use a shell script like the following to propagate the source script information to the filers.

#!/bin/sh
# Check for the source file
if [ "$#" != "1" ]
then
echo "Usage: $0 <source_file>"
exit 1
fi
if [ ! -r $1 ]
then
echo "Cannot open source file \"$1\""
exit 1
fi
while [ 1 ] 
do
     echo Hit ctrl-c to terminate program when all filers have been 
entered.
	 # Gather up filer and passwd from user
printf "File Server: "
read FILER
printf "Password: "
read PASSWD
stty -echo
stty echo
printf "\n"
     # Now issue the commands in the source script to 
# the remote filer.
     while read cmd 
do
echo Issuing command \"$cmd\" to filer $FILER
rsh $FILER -l root:$PASSWD "$cmd" < /dev/null
done < $1
printf "\n"
done

Adding Fibre-Channel-attached tape drives and libraries  Top

You can add Fibre-Channel-attached tape drives and libraries to filers dynamically (without taking the filers offline). When the new medium changer is added, the filer detects its presence and adds it to the configuration. If the medium changer is already referenced in the alias information, no new logical names are created. If the library is not referenced, the filer creates a new alias for the medium changer.

Library Table of Contents Index Previous Next Comments