Operating System - HP-UX
1848762 Members
6013 Online
104036 Solutions
New Discussion

How to upgrade OS 9GB to 18GB Drives

 
Roland Rebstock_1
Frequent Advisor

How to upgrade OS 9GB to 18GB Drives

All, I am planning upgrade the OS Drives in a N-Class 4000 with HPUX 11. Was wondering if someone could look at what I beleive needs to be done and confirm: "is there a easier way?
here are all the vol's on OS drive
/dev/vg00/lvol3 52% /
/dev/vg00/lvol1 33% /stand
/dev/vg00/lvol8 66% /var
/dev/vg00/lvol7 89% /usr
/dev/vg00/lvol6 30% /tmp
/dev/vg00/lvol5 90% /opt
/dev/vg00/lvol4 84% /home
/dev/vg00/lvol2 swap
/dev/vg00/swap swap

Physical Disk Drives - c1t6d0 c2t6d0

Reduce the Mirrors
lvreduce -m 0 /dev/vg00/lvol1 /dev/dsk/c2t6d0
lvreduce -m 0 /dev/vg00/lvol2 /dev/dsk/c2t6d0
lvreduce -m 0 /dev/vg00/lvol3 /dev/dsk/c2t6d0
lvreduce -m 0 /dev/vg00/lvol4 /dev/dsk/c2t6d0
lvreduce -m 0 /dev/vg00/lvol5 /dev/dsk/c2t6d0
lvreduce -m 0 /dev/vg00/lvol6 /dev/dsk/c2t6d0
lvreduce -m 0 /dev/vg00/lvol7 /dev/dsk/c2t6d0
lvreduce -m 0 /dev/vg00/lvol8 /dev/dsk/c2t6d0
lvreduce -m 0 /dev/vg00/swap /dev/dsk/c2t6d0

Pull out disk in slot 0/0/2/1.6.0 and replace with 18GB drive

ioscan -fnC disk
vgcfgrestore -n vg00 /dev/rdsk/c2t6d0
vgchange -a y vg00
mkboot -l /dev/rdsk/c2t6d0
mkboot -a "hpux -lq (;0")/stand/vmunix" /dev/rdsk/c2t6d0
lvlnboot -R

Remirror
lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c2t6d0
lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c2t6d0
lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c2t6d0
lvextend -m 1 /dev/vg00/lvol4 /dev/dsk/c2t6d0
lvextend -m 1 /dev/vg00/lvol5 /dev/dsk/c2t6d0
lvextend -m 1 /dev/vg00/lvol6 /dev/dsk/c2t6d0
lvextend -m 1 /dev/vg00/lvol7 /dev/dsk/c2t6d0
lvextend -m 1 /dev/vg00/lvol8 /dev/dsk/c2t6d0
lvextend -m 1 /dev/vg00/swap /dev/dsk/c2t6d0

Confirm boot volumes are configured properly
lvlnboot -r /dev/vg00/lvol3
lvlnboot -b /dev/vg00/lvol1
lvlnboot -s /dev/vg00/lvol2
lvlnboot -d /dev/vg00/lvol2
lvlnboot -s /dev/vg00/swap

Verify
vgdisplay -v

shutdown server
replace c1t6d0 with 18gb drive
turn on server and stop it at 10sec prompt
boot onto alt root with "boot alt"
ioscan -fnC c1t6d0
vgcfgrestore -n vg00 /dev/rdsk/c2t6d0
vgcahnge -a y vg00
mkboot -l /dev/rdsk/c1t6d0
mkboot -a "hpux -lq (;0)/stand/vmunix?" /dev/rdsk/c1t6d0
lvlnboot -R
lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c1t6d0
lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c1t6d0
lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c1t6d0
lvextend -m 1 /dev/vg00/lvol4 /dev/dsk/c1t6d0
lvextend -m 1 /dev/vg00/lvol5 /dev/dsk/c1t6d0
lvextend -m 1 /dev/vg00/lvol6 /dev/dsk/c1t6d0
lvextend -m 1 /dev/vg00/lvol7 /dev/dsk/c1t6d0
lvextend -m 1 /dev/vg00/lvol8 /dev/dsk/c1t6d0
lvextend -m 1 /dev/vg00/swap /dev/dsk/c1t6d0
lvlnboot -r /dev/vg00/lvol3
lvlnboot -b /dev/vg00/lvol1
lvlnboot -s /dev/vg00/lvol2
lvlnboot -d /dev/vg00/lvol2
lvlnboot -s /dev/vg00/swap

Done
19 REPLIES 19
RAC_1
Honored Contributor

