2.2.3 Reclaiming a Hot Spare Drive After Upgrading to Oracle Exadata System Software Release 12.1.2.1.0 or Later

Oracle Exadata Database Machines upgraded to Oracle Exadata System Software release 12.1.2.1.0 or later that have a hot spare drive cannot use the reclaimdisks.sh script to reclaim the drive. The following procedure describes how to manually reclaim the drive:

Note:

During the procedure, the database server is restarted twice. The steps in the procedure assume that the Oracle Grid Infrastructure restart is disabled after the server restart.

The sample output shows Oracle Exadata Database Machine X2-2 database server with four disks. The enclosure identifier, slot number, and such may be different for your system.

Note:

If you are running Oracle Exadata System Software 19.1.0 or later, substitute the string /opt/MegaRAID/storcli/storcli64 for /opt/MegaRAID/MegaCli/MegaCli64 in the following commands:
  1. Identify the hot spare drive.
    # /opt/MegaRAID/MegaCli/MegaCli64 -PDList -aALL
    

    The following is an example of the output from the command for the hot spare drive:

    ...
    Enclosure Device ID: 252
    Slot Number: 3
    Enclosure position: N/A
    Device Id: 8
    WWN: 5000CCA00A9FAA5F
    Sequence Number: 2
    Media Error Count: 0
    Other Error Count: 0
    Predictive Failure Count: 0
    Last Predictive Failure Event Seq Number: 0
    PD Type: SAS
    Hotspare Information:
    Type: Global, with enclosure affinity, is revertible
     
    Raw Size: 279.396 GB [0x22ecb25c Sectors]
    Non Coerced Size: 278.896 GB [0x22dcb25c Sectors]
    Coerced Size: 278.464 GB [0x22cee000 Sectors]
    Sector Size: 0
    Logical Sector Size: 0
    Physical Sector Size: 0
    Firmware state: Hotspare, Spun down
    Device Firmware Level: A2A8
    Shield Counter: 0
    Successful diagnostics completion on : N/A
    ...
    

    The command identified the hot spare drive on enclosure identifier 252, slot 3.

  2. Obtain the virtual drive information.
    # /opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -Lall -Aall
    

    The following is an example of the output from the command:

    Adapter 0 -- Virtual Drive Information:
    Virtual Drive: 0 (Target Id: 0)
    Name :DBSYS
    RAID Level : Primary-5, Secondary-0, RAID Level Qualifier-3
    Size : 556.929 GB
    Sector Size : 512
    Is VD emulated : No
    Parity Size : 278.464 GB
    State : Optimal
    Strip Size : 1.0 MB
    Number Of Drives : 3
    Span Depth : 1
    Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
    Current Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
    Default Access Policy: Read/Write
    Current Access Policy: Read/Write
    Disk Cache Policy : Disabled
    Encryption Type : None
    Is VD Cached: No
    

    The command identified a RAID 5 configuration for virtual drive 0 on adapter 0.

  3. Remove the hot spare drive.
    # /opt/MegaRAID/MegaCli/MegaCli64 -PDHSP -Rmv -PhysDrv[252:3] -a0
    
  4. Add the drive as an active RAID 5 drive.
    # /opt/MegaRAID/MegaCli/MegaCli64 -LDRecon -Start -r5     \
      -Add -PhysDrv[252:3] -L0 -a0
    
    Start Reconstruction of Virtual Drive Success.
    Exit Code: 0x00
    

    Note:

    If the message Failed to Start Reconstruction of Virtual Drive is displayed, then follow the instructions in My Oracle Support note 1505157.1.

  5. Monitor the progress of the RAID reconstruction.
    # /opt/MegaRAID/MegaCli/MegaCli64 -LDRecon -ShowProg -L0 -a0
    
    Reconstruction on VD #0 (target id #0) Completed 1% in 2 Minutes.
    

    The following output shows the output of the command after the hot spare drive is added to the RAID 5 configuration, and the reconstruction is finished:

    Reconstruction on VD #0 is not in Progress.
    
  6. Verify the number of drives.
    # /opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -Lall -Aall
    

    The following is an example of the output from the command:

    Adapter 0 -- Virtual Drive Information:
    Virtual Drive: 0 (Target Id: 0)
    Name :DBSYS
    RAID Level : Primary-5, Secondary-0, RAID Level Qualifier-3
    Size : 835.394 GB
    Sector Size : 512
    Is VD emulated : No
    Parity Size : 278.464 GB
    State : Optimal
    Strip Size : 1.0 MB
    Number Of Drives : 4
    Span Depth : 1
    Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
    Current Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
    Default Access Policy: Read/Write
    Current Access Policy: Read/Write
    Disk Cache Policy : Disabled
    Encryption Type : None
    Is VD Cached: No
    
  7. Check the size of the RAID.
    # parted /dev/sda print
    
    Model: LSI MR9261-8i (scsi)
    Disk /dev/sda: 598GB
    Sector size (logical/physical): 512B/4096B
    Partition Table: msdos
     
    Number Start End Size Type File system Flags
    1 32.3kB 132MB 132MB primary ext3 boot
    2 132MB 598GB 598GB primary lvm 
    
  8. Restart the server in order for the changes to take effect.
  9. Check the size of the RAID again.
    # parted /dev/sda print
    
    Model: LSI MR9261-8i (scsi)
    Disk /dev/sda: 897GB
    Sector size (logical/physical): 512B/4096B
    Partition Table: msdos
     
    Number Start End Size Type File system Flags
    1 32.3kB 132MB 132MB primary ext3 boot
    2 132MB 598GB 598GB primary lvm
    

    The increased RAID size allows for extending the volume group. To extend the volume group, you must add an additional partition to the drive.

  10. Obtain the new size, in sectors.
    # parted /dev/sda
    
    GNU Parted 2.1
    Using /dev/sda
    Welcome to GNU Parted! Type 'help' to view a list of commands.
    (parted) unit s
    (parted) print
    Model: LSI MR9261-8i (scsi)
    Disk /dev/sda: 1751949312s
    Sector size (logical/physical): 512B/4096B
    Partition Table: msdos
     
    Number Start End Size Type File system Flags
    1 63s 257039s 256977s primary ext3 boot
    2 257040s 1167957629s 1167700590s primary lvm
    

    In the preceding example, a third partition can be created starting at sector 1167957630, and ending at the end of the disk at sector 1751949311.

  11. Create an additional partition on the drive.
    # parted /dev/sda
    
    GNU Parted 2.1
    Using /dev/sda
    Welcome to GNU Parted! Type 'help' to view a list of commands.
    (parted) unit s
     
    (parted) mkpart
     
    Partition type? primary/extended? primary
    File system type? [ext2]? ext2 
    Start? 1167957630
    End? 1751949311
    Warning: The resulting partition is not properly aligned for best performance.
    Ignore/Cancel? Ignore
    Warning: WARNING: the kernel failed to re-read the partition table on /dev/sda (Device or resource busy). As a
    result, it may not reflect all of your changes until after reboot.
    (parted)
     
    (parted) print
    Model: LSI MR9261-8i (scsi)
    Disk /dev/sda: 1751949312s
    Sector size (logical/physical): 512B/4096B
    Partition Table: msdos
     
    Number Start End Size Type File system Flags
    1 63s 257039s 256977s primary ext3 boot
    2 257040s 1167957629s 1167700590s primary lvm
    3 1167957630s 1751949311s 583991682s primary
     
    (parted) set 3 lvm on 
     
    Warning: WARNING: the kernel failed to re-read the partition table on /dev/sda (Device or resource busy). As a
    result, it may not reflect all of your changes until after reboot.
    (parted) print
    Model: LSI MR9261-8i (scsi)
    Disk /dev/sda: 1751949312s
    Sector size (logical/physical): 512B/4096B
    Partition Table: msdos
     
    Number Start End Size Type File system Flags
    1 63s 257039s 256977s primary ext3 boot
    2 257040s 1167957629s 1167700590s primary lvm
    3 1167957630s 1751949311s 583991682s primary lvm
    
  12. Restart the database server.
  13. Create the physical volume.
    # pvcreate /dev/partition_name
    
  14. Add the physical volume to the existing volume group.

    In the following example, substitute the actual names for the volume_group, partition_name, and volume_name.

    # vgextend volume_group /dev/partition_name
     
    Volume group "volume_name" successfully extended 
    
  15. Resize the logical volume and file systems as described in "Extending LVM Partitions."