Operating System - HP-UX
1832877 Members
2731 Online
110048 Solutions
New Discussion

How to re-use "data spared" disk?

 
Mihails Nikitins
Super Advisor

How to re-use "data spared" disk?

Hi,

A disk is in state "available/data spared".
A spare disk in state "available/active spare".

Question. How to re-use the disk that is "data spared" so that the spare disk returns to state "available/standby spare"?

Thanks and points in advance!
KISS - Keep It Simple Stupid
3 REPLIES 3
Steven E. Protter
Exalted Contributor

Re: How to re-use "data spared" disk?

Shalom,

The spared disk is dead. Test it with cstm and make sure its really dead.

Then:

vgreduce -f /dev/vg03 /dev/dsk/c1t1d0

Use real vg and disk.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Mihails Nikitins
Super Advisor

Re: How to re-use "data spared" disk?

Thank you, Steven

1. I could not run stm because diagmond died and I could not restart it manually.

diagmond[21104]: Exit due to initialization failure.

2. ioscan either exits silently or shows
ioscan: libIO error from io_hw_path_to_str: Parameter error.

3. Once per hour disagnostics checks the disks and some of them produce warnings.

Drive is not responding.
Software configuration error

4. I replaced the disk , run vgcfgrestore and vgchange.

5. Another node sees all the disks as CLAIMED. vgdisplay on active node shows all disks are available, one spare disk is still used.
KISS - Keep It Simple Stupid
Mihails Nikitins
Super Advisor

Re: How to re-use "data spared" disk?

OK, I had problems with active node on HP-UX level. I made switchover and reboot to fix it. The following procedure would answer my question.

Restore LVM configuration on new disk

1. vgcfgrestore -n /dev/vgXX /dev/rdsk/cXtXdX
2. vgchange -a e /dev/vgXX

Migrate data from spare to their original location.

This command was necessary because pvmove produced the error "pvmove: Allocation is not allowed on physical volume"

3. pvchange -x y /dev/dsk/cXtXdX

Actual moving data can take a while.

4. pvmove /dev/dsk/cYtYdY /dev/dsk/cXtXdX

You can see moving progress by the command like
lvdisplay -v /dev/vgdb/lvol1 |head -n 40
Number of used extents is "moving" from the spare disk to the original one.

See also knowledge base docs

Title: How to recover from disk failure, if used automatic hot sparing
Document ID: UNX1030029

Hope this helps.
KISS - Keep It Simple Stupid