Re: How to upgrade OS 9GB to 18GB Drives

Your procedure sounds OK.
But one thing to warn you about. vg's no. of PEs are limited with -e option used at the time of vg creation. If you used defaults, you will not be able to use full space on 18GB disk.

I am not sure about ignite. But ignite gives option of resizing partitions.

Prepare ignite tape and resore on new disk.
There is no substitute to HARDWORK
Pete Randall
Outstanding Contributor

Re: How to upgrade OS 9GB to 18GB Drives

I think you're going to end up only utilizing 9GB of the 18GB drives because your max PE and PE size will still be set for the 9GB drives.

I would take an Ignite make_tape_recovery backup of your root vg, pull a 9GB drive, replace it with an 18, then restore onto it. If everything is successful, then it's only a matter of re-establishing your mirroring on the other 18GB drives.


Pete

Pete
RAC_1
Honored Contributor

Re: How to upgrade OS 9GB to 18GB Drives

Also you need to user following, else you won't be able to use ODE tools.

mkboot -b /usr/sbin/diag/lif/updatediaglif -p ISL -p HPUX -p AUTO -p LABEL -p PAD
/dev/rdsk/c0t8d0
updatediaglif2 it is 64 bit kernel
There is no substitute to HARDWORK
Artyom Voronchihin
Respected Contributor

Re: How to upgrade OS 9GB to 18GB Drives

Hello!
The safest and IMHO the fastest way is to make Ignite tape, replace disks, boot from the tape and set appropriate parameters for LVs in interactive mode during the boot. As Pete said it'll also automatically adjust max PE for 18GB.
"Intel inside" is not a label, it's a warning.
Roland Rebstock_1
Frequent Advisor

Re: How to upgrade OS 9GB to 18GB Drives

should I use make_net_recovery instead?
Pete Randall
Outstanding Contributor

Re: How to upgrade OS 9GB to 18GB Drives

In all honesty, I never use make_net_recovery but that's just personal preference. It should work fine.


Pete

Pete
Roland Rebstock_1
Frequent Advisor

Re: How to upgrade OS 9GB to 18GB Drives

any ideas on how much space is required in /var on the ignite box to do a make_tape_recovery -s servername -x inc_entire=vg00 ?

Im going to test in our lab 1st...
Roland Rebstock_1
Frequent Advisor

Re: How to upgrade OS 9GB to 18GB Drives

Any ideas on what is causing this? does something other than ssh need to allow connections? rlogin or ftp, the systems have been hardend

ignite{root}:/usr/sbin
# make_tape_recovery -s 10.200.69.12 -x inc_entire=vg00
* Creating NFS mount directories for configuration files.

======= 03/24/05 12:02:27 EST Started make_tape_recovery. (Thu Mar 24
12:02:27 EST 2005)
@(#) Ignite-UX Revision B.3.4.115
@(#) net_recovery (opt) $Revision: 10.547 $

* Testing pax for needed patch
* Passed pax tests.
* Checking Versions of Recovery Tools
ERROR: Connnection to the server:10.200.69.12 failed.
Roland Rebstock_1
Frequent Advisor

Re: How to upgrade OS 9GB to 18GB Drives

does make_tape_recovery have to be done on the client server which the specifies the ignite server? I think I was doing this backwards, my client server does not have make_tape_recovery installed
Roland Rebstock_1
Frequent Advisor

Re: How to upgrade OS 9GB to 18GB Drives

All, I was able to mirror from a 9GB to a 18GB on our lab Nclass successfully, break the 9GB mirror, boot from the 18GB device, create a 6GB swap volume, extend /var /opt and /usr by 1GB per to use the entire 18GB volume.

# bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 102400 29806 68060 30% /
/dev/vg00/lvol1 99669 39419 50283 44% /stand
/dev/vg00/lvol8 978944 551412 400834 58% /var
/dev/vg00/lvol7 978944 651358 307138 68% /usr
/dev/vg00/lvol6 524288 9174 482982 2% /tmp
/dev/vg00/roland 3067904 1855 2874428 0% /roland
/dev/vg00/lvol5 978944 209998 720945 23% /opt
/dev/vg00/lvol4 5120000 2365 4797789 0% /home
/dev/vg00/roland1 2097152 1614 1964574 0% /roland1
bsdos{root}:/root
# swapinfo
Kb Kb Kb PCT START/ Kb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 2097152 0 2097152 0% 0 - 1 /dev/vg00/lvol2
dev 3072000 0 3072000 0% 0 - 0 /dev/vg00/swap
reserve - 33444 -33444
memory 746104 17484 728620 2%
bsdos{root}:/root
--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 11
Open LV 11
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 2500
VGDA 4
PE Size (Mbytes) 4
Total PE 4669
Alloc PE 4668
Free PE 1
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
Pete Randall
Outstanding Contributor

Re: How to upgrade OS 9GB to 18GB Drives

Roland,

Look at your "PE size" and your "Max PE per PV" figure!


Pete

Pete
TwoProc
Honored Contributor

Re: How to upgrade OS 9GB to 18GB Drives

Roland - Pete nailed it - while you did swap out the disks, I don't think you're going to be able to use but 10G of that disk.
We are the people our parents warned us about --Jimmy Buffett
Roland Rebstock_1
Frequent Advisor

Re: How to upgrade OS 9GB to 18GB Drives

looks like im using make_tape_recovery when I do this in production. I had to try it in the lab just to see and if you dont reboot you can actually use the additional 9gb and create filesystem, the reboot kills them...
Pete Randall
Outstanding Contributor

Re: How to upgrade OS 9GB to 18GB Drives

I hate to be the bearer of bad tidings (again), Roland, but that is simply not true. With your mirroring method, you're creating an exact copy of your existing disk and the resulting VG is still going to have a maximum of 2500 4Mb physical extents. The way I do math, that comes out to about 10Gb and you will never, I repeat, never be able to use the remaining 8Gb of space on your 18Gb drive.


Pete

Pete
Roland Rebstock_1
Frequent Advisor

Re: How to upgrade OS 9GB to 18GB Drives

Proof it does work until you reboot is in
my above response or least it looked ok, thats a 18GB disk, look at the filesystem and swapinfo volume sizes... It died when I rebooted and the system failed to mount /home, /roland1 and the other swap partition
Pete Randall
Outstanding Contributor

Re: How to upgrade OS 9GB to 18GB Drives

Roland,

When you first run vgcfgrestore on the 18Gb disk, it restores the VG definitions exactly as they previously existed - there is no process that accounts for the different sized disk. That VG is created with 2500 4Mb physical extents and it stays that way, reboot or not!


Pete

Pete
Roland Rebstock_1
Frequent Advisor

Re: How to upgrade OS 9GB to 18GB Drives

agree'd Pete, I had to find out the hard way, thank god it was in my lab LOL... Now Ive gotta find space to do the make_tape_restore on our ignite server... :( BTW, Im trying to assign points but dont see the point drop downs.
Roland Rebstock_1
Frequent Advisor

Re: How to upgrade OS 9GB to 18GB Drives

I found a shorter way or at least a way to get around make_tape_recovery check it out...

X) How to create a secondary boot disk
Note: This will create an identical copy of the current vg00. The
new volume group needs to as big as vg00. This will also be a static
version of the primary boot disk which could be use in case of
problem.

Note: The following example is using the disk c1t6d0 and the
volume group vg01

1) Initialize the disk and make it bootable
pvcreate -B /dev/rdsk/c1t6d0
Note: the -B parameter tells pvcreate that this will be a bootable
disk.
mkboot /dev/dsk/c1t6d0
mkboot -a "hpux" /dev/rdsk/c1t6d0
2) Create the volume group
mkdir /dev/vg01
mknod /dev/vg01/group c 64 0x010000
vgcreate /dev/vg01 /dev/dsk/c1t6d0
3) Find the size of each logical volume in vg00
vgdisplay -v /dev/vg00 | more
look at LV Size (Mbytes) for each logical volume and note it.
Note: this example will use these value:
lvol1 84M
lvol2 256M
lvol3 140M
lvol4 500M
lvol5 64M
lvol6 20M
lvol7 500M
lvol8 500M

Note: The size of the new logical volumes needs to be exactly the
same as the size of the logical volumes on the primary root disk.
4) Create the first 3 logical volumes contiguous (needed by the system)
lvol1:
lvcreate -L 84 -C y -r n /dev/vg01
lvol2:
lvcreate -L 256 -C y -r n /dev/vg01
lvol3:
lvcreate -L 140 -C y -r n /dev/vg01
5) Now create the other logical volumes
lvol4:
lvcreate -L 500 /dev/vg01
lvol5:
lvcreate -L 64 /dev/vg01
lvol6:
lvcreate -L 20 /dev/vg01
lvol7:
lvcreate -L 500 /dev/vg01
lvol8:
lvcreate -L 500 /dev/vg01
6) Copy each logical volume except the swap which is usually lvol2.
dd if=/dev/vg00/rlvol1 of=/dev/vg01/rlvol1 bs=1024k
dd if=/dev/vg00/rlvol3 of=/dev/vg01/rlvol3 bs=1024k
dd if=/dev/vg00/rlvol4 of=/dev/vg01/rlvol4 bs=1024k
dd if=/dev/vg00/rlvol5 of=/dev/vg01/rlvol5 bs=1024k
dd if=/dev/vg00/rlvol6 of=/dev/vg01/rlvol6 bs=1024k
dd if=/dev/vg00/rlvol7 of=/dev/vg01/rlvol7 bs=1024k
dd if=/dev/vg00/rlvol8 of=/dev/vg01/rlvol8 bs=1024k
7) Verify the integrity of all the new volume except swap.
Note: The following lines are base on a system with vxfs
filesystems except for /stand (lvol1) which needs to be hfs.
fsck -F hfs /dev/vg01/rlvol1
fsck -F vxfs /dev/vg01/rlvol3
fsck -F vxfs /dev/vg01/rlvol4
fsck -F vxfs /dev/vg01/rlvol5
fsck -F vxfs /dev/vg01/rlvol6
fsck -F vxfs /dev/vg01/rlvol7
fsck -F vxfs /dev/vg01/rlvol8
8) Now configure the Boot Data Reserved Area (BDRA)
Note: The following commands assume that /stand is lvol1,
swap is lvol2 and / is lvol3
lvlnboot -b /dev/vg01/lvol1 /dev/vg01
lvlnboot -r /dev/vg01/lvol3 /dev/vg01
lvlnboot -s /dev/vg01/lvol2 /dev/vg01
lvlnboot -d /dev/vg01/lvol2 /dev/vg01
9) Modify the fstab file on the new disk.
a) If /tmp_mnt doesn't exist create it
mkdir /tmp_mnt
b) Mount the new root filesystem on /tmp_mnt
mount /dev/vg01/lvol3 /tmp_mnt
c) change to etc directory on the new disk.
cd /tmp/etc
d) Modify all occurence of vg00 in the fstab for vg01
sed "s/vg00/vg01/" fstab > fstab.out
mv fstab fstab.BAK
mv fstab.out fstab
e) Unmount the new root filesystem
cd /
umount /tmp_mnt

reboot
Main Menu: Enter command or menu > boot alt
Interact with IPL (Y, N, or Cancel)?> n

Booting...
Boot IO Dependent Code (IODC) revision 1


HARD Booted.

ISL Revision A.00.38 OCT 26, 1994

ISL booting hpux

Boot
: disk(0/0/2/1.6.0.0.0.0.0;0)/stand/vmunix
7008256 + 834760 + 971160 start 0x2435e8
--- Volume groups ---
VG Name /dev/vg01
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 8
Open LV 8
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 4341
VGDA 2
PE Size (Mbytes) 4
Total PE 4340
Alloc PE 4042
Free PE 298
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vg01/lvol1
LV Status available/syncd
LV Size (Mbytes) 100
Current LE 25
Allocated PE 25
Used PV 1

LV Name /dev/vg01/lvol2
LV Status available/syncd
LV Size (Mbytes) 2048
Current LE 512
Allocated PE 512
Used PV 1

LV Name /dev/vg01/lvol3
LV Status available/syncd
LV Size (Mbytes) 100
Current LE 25
Allocated PE 25
Used PV 1

LV Name /dev/vg01/lvol4
LV Status available/syncd
LV Size (Mbytes) 400
Current LE 100
Allocated PE 100
Used PV 1

LV Name /dev/vg01/lvol5
LV Status available/syncd
LV Size (Mbytes) 3824
Current LE 956
Allocated PE 956
Used PV 1

LV Name /dev/vg01/lvol6
LV Status available/syncd
LV Size (Mbytes) 2048
Current LE 512
Allocated PE 512
Used PV 1

LV Name /dev/vg01/lvol7
LV Status available/syncd
LV Size (Mbytes) 3824
Current LE 956
Allocated PE 956
Used PV 1

LV Name /dev/vg01/lvol8
LV Status available/syncd
LV Size (Mbytes) 3824
Current LE 956
Standard input


Pete Randall
Outstanding Contributor

Re: How to upgrade OS 9GB to 18GB Drives

In this case, since you're creating a new VG, you won't run into the size issue and this should work just fine!

As to assigning points, you'll need to log in as the same ID that you originally opened the question with. You apparently have two Roland Rebstock IDs and only the one that originally posted the question is going to see the drop down points assignment boxes. The other is like any other responder - waiting for points.


Pete

Pete