C H A P T E R 3 |
Hot-Plug Procedures for FC-AL Disks and Disk Arrays |
Hot-plugging is the process of installing or removing an individual FC-AL disk drive or an entire Sun StorEdge A5x00 enclosure while the power is on and the operating system is running. This chapter describes how to hot-plug individual
FC-AL disk drives installed in a Sun StorEdge A5x00 disk array or in a Sun Fire 880 internal storage subsystem.
This chapter covers hot-plug procedures for systems running UNIX File System (UFS) operations, VERITAS Volume Manager, or Solstice DiskSuite software.
This chapter covers the following topics and procedures:
Three specific cases exist where the hot-plug feature is useful:
Adding a disk drive to a system to increase storage capacity. See How to Add an FC-AL Disk Drive .
Replacing a faulty disk drive while the system is running. See How to Replace an FC-AL Disk Drive .
Removing a disk drive from a system that no longer needs it. See How to Remove an FC-AL Disk Drive .
The way in which you hot-plug a disk drive depends on the application you are using. Each application is different, but each requires that you:
Prepare the disk drive for removal. This means stopping activity to the disk drive and unconfiguring it from the operating environment. See How to Prepare an FC-AL Drive for Removal .
Remove the disk drive and either install a replacement drive or leave the slot empty. See How to Replace an FC-AL Disk Drive , How to Add an FC-AL Disk Drive , or How to Remove an FC-AL Disk Drive .
Reconfigure the operating environment to use the new drive. See How to Reconfigure an FC-AL Disk Drive .
Different applications provide various levels of error logging. In general, you can find messages about failing or failed disks in your system console window. The information is also logged in the /usr/adm/messages file. See the documentation that came with your application for more information.
If possible, prepare replacement disk drives in advance. Format, label, and partition each replacement disk drive in the same way as the disk it will replace. See the documentation for your application for instructions on how to format and partition the disk and add that disk to your application.
The FC-AL disk hot-plug procedures use the luxadm insert_device and remove_device subcommands to add, remove, and replace disk drives. For detailed information about the syntax of these commands, see Removing, Inserting, and Replacing Enclosures and Disks in this manual.
Refer to the disk enclosure's installation or service manual for details on physically adding or removing disk drives.
If you are replacing a faulty drive, install the new drive in the same slot from which you removed the faulty drive.
When you unconfigure or configure a disk drive for an application, you may need to specify the drive by using its logical device name.
The naming convention for disks attached to a host port or host adapter is c w t x d y s z. c w t x d y s z is the logical device name, where:
w corresponds to the FC-AL controller
x corresponds to the disk slot
y is the logical unit for the disk drive (always 0)
z is the slice or partition on the disk
To obtain the logical device name for a mounted disk drive, use the df command. Refer to the df (1M) man page for more information. To obtain the logical device name for an unmounted drive, use the luxadm display command. You can also use the format command. Refer to the format(1M) man page for more information.
You can specify a device to the luxadm subcommands by using a path name, WWN, or enclosure name and slot number.
If you use an enclosure name, you need to assign a box name.
The enclosure name for a Sun Fire 880 SES is specified as:
The enclosure name for a Sun StorEdge A5x00 IB is specified as:
A box_name is the name you assign to the enclosure with the luxadm enclosure_name subcommand or if you are using a Sun StorEdge A5x00, the front panel module. When used without the optional slot_number , the box_name identifies the Sun StorEdge A5x00 subsystem IB or a Sun Fire 880 internal storage array.
To assign the box_name and the slot_number , follow these steps:
1. Use the probe subcommand to determine the enclosure name, type:
A list of all attached subsystems and disks is displayed including the logical path name, the WWNs, and the enclosure names.
2. Use the enclosure_name subcommand to assign a box_name to the enclosure name, type:
3. Use the display subcommand to determine the slot number for an individual disk.
The display command returns a list of slot numbers and WWN numbers for each disk. Use the box_name from Step 2 and the slot_number from Step 3 to specify an individual disk to a luxadm subcommand.
The following command assigns the box name dak to a Sun Fire 880 enclosure using the enclosure_name subcommand with a logical path name.
This procedure describes how to add a disk drive while the power is on and the operating system is running. Use this procedure to add a new FC-AL disk drive to a Sun Fire 880 system or to a Sun StorEdge A5x00 array.
After you install a new drive, you need to configure the file system so that the Solaris Operating Environment recognizes the new drive. If you are running Volume Manager or Solstice DiskSuite software, you need to configure your application to recognize the new drive.
Caution Caution - You must be a qualified system administrator to perform this procedure. |
Know how to specify the disk to the luxadm insert_device subcommand. Specifying a disk depends on whether the enclosure is a Sun Fire 880 system or a Sun StorEdge A5x00 disk array. See About Addressing a Disk or Disk Array for more information.
2. Select any available slot for the new disk drive.
For reference when you configure the software environment, make a note of which slot (and enclosure) you choose.
3. Determine the address for the new device.
You need to specify the new device to the luxadm insert_device command. To specify an individual Sun Fire 880 disk, use box_name [ ,s ] slot_number . To specify an individual Sun StorEdge A5x00 disk, use box_name [ ,f | ,r ] slot_number . Use a box name without a slot number to specify an enclosure. To determine the box name and slot number, use the probe , enclosure_name, and display subcommands:
Use the probe subcommand to display the enclosure name. If you are using a Sun StorEdge A5x00, you may also obtain the box name from the front panel module, if necessary.
For more information, see Assigning a Box Name to an Enclosure . For more detailed information about all of the addressing options, see About Addressing a Disk or Disk Array .
4. Use the luxadm insert_device command to insert the new device.
This command is interactive. You are informed when you can insert the new device and guided through the procedure for creating a new device entry or chain of devices.
a. Type the luxadm insert_device command:
where enclosure,dev is the box name and slot number determined in Step 3.
After you press Return, luxadm displays the list of device(s) to be inserted and asks you to verify that the list is correct.
The following example inserts a new drive into slot 5 of a Sun Fire 880 enclosure named dak.
The following example inserts a new drive into the first slot in the front of a Sun StorEdge A5x00 array named macs1.
b. Type c at the prompt or press Return if the list of devices to be added is correct.
A message similar to the following is displayed.
c. Physically insert the new drive, then press Return.
Refer to the disk enclosure's installation or service manual for information about installing a disk drive.
The luxadm insert_device subcommand configures the drive for the Solaris Operating Environment by creating a new device entry for the drive in the /dev/dsk and /dev/rdsk directories. The new drive is assigned a WWN.
After you insert the drive and press Return, the luxadm command informs you that the disk has been inserted and displays the logical device names for the device, for example:
Device dak5 inserted Drive in Box Name "dak" slot 5 Logical Nodes under /dev/dsk and /dev/rdsk : c2t5d0s0 c2t5d0s1 c2t5d0s2 c2t5d0s3 c2t5d0s4 c2t5d0s5 c2t5d0s6 c2t5d0s7 |
5. Configure the new disk drive for your application.
Continue the procedure for adding a drive by configuring the disk drive for your application. The procedure you use depends on whether your system is running UFS, VERITAS Volume Manager, or Solstice DiskSuite software. See How to Configure a New FC-AL Disk Drive .
Caution Caution - You must be a qualified system administrator to perform this procedure. Performing a hot-plug operation on an active disk drive can result in data loss or data corruption. |
After you install a new disk drive into a Sun Fire 880 enclosure or a Sun StorEdge A5x00 array, you need to configure your application to accept the new drive. Each application is different. This section provides procedures for UFS, VERITAS Volume Manager, and Solstice DiskSuite software. Select the appropriate procedure for your application and follow the steps.
2. Verify that the device label meets your requirements.
Use the prtvtoc command to inspect the label for your disk. To modify the label, use the format command. Refer to the prtvtoc(1M) and format(1M) man pages for more information.
3. Select a disk slice for your UFS file system and check if it has a clean file system, type:
where c w t x d y s z is the logical device name for the new disk.
If you get an error message, you need to use the newfs command to create a new file system on the slice, type:
Refer to the newfs(1M) man page for more information.
4. If necessary, create a mount point for the new file system, type:
where mount_point is a fully qualified path name. Refer to the mount(1M) man page for more information.
5. Mount the new file system, type:
where: mount_point is the directory you created in Step 4 .
6. After you have created the file system and mount point, modify the /etc/vfstab file to reflect the new file system.
See the vfstab(4) man page for more details.
The new disk is ready to be used.
2. Configure the Volume Manager to recognize the disk drive, type:
3. Add the new disk to a new or existing Volume Manager disk group, type
where c w t x d y s z is logical device name of the new disk. This command is interactive. You will be guided through the procedure for adding a new disk to Volume Manager.
Refer to the vxdiskadd (1M) man page for further details.
The disk is now ready for use with Volume Manager as part of a new volume, added to an existing volume as a plex, or to increase an existing volume. Refer to your Sun StorEdge Volume Manager User's Guide for more information.
4. Quit the vxdiskadd utility.
Refer to the Solstice DiskSuite documentation for information about configuring the new disk drive.
Before you remove a device from a Sun StorEdge A5x00 array or a Sun Fire 880 enclosure, you need to stop activity to the drive and remove the drive from the application. The way you prepare a disk drive for removal depends on whether you are using UFS, VERITAS Volume Manager, or Solstice DiskSuite software. Each application is different.
This section provides procedures for UFS, VERITAS Volume Manager, and Solstice DiskSuite software. Select the appropriate procedure for your application and follow the steps.
Caution Caution - You must be a qualified system administrator to perform this procedure. Performing a hot-plug operation on an active disk drive can result in data loss or data corruption. |
Use this procedure to unconfigure a disk that is being used by one or more UFS file systems.
2. Identify activities or applications attached to the device you plan to remove.
Commands to use are mount , showmount -a , df , and ps -ef . See the mount(1M) , showmount(1M) , and ps(1) man pages for more details.
For example, where the device to be removed is c0t11d0 :
In this example, the file system /export/home1 on the faulty disk is being remotely mounted by three different systems-- cinnamon , austin , and swlab1 . The only process running is grep , which has finished.
3. Stop any activity or application processes on the file systems to be unconfigured.
5. Determine and save the partition table for the disk.
If you are replacing the disk and the replacement disk is the same type as the faulty disk, you can use the
format
command to save the partition table of the disk. Use the
format save
command to save a copy of the partition table to the
/etc/format.dat
file. This enables you to configure the replacement disk so that its layout matches the current disk.
Refer to the format(1M) man page for more information.
6. U
nmount any file systems on the disk.
filesystem is the first field for each file system returned.
7. Verify that the file system has been unmounted, type:
The disk is now ready to be removed or replaced. See How to Remove an FC-AL Disk Drive .
You will need the logical device name of the disk to complete this procedure.
2. Identify the faulty disk drive.
Different applications provide various levels of error logging. In general, you can find messages about failing or failed disks in your system console window. The information is also logged in the /usr/adm/messages file. See the documentation that came with your application for more information.
Refer to the documentation that came with your system for backup details.
4. Identify the disk media name for the disk you intend to replace, type:
For example, if the disk to be removed is c2t1d0 , type:
The disk media name is the third field in the output above: disk01 .
You can use the vxdiskadm utility to prepare the disk for replacement.
5. Type vxdiskadm in a shell window.
This operation is interactive and requires your confirmation of the operation.
6. If you are planning to replace the disk, select the "Remove a disk for replacement" option. Otherwise select the "Remove a disk" option.
When prompted for a disk name to replace or remove, type the disk media name. The vxdiskadm utility marks the disk for replacement and saves the subdisk information to be rebuilt on the replacement disk.
Redundant data is automatically recovered after the replacement disk has been reattached to Volume Manager. Nonredundant data is identified as unusable and must be re-created from backups.
Refer to the vxdiskadm(1M) man page for further details.
7. Quit the vxdiskadm utility.
The disk is now ready to be removed or replaced. See How to Remove an FC-AL Disk Drive .
2. Identify the disk to be replaced by examining the /var/adm/messages file and metastat output.
3. Use the metadb command to locate any local metadevice state database replicas that may have been placed on the problem disk.
Errors may be reported for the replicas located on the failed disk. In this example, c0t1d0 is the problem device.
The output above shows three state database replicas on slice 4 of each of the local disks, c0t0d0 and c0t1d0 . The W in the flags field of the c0t1d0s4 slice indicates that the device has write errors. Three replicas on the c0t0d0s4 slice are still good.
4. Record the slice name where the replicas reside and the number of replicas, then delete the state database replicas.
The system obtains the number of replicas by counting the number of appearances of a slice in metadb output in Step 2. In this example, the three state database replicas that exist on c0t1d0s4 are deleted.
5. Locate any submirrors using slices on the problem disk and detach them.
a. Use the metastat command to show the affected mirrors.
b. Use the metadetach command to detach the submirrors identified in the previous step.
6. Delete hot spares on the problem disk.
7. Preserve the disk label if the disk is using multiple partitions.
See the prtvtoc ( 1M ) man page for more information.
8. Use the metareplace command to replace the disk slices that are not hot spares.
The disk is now ready to be removed or replaced. See How to Remove an FC-AL Disk Drive .
This procedure describes how to remove a disk drive or an entire array while the power is on and the operating system is running. Use this procedure to remove an FC-AL disk drive from a Sun Fire 880 server or a Sun StorEdge A5x00 array.
Caution Caution - You must be a qualified system administrator to perform this procedure. Performing a hot-plug operation on an active disk drive can result in data loss or data corruption. |
Identify the disk to be removed. Different applications provide various levels of error logging. In general, you can find messages about failing or failed disks in your system console window. The information is also logged in the
/usr/adm/messages
file(s). See the documentation that came with your application for more information.
Know how to specify the disk to luxadm . How you specify a device depends on whether the enclosure is a Sun Fire 880 system or a Sun StorEdge disk array. See Chapter 1 for more information.
1. Determine an address for the disk to be removed.
You need to specify the device to the luxadm remove_device command by using a path name, a WWN, or a box_name and slot_number . Use the probe , enclosure_name, and display subcommands to determine an address.
For more information about using a box name and slot number, see Assigning a Box Name to an Enclosure . For information about all of the addressing options, see About Addressing a Disk or Disk Array .
2. Stop any activity to the drive and unconfigure the drive from your application.
See How to Prepare an FC-AL Drive for Removal and follow the steps for your application.
3. Use the luxadm remove_device command to remove the device.
This command is interactive. You are guided through the procedure for removing a new device entry or chain of devices. This command checks if the device is busy, makes the device go offline, and informs you that the device can be removed.
a. Type the luxadm remove_device command:
where enclosure [ ,dev ]...| pathname ... is the address determined in Step 1.
After you press Return, luxadm displays a list of the devices to be removed and asks you to verify that the list is correct.
The following example shows the command to remove a drive from slot 10 in a Sun Fire 880 enclosure named newdak.
The following example shows the command to remove a disk in slot 1 in the front of a Sun StorEdge A5x00 array named macs.
b. Type c at the prompt or press Return if the list of devices to be removed is correct.
luxadm prepares the disk(s) or enclosure(s) for removal and displays a message similar to the following:
Searching directory /dev/es for links to enclosures stopping: Drive in "DAK1" slot 1....Done offlining:Drive in "DAK1" slot 1....Done Hit <Return> after removing the device(s). |
Note Note - If a message is displayed indicating that the list of devices is being used by the host, you will need to take the devices offline. See How to Prepare an FC-AL Drive for Removal and follow the steps for your application. |
c. Physically remove the drive, then press Return.
The luxadm command indicates which device you can remove by the status of the LEDs.
On a Sun StorEdge 5000 array, the yellow LED on the designated disk drive(s) will be flashing. On a Sun Fire 880 enclosure, the disk's OK-to-Remove LED will light.
For a Sun Fire 880 system, you may remove the disk drive when the OK-to-Remove LED is lit. The green power LED may also be lit or blinking.
For a Sun StorEdge 5000 array, you may remove the disk drive when the OK-to- Remove LED is blinking.
See your service manual for more information about removing a disk drive.
After you remove the disk drive and press Return, luxadm informs you that the disk has been removed and displays the logical device names for the removed device. For example, after you remove a disk from slot 10 of Sun Fire 880 enclosure, dak, and press Return, a message similar to the following is displayed:
This drive is now removed from the enclosure and your application.
If you are replacing the drive, go to How to Replace an FC-AL Disk Drive and continue the procedure at Step 3. Otherwise, if you are running UFS, edit the /etc/vfstab file to delete any references to the removed devices. See the vfstab(4) man page for additional details.
This procedure describes how to replace an FC-AL disk drive while the power is on and the operating system is running. Before you remove a disk drive, you need to stop activity to the drive and remove the drive from your application. After you replace the drive you need to reconfigure the drive for your application.
Caution Caution - You must be a qualified system administrator to perform this procedure. Performing a hot-plug operation on an active disk drive can result in data loss or data corruption. |
Identify the faulty disk drive. Different applications provide various levels of error logging. In general, you can find messages about failing or failed disks in your system console window. The information is also logged in the
/usr/adm/messages
file(s). See the documentation that came with your application for more information.
Prepare a replacement disk ahead of time with the same format, label, and partition as the disk it will replace.
Know how to specify the disk to luxadm. How you specify a device depends on whether the enclosure is a Sun Fire 880 system or a Sun StorEdge A5x00 disk array. See About Addressing a Disk or Disk Array for more information.
1. Determine an address for the disk to be removed.
You need to specify the disk to luxadm . You can specify the disk with a path name, a WWN, or a box_name and slot_number . To determine an address, you need to use the probe , enclosure_name, and display subcommands:
To specify a disk or an array by box_name and slot_number , see Assigning a Box Name to an Enclosure . For more detailed information about all of the addressing options, see About Addressing a Disk or Disk Array .
2. Stop all activity to the drive and unconfigure the drive from your application, if you have not already done so.
Your system may be running UNIX File system, VERITAS Volume Manager, or Solstice DiskSuite software. You must stop activity to the disk and notify the application that you are removing the disk drive.
See How to Prepare an FC-AL Drive for Removal and follow the steps for your application.
3. Use the luxadm remove_device command to remove the device.
See How to Remove an FC-AL Disk Drive and follow the steps.
4. Use the luxadm insert_device command to add the new device.
See How to Add an FC-AL Disk Drive and follow the steps. Insert the new drive into the same slot as the one you removed.
5. Reconfigure the disk drive for your application.
Continue the disk replacement procedure by reconfiguring the disk drive within your application. The procedure you use depends on whether your system is running UFS or Volume Manager or Solstice DiskSuite software. See How to Reconfigure an FC-AL Disk Drive .
After you replace a faulty FC-AL disk drive, it is necessary to reconfigure the drive for the application running on your system.
This section provides procedures for UFS, VERITAS Volume Manager, and Solstice DiskSuite software. Use the reconfiguration procedure appropriate for the application running on your system.
Caution Caution - You must be a qualified system administrator to perform this procedure. Performing a hot-plug operation on an active disk drive can result in data loss and/or data corruption. |
1. Verify that the device's partition table satisfies the requirements of the file system(s) you intend to re-create.
You can use the
prtvtoc
command to inspect the label for your device. If you need to modify the label, use the
format
command. Refer to the
prtvtoc(1M)
and
format(1M)
man pages for more information.
For example:
If you have saved a disk partition table using the format utility and the replacement disk type matches the old disk type, then you can use the format utility's partition section to configure the partition table of the replacement disk. See the select and label commands in the partition section.
If the replacement disk is of a different type than the disk it replaced, you can use the partition size information from the previous disk to set the partition table for the replacement disk. Refer to the prtvtoc(1M) and format(1M) man pages for more information.
2. Select a disk slice for your UFS file system and create a new file system on the slice:
Refer to the newfs(1M) man page for more information.
3. Mount the new file system using the mount command, type:
where mount_point is the directory on which the faulty disk was mounted.
The new disk is ready to be used. You can now restore data from your backups.
To re-create the replaced disk on the new drive:
1. Configure the Volume Manager to recognize the disk drive, type:
Select the "Replace a failed or removed disk" option.
vxdiskadm supplies a list of available disks to be used as replacements.
3. Select the replacement drive.
vxdiskadm automatically configures the replacement drive to match the failed drive.
Redundant data is recovered automatically. Space for nonredundant data is created and identified. Nonredundant data must be recovered from backing store.
1. Restore the disk label, if necessary.
2. If you deleted replicas, add the same number back to the appropriate slice. In this example, /dev/dsk/c-t1d0s4 is used.
3. Depending on how the disk was used, you may have a variety of tasks to do.
Use the following table to decide what to do next.
4. Replace hot spares that were deleted, and add them to the appropriate hot spare pool(s).
Check the user and application data on all metadevices. You may have to run an application-level consistency checker or use some other method to check the data.
Copyright © 2002, Sun Microsystems, Inc. All rights reserved.