Sun Microsystems Logo
->Products and Services
 
->Support and Training
 

docs.sun.com - Sun Product Documentation

  docs.sun.com    Subject Categories    Titles    Product Categories    Help 
  Search for Within
      Search book titles only
  Search Tips
 View    Buy    Download  

Using the SPARCstorage Array 2.3 >> SPARCstorage Array User's Guide >> 12 Performing Service-Related Software Tasks >> 12.3 When Replacing a Physical Disk Drive in the SPARCstorage Array

Previous: 12.2 When Powering Down the SPARCstorage Array

12.3 When Replacing a Physical Disk Drive in the SPARCstorage Array

There are two sets of tasks to be performed when replacing a physical disk drive in the SPARCstorage Array:
  • Before replacing a drive -- Section 12.3.1 on this page
  • After replacing a drive -- Section 12.3.2 on page 12-14

12.3.1 Before Replacing a Drive

Before replacing the drive, you must first perform the preliminary software tasks.

12.3.1.1 Preliminary Software Tasks

Before replacing the drive, you must first perform the following software tasks:
  1. Unmount the file system(s) on the disks in the tray with the faulty drive.

  2. Stop all database processes that are accessing the disks in the tray with the faulty drive.

  3. Stop all other processes that may be accessing the disks in the tray with the faulty drive.


12-4.............SPARCstorage Array User's Guide--September 1996
Refer to Section 12.1, "Flushing or Purging Outstanding Writes from NVRAM," on page 12-1 for more information.
  1. Determine if the failed drive is under Volume Manager control or not.

  • If the failed drive is not under Volume Manager control, stop all the drives in the tray using the instructions in Section 12.3.1.9, "Spinning Down All Drives in a Drive Tray," on page 12-14.
  • If the failed drive is under Volume Manager control, look at the subdisks in the failed VM disk and determine what kind of configuration each of those subdisks falls into. Then look at the flowcharts in Figure 12-1 and Figure 12-2 for the tasks that you must perform for the subdisks in each configuration.

Performing Service-Related Software Tasks...................12-5

Graphic

Figure 12-1 Disk Replacement Flowchart (1 of 2)

12-6.............SPARCstorage Array User's Guide--September 1996

Graphic

Figure 12-2 Disk Replacement Flowchart (2 of 2)

Performing Service-Related Software Tasks...................12-7
Hot-relocation can be used to automatically rebuild mirrored or RAID-5 data when a disk/subdisk fails. If you have a spare disk in a disk group and a disk/subdisk fails, Volume Manager will go through the following steps:
  1. The VM subdisk assigned to the failed physical disk will disappear from the disk group view.

  2. The mirror of the failed subdisk will be copied to the spare disk.

For example, entering the following command for a disk group with a hot spare:

  vxprint -g diskgroup  
should give you output similar to the following:

  TY NAME         ASSOC        KSTATE   LENGTH   PLOFFS   STATE    TUTIL0  PUTIL0  
  dg craig        craig        -        -        -        -        -       -  
  
  dm craig01      c2t0d0s2     -        2050272  -        -        -       -  
  dm craig02      c2t2d0s2     -        2050272  -        -        -       -  
  dm craig03      c2t4d0s2     -        2050272  -        -        -       -  
  dm craig10      c2t0d3s2     -        2050272  -        SPARE    -       -  
  
  v  vol01        fsgen        ENABLED  20480    -        ACTIVE   -       -  
  pl vol01-01     vol01        ENABLED  21168    -        ACTIVE   -       -  
  sd craig01-01   vol01-01     ENABLED  21168    0        -        -       -  
  
  v  vol03        fsgen        ENABLED  20480    -        ACTIVE   -       -  
  pl vol03-01     vol03        ENABLED  21168    -        ACTIVE   -       -  
  sd craig03-02   vol03-01     ENABLED  21168    0        -        -       -  
  pl vol03-01     vol03        ENABLED  21168    -        ACTIVE   -       -  
  sd craig01-03   vol03-02     ENABLED  21168    0        -        -       -  
Note that in this disk group, there is one spare disk (craig10) and several VM disks (craig01 through craig03).
If the VM subdisk craig01-03 failed, then Volume Manager would do the following:
12-8.............SPARCstorage Array User's Guide--September 1996
  1. Subdisk craig10-01 is created on spare disk craig10 and subdisk craig03-02 is copied onto craig10-01.

  2. In vol03, craig01-03 is replaced with craig10-01.

Figure 12-3 gives a graphical representation of what happens when hot relocation takes place for a failed VM subdisk.

Graphic

Figure 12-3 Graphical Representation of Hot Relocation

12.3.1.3 Removing a Plex from a Volume

