Operating System - HP-UX
1836412 Members
2668 Online
110100 Solutions
New Discussion

Re: On the fly disk replacement?

 
dark-sun
Frequent Advisor

On the fly disk replacement?

Hello,
I have to replace the external storage from a two node cluster (HPUX 11.11)

Only one VG, only one (shared) disk.
I saw the new disk also.

I have done:
# pvcreate /dev/rdsk/new
# vgextend /dev/vg01 /dev/dsk/new

# lvextend -m 1 /dev/vg01/lvol01 /dev/dsk/new
(for all LV's ...)

Can I now simply do the following steps?
# lvreduce -m 0 lvol01, ...
# vgreduce vg01 old-disk

Than
# vgexport -s -p -m /tmp/vg01.map /dev/vg01
cp, on second node
# vgimport -p -s -m /tmp/vg01.map vg01

Will this works?

Thanks for hints and helps!
7 REPLIES 7
Rita C Workman
Honored Contributor

Re: On the fly disk replacement?

I'd recommend using the lvol using the physcial volume name:

lvreduce -m 0 /dev/vg/lvol /dev/dsk/

Rita
dark-sun
Frequent Advisor

Re: On the fly disk replacement?

Hi Rita,
yes, of course. this is correct. Otherwise the wrong (new) disk will be removed from mirror.

But the other steps, are they corrct and complete? Should it be really so easy? ;-)

Will the cluster accept the new disk when the old is removed? Label?
Rita C Workman
Honored Contributor

Re: On the fly disk replacement?

As long as the second node can see the new disk, you just missed a couple lines:

On second node: (not currently running the pkg)
vgexport /dev/vg
mkdir /dev/vg
mknod /dev/vg/group c 64 0x--0000

Then run your vgimport, without the -p (preview) option to repopulate your /etc/lvmtab.

vgimport -s -m /tmp/vg01.map /dev/vg01

Rgrds,
Rita
P Arumugavel
Respected Contributor

Re: On the fly disk replacement?

hi,

Your procedure almost gets into right. However refer the below thread, will give you clearance.

http://h30499.www3.hp.com/t5/LVM-and-VxVM/Changing-the-pv-s-in-a-vg/m-p/4068943#M30706


Rgds...

dark-sun
Frequent Advisor

Re: On the fly disk replacement?

Hello,
just (a little) wondering:
After I add the new disk, the map-file from vgexport has not changed.

So I think itàs corrct, no information about the PV's in the mapfile, only information about the VG and LV's?

So the VV will be discoverd after disk changes (using the VGID in mapfile), independently which disk are used (having the VG "inside") ?
Stephen Doud
Honored Contributor

Re: On the fly disk replacement?

vgimport -s signals to LVM to scan all disks for the VGID at the top of the map file. Any disk path links to that VGID is loaded into /etc/lvmtab. Hence there is no need to list any device special files with the vgimport command when -s option is used.
INH
Regular Advisor

Re: On the fly disk replacement?

Hi,

use
lvreduce -m 0 /dev/vg/lvol /dev/dsk/

-----------
Than
# vgexport -s -p -m /tmp/vg01.map /dev/vg01
cp, on second node
# vgimport -p -s -m /tmp/vg01.map vg01
---

use option p while export ( preview mode)

while importing discard "p" option.

HTH

Regards,
INH
Knowledge is power