1829576 Members
3091 Online
109992 Solutions
New Discussion

Exchanging HDD

 
SOLVED
Go to solution
Johannes Siegert
New Member

Exchanging HDD

Hello,
I have to change a 9GB root HDD with a 18GB HDD at a B2000. The operating system is hp-ux 10.20 and the HDD contains a volume group vg00 with eight lvols. Just one of these lvols have to be extended to utilize the whole HDD capacity.
I can imagine three possible ways of how to proceede:
(1) Since I have got MirrorDisk/UX plus an additional external 9GB HDD, I could set up the mirroring before I replace the root disc, then install the bigger 18GB HDD with SCSI ID 6 and mirror the data back from the mirror disk, like it's done in case if the root disk would fail. Then I expand the lvol.
(2) I install the new disk next to the root disk with SCSI ID 5 and use "dd" to move the data from the original HDD (SCSI ID 6) to the new one:
# dd if=/dev/rdsk/c0t6d0 of=/dev/rdsk/c0t5d0 bs=1024k
Then I expand the lvol.
(3) I create a recovery tape with
# make_tape_recovery -x inc_entire=vg00 -I -v -a /dev/rmt/0mn. Then I install the new HDD and restore the tape interactively.

Which way is the best, and do you know the required commands?
11 REPLIES 11
Stefan Farrelly
Honored Contributor
Solution

Re: Exchanging HDD


Youre going to have to go with option 3 the reason being your VG00 probably wont be setup to handle a 18GB drive. MAX PE per PV wont be set high enough. You can check by simply doing a vgdisplay on vg00 - you will need MAX PE per PV to be around 2169, and for a 9GB drive its probably around 1023.

So, you will need to build an Ignite tape using the make tape recover you already have, boot off the tape, and restore your system onto the new 18Gb drive. Then you can vgimport your non vg00 disks and return to normal.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Vincent Farrugia
Honored Contributor

Re: Exchanging HDD

Hello,

I agree with Stefan Farrelly, although I would have taken advantage of my mirror, much like girls do.

But, since you have HP-UX 10.20, they may be issues when relinking the new disk into the BDRA of all the physical drives in the volume group, which could bring your server unbootable. So better be safe and restart from scratch, increasing the lvol from the beginning as well, using an Ignite backup.

HTH,
Vince
Tape Drives RULE!!!

Re: Exchanging HDD

The best is option is number 3. Make a recovery tape and boot from that tape then restore the tape interactively so you can increase any logical volume on vg00.
Pete Randall
Outstanding Contributor

Re: Exchanging HDD

There's one other option which should be given serious consideration: upgrade your OS to 11.0 or 11i at the same time. HP-UX 10.20 is going off support this coming June.

Pete

Pete
harry d brown jr
Honored Contributor

Re: Exchanging HDD

option 3.
(1) do your make_tape_recovery TWICE (2 times with 2 different tapes).
(2) Do TWO full backups of your data volumes
(3) shut system down.
(4) replace 9gb drive with 18gb drive (verify scsi id)
(5) recover to NEW 18gb drive.
(6) If there are any issues then shutdown and put 9gb drive back. - regroup
(7)relink mirroring
(8) do another make_tape_recovery.

live free or die
harry
Live Free or Die
Sudhakar.J
Advisor

Re: Exchanging HDD

Hi,
U can replace 18gb disk straight away by doing mirroring.But there is a small problem involved in it.That is checkout the MAX_PEs_PER_PV value.U can know this value by executing "vgdisplay -v".If this value supports 18gb then u can straight away replace this 18gb disk.It will be set while creating VG,by default "Max PE per PV" will be the max size of disk in that VG while creating that VG.
Take B/P of /etc/lvmtab file.
If it supports follow these steps.T
1.pvcreate -B /dev/rdsk/"PV_PATH"
2.mkboot /dev/dsk/"PV_PATH"
3.mkboot -a "hpux(;0) /stand/vmunix " "PV_PATH"
4.vgextend /dev/g00 "PV_PATH"
5.lvextend -m 1/dev/vg00/lvol1 /dev/dsk/"PV_PATH"
6.Continue this mirroring for rest of LV's.Keep in note that mirroring order shld be lvol1,lvol2,lvol3(stand,swap and then root only.Otherwise lvlnboot will fail).
"lvlnboot " will run automatically in 10.20 once any changes been made for root VG.
7.Once u completed this mirrororing u can view "lvlnboot -v" Output,so that u will know whether it is successfully mirrored or not.It displays 2 Lv's path for root LV,2 LV's path for boot(stand) LV and 2 LV's path for swap/dump.

