Search This Blog

Thursday, July 24, 2014

HOT-Relocation Process in VxvM


HOT-Relocation Process:

The hot-relocation feature is enabled by default. No system administrator action is needed to start hot relocation when a failure occurs.

The vxrelocd daemon starts during system startup and monitors VxVM for failures involving disks, plexes, or RAID-5 subdisks. When a failure occurs, vxrelocd triggers a hot-relocation attempt and notifies the system administrator, through e-mail, of failures and any relocation and recovery actions. The vxrelocd daemon is started by a VxVM start-up script during system boot up. The argument to vxrelocd is the list of people to e-mail notice of a relocation (default is root). To disable vxrelocd, you can place a “#” in front of the line in the corresponding start-up file.

A successful hot-relocation process involves:
1.  Failure detection: Detecting the failure of a disk, plex, or RAID-5 subdisk (The affected Volume Manager objects are identified and the system administrator and other designated users are notified.)
2.  Relocation: Determining which subdisks can be relocated, finding space for those subdisks, and relocating the subdisks (The system administrator and other designated users are notified of the success or failure of these actions. Hot relocation does not guarantee the same layout of data or the same performance after relocation.)
3.  Recovery: Initiating recovery procedures, if necessary, to restore the volumes and data (Again, the system administrator and other designated users are notified of the recovery attempt.)

How is space selected for relocation?
A spare disk must be initialized and placed in a disk group as a spare before it can be used for replacement purposes.
·          Hot relocation attempts to move all subdisks from a failing drive to a single spare destination disk, if possible.
·          If no disks have been designated as spares, VxVM automatically uses any available free space in the disk group not currently on a disk used by the volume.
·          If there is not enough spare disk space, a combination of spare disk space and free space is used. Free space that you exclude from hot relocation is not used.

In all cases, hot relocation attempts to relocate subdisks to a spare in the same disk group, which is physically closest to the failing or failed disk. Note that if there is not enough free space, it is possible for a subdisk to be relocated to multiple subdisks scattered to different disks.

When hot relocation occurs, the failed subdisk is removed from the configuration database. The disk space used by the failed subdisk is not recycled as free space.

Marking/Unmarking a Disk as a Hot-Relocation Spare:

Syntax: # vxedit –g diskgroup set spare=on|off dm_name

To designate a disk as a spare

For Example
# vxedit –g rootdg set spare=on rootdg06
# vxdisk list
DEVICE       TYPE            DISK         GROUP        STATUS
c2t0d0s2     auto:hpdisk     rootdisk02   rootdg       online
c2t1d0s2     auto:LVM        -            -            LVM
c3t2d0s2     auto:hpdisk     rootdisk01   rootdg       online
c5t0d1       auto:cdsdisk    rootdg02     rootdg       online
c5t0d2       auto:cdsdisk    rootdg03     rootdg       online
c5t0d3       auto:cdsdisk    rootdg04     rootdg       online
c5t0d4       auto:cdsdisk    rootdg05     rootdg       online
c5t0d5       auto:cdsdisk    rootdg06     rootdg       online spare
c5t0d6       auto:cdsdisk    rootdg07     rootdg       online
c5t0d7       auto:cdsdisk    rootdg08     rootdg       online
c5t1d0       auto:cdsdisk    rootdg01     rootdg       online

Removing a Disk from User as a Hot-Relocation Spare


To make disk rootdg06 available for normal use:
# vxedit –g rootdg set spare=off rootdg06
[rx26-159]/
# vxdisk list
DEVICE       TYPE            DISK         GROUP        STATUS
c2t0d0s2     auto:hpdisk     rootdisk02   rootdg       online
c2t1d0s2     auto:LVM        -            -            LVM
c3t2d0s2     auto:hpdisk     rootdisk01   rootdg       online
c5t0d1       auto:cdsdisk    rootdg02     rootdg       online
c5t0d2       auto:cdsdisk    rootdg03     rootdg       online
c5t0d3       auto:cdsdisk    rootdg04     rootdg       online
c5t0d4       auto:cdsdisk    rootdg05     rootdg       online
c5t0d5       auto:cdsdisk    rootdg06     rootdg       online
c5t0d6       auto:cdsdisk    rootdg07     rootdg       online
c5t0d7       auto:cdsdisk    rootdg08     rootdg       online
c5t1d0       auto:cdsdisk    rootdg01     rootdg       online

To Exclude or include a Disk from Hot-Relocation

Syntax: # vxedit –g diskgroup set nohotuse=on|off dm_name

# vxedit set spare=on rootdg06
# vxedit -g rootdg set nohotuse=off rootdg06
# vxdisk list
DEVICE       TYPE            DISK         GROUP        STATUS
c2t0d0s2     auto:hpdisk     rootdisk02   rootdg       online
c2t1d0s2     auto:LVM        -            -            LVM
c3t2d0s2     auto:hpdisk     rootdisk01   rootdg       online
c5t0d1       auto:cdsdisk    rootdg02     rootdg       online
c5t0d2       auto:cdsdisk    rootdg03     rootdg       online
c5t0d3       auto:cdsdisk    rootdg04     rootdg       online
c5t0d4       auto:cdsdisk    rootdg05     rootdg       online
c5t0d5       auto:cdsdisk    rootdg06     rootdg       online spare
c5t0d6       auto:cdsdisk    rootdg07     rootdg       online
c5t0d7       auto:cdsdisk    rootdg08     rootdg       online
c5t1d0       auto:cdsdisk    rootdg01     rootdg       online

To force hot relocation to only use spare disks:
Add spare=only in /etc/default/vxassist

No comments:

Post a Comment