Removing a plex involves first dissociating it from its volume and then removing the plex and any associated subdisks completely.

Note - The last valid plex/mirror in a started or enabled volume cannot be removed, unless the volume is stopped before the remove operation.

Performing Service-Related Software Tasks...................12-9

  vxprint -ht volume_name  
The output would list a plex as the following:

  pl vol02-01     vol02        ENABLED  5        -        ACTIVE   -       -  
  sd craig07-01   vol02-01     ENABLED  5        0        -        -       -  
To dissociate and remove the plex from its volume, enter:

  vxplex -o rm dis plex_name  
For example, to dissociate and remove the plex vol01-02, enter:

  vxplex -o rm dis vol01-02  

12.3.1.4 Moving a Subdisk from One VM Disk to Another

Moving a subdisk copies the disk space contents of a subdisk onto another subdisk. If the subdisk being moved is associated with a plex, then the data stored on the original subdisk is copied to the new subdisk, the old subdisk is dissociated from the plex, and the new subdisk is associated with the plex, at the same offset within the plex as the source subdisk.
For the subdisk move operation to perform correctly, the following conditions must be met:
  • The subdisks involved must be the same size.
  • The subdisk being moved must be part of an active plex on an active (enabled) volume.
  • The new subdisk must not be associated with any other plex.
To move a subdisk, enter:

  vxsd mv old_subdisk_name new_subdisk_name  
12-10............SPARCstorage Array User's Guide--September 1996
  1. Remove all references to the volume.

  2. If the volume is mounted as a file system, unmount it:


  umount /dev/vx/dsk/volume_name  
  1. If the volume is listed in /etc/vfstab, remove its entry.

  2. Make sure the volume is stopped with the command:


  vxvol stop  
The vxvol stop command stops all Volume Manager activity to the volume.
  1. Remove the volume:


  vxedit -rf rm volume_name  
For example, to remove the volume volspan, enter:

  vxedit -rf rm volspan  

Note - For more information on the vxedit command, see the vxedit(1M) man page.

12.3.1.6 Removing a Log

Removing a log involves first dissociating it from its volume and then removing the log and any associated subdisks completely.
To identify a log, enter the following command:

  vxprint -ht volume_name  
Performing Service-Related Software Tasks...................12-11

  pl vol01-02     vol01        ENABLED  1008     -        LOG      -       -  
  sd craig05-01   vol01-02     ENABLED  1008     0        -        -       -  
To dissociate and remove the log from its volume, enter:

  vxplex -o rm dis plex_name  
For example, to dissociate and remove the RAID-5 log vol01-02, enter:

  vxplex -o rm dis vol01-02  

12.3.1.7 Removing a VM Disk

To remove a VM disk from a disk group, enter:

  vxdg [-g groupname] rmdisk diskname  
where groupname is the name of the group to which the disk belongs and diskname is the name of the disk to be removed.
For example, to remove disk01 from rootdg, enter:

  vxdg rmdisk disk01  
Since rootdg is the default disk group, you do not need to specify it.
If the disk has subdisks on it when you try to remove it, the following error message is displayed:

  vxdg:Disk diskname is used by one or more subdisks  

12-12............SPARCstorage Array User's Guide--September 1996
option allows you to remove the disk in spite of the presence of subdisks. For more information, see the vxdg(1m) manual page.

Note - For more information on the vxdg command, see the vxdg(1M) man page.


Note - This procedure removes a VM disk from a disk group only until the next reboot or re-initialization, at which time it will be brought back under Volume Manager control because the private region still exists on the physical disk. If you want to completely remove the disk from Volume Manager control, you must relabel the physical disk and remove the private region.

12.3.1.8 Starting a Volume

  1. Locate the simple or striped volume that contains the subdisk from the failed VM disk.

  2. Before starting the volume, confirm that it is not started by entering:


  vxprint -l volume_name  
Starting a volume changes the volume state from disabled or detached to enabled. The success of this operation depends on the ability to enable a volume. If a volume cannot be enabled, it remains in its current state. To start a volume, enter:

  vxrecover -s volume_name ...  
To start all disabled volumes, enter:

  vxrecover -s  

Performing Service-Related Software Tasks...................12-13
* At the prompt, enter:

  ssaadm stop -t tray_number controller  
where tray_number is the tray that contains the drives and controller is the logical name of the controller, given in the form c#.

Note - For more information on the ssaadm command, refer to the ssaadm(1M) man page.

12.3.2 After Replacing a Drive

* At the prompt, enter:

  ssaadm start -t tray_number controller  
where tray_number is the tray that contains the drives and controller is the logical name of the controller, given in the form c#.

Next: 12.4 When Replacing a Drive Tray in the SPARCstorage Array