Reboot the M/C and check out M/C works fine with full mirroring.

Once it came up now take out that 9gb disk by doing

8.lvextend -m 0 /dev/vg00/lvol9 /dev/dsk/c0t6d0

9.run the same command for root LV's in this order first root,then swap and then stand(exactly reverse process to mirroring).

Check the output of "lvlnboot -v".
10.Run vgreduce vg00 /dev/dsk/c0t6d0

Cross check the output of "lvlnboot -v".

Now reboot M/C and u can extend any LV which u like.By doing lvextend on that LV.

There is one more way where u can take offlie B/P of complete root Disk into Tape and restoring back to another disk.This u can do by booting support plus CD which will come along with OS cds.

Boot thru support plus
CD-->interact with IPL-->no-->
ode-->copyutil-->it will scan all devices and finds out what type of tapes,hard disk u have.then type "backup" it asks from which disk u wanted to backup say the disk index number (which will be listed after scaning by "copyutil" command)and it asks to where
give the index number of tape.
It backsup to tape and the sameway u can restore that to the newdisk.

In this case u wil get back everything what ever was there in the old disk to new disk.
In this way also that Max_PE_PER_PV shld support new 18gb disk.

If both r not going to work out go a head with "ignite ux"
where u can extend LV while restoring OS.

All the Best,
Sudhakar
Bill Hassell
Honored Contributor

Re: Exchanging HDD

Lots of good comments about mirroring. It really works well when the disks are roughly the same size, but in your case, you are doubling the size of the new disk, so the volume group may not let you use the entire new disk.

Another consideration about the mirroring technique is that extending a filesystem, while simple in concept, can really fragment your disk layout. Suppose you need to extend lvol6 and lov7,8,9 follow lvol7. That means that extending lvol6 will create a huge hole in the middle of the volume and accessing random parts will require long seeks about half the time. Using Ignite/UX solves both the vg00 size limitation as well as ensuring that the volumes are contiguous.

And finally, mirroring is *SLOW* to complete. This is due to the 'atomic' mechanism used to ensure that every block is read and copied correctly before committing the block to current status. And all this can take place on an active system although that will slow things down too.

Get a copy of Xvg so you can see the layout in graphics format:

ftp://contrib:9unsupp8@hprc.external.hp.com/sysadmin/xvg/


Bill Hassell, sysadmin
SM_3
Super Advisor

Re: Exchanging HDD

Johannes
you still there

You have superb replies.

Which option did you go for.

I was in a simialr situation-see link
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xd70f6049dbb6d611abdb0090277a778c,00.html

A collogue would not accept the 3rd option, so I needed proof.

Firstly HP support the 3rd option.
Secondly options 1 & 2 are not supported.

We went with option 3.

Bill Hassell mentions important concepts which cannot be ignored.

Let us know what happend.

By the way don't forget to assign points- surely this thread needs a rabbit.

Johannes Siegert
New Member

Re: Exchanging HDD

Thanks a lot to all of you,

I went with option (3).

During the setup - before the actual restore beginns - we made a mistake, because it is a little bit tricky to move around in the menu and specify the correct parameters (or we just didn't take enough time study it). But anyway we had another go and then we did it right and everything was fine.

:)

Option 3 appeared to be a very convenient and save way of how to exchange the root HDD.

I tried to assigned points for you earlier, but somehow they never appeared next to your messages. But finally it looks like you got them. Sorry for the delay.
Johannes Siegert
New Member

Re: Exchanging HDD

Thanks a lot to all of you,

I went with option (3).

During the setup - before the actual restore beginns - we made a mistake, because it is a little bit tricky to move around in the menu and specify the correct parameters (or we just didn't take enough time to study it). But anyway we had another go and then we did it right and everything was fine.

:)

Option 3 appeared to be a very convenient and save way of how to exchange the root HDD.

I tried to assigned points for you earlier, but somehow they never appeared next to your messages. But finally it looks like you got them. Sorry for the delay.
Johannes Siegert
New Member

Re: Exchanging HDD

See attached file for details