Operating System - HP-UX
1748219 Members
4514 Online
108759 Solutions
New Discussion юеВ

Re: Replacing a boot disk with LVM

 
SOLVED
Go to solution
KURT HARLESS
Advisor

Replacing a boot disk with LVM

Greetings,

Have I/O read errors on my disk c2t6d0. HP is coming out to replace tonight.
This disk participates in VG00 which has 4 physical disks, c2t3d0 thru c2t6d0. VG00 has 9 LVOLs;
------LVOLS---- --FS------ MIRROR -ALLOC-
/dev/vg00/lvol1 /stand 1 strct/cont
/dev/vg00/lvol2 swap/dump 1 strct/cont
/dev/vg00/lvol3 / 1 strct/cont
/dev/vg00/lvol4 /tmp 1 strict
/dev/vg00/lvol5 /home 1 strict
/dev/vg00/lvol6 /opt 1 strict
/dev/vg00/lvol7 /usr 1 strict
/dev/vg00/lvol8 /var 1 non-strict
/dev/vg00/lvol9 /u09 0 non-strict

# lvlnboot -v /dev/vg00
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/dsk/c2t3d0 (10/0.3.0)
/dev/dsk/c2t5d0 (10/0.5.0)
/dev/dsk/c2t6d0 (10/0.6.0) -- Boot Disk
/dev/dsk/c2t4d0 (10/0.4.0) -- Boot Disk
Boot: lvol1 on: /dev/dsk/c2t6d0
/dev/dsk/c2t4d0
Root: lvol3 on: /dev/dsk/c2t6d0
/dev/dsk/c2t4d0
Swap: lvol2 on: /dev/dsk/c2t6d0
/dev/dsk/c2t4d0
Dump: lvol2 on: /dev/dsk/c2t6d0, 0

Questions:

1) I have emptied LVOL9 and plan on removing it from the volume group. Would it be better to first replace the disk then remove it, or should I remove it, run a vgcfgbackup, replace the disk, then vgcfgrestore.

2) When you remove a lvol, do you have to manually remove the entries from fstab and mnttab?

3) Since c2t6d0 is my primary boot disk, and if I read the lvlnboot above correctly, c2t4d0 is my secondary, do I have to recreate this after replacing the disk, or does the vgcfgrestore rebuild this configuration.

4) If I need to make this a boot disk again, how?

Nervous in Phoenix...

Kurt
"We've come too far, for too long and done too little too much..!"
6 REPLIES 6
James R. Ferguson
Acclaimed Contributor
Solution

Re: Replacing a boot disk with LVM

Hi Kurt:

The following procedure applies:

# Shutdown your system and replace the disk that is failing.

# Boot into single user mode and override the quorum, as:

# ISL> hpux -is -lq /stand/vmunix

# vgcfgrestore -n /dev/vg00 /dev/rdsk/cXtYdZ

# mkboot /dev/rdsk/cXtYdZ

# mkboot -a "hpux -lq /stand/vmunix" /dev/rdsk/CXtYdZ

# lvlnboot -R

# lvlnboot -v #...to verify all is as desired...

# vgchange -a y /dev/vg00

# vgsync /dev/vg00

# shutdown -ry 0

With regard to your other questions:

(1) I'd wait until your reconstruction is complete before removing "lvol9". The less LVM maintenance done while your configuration is brittle, the better.

(2) You will manually remove the "lvol9" mountpoint from /etc/fstab. You do not modify /etc/mnttab. This occurs naturally as a consequence of mounting and unmounting filesystems.

(3/4) The 'lvlnboot -R' updates the BDRA of each bootable disk.

Regards!

...JRF...
Byron Myers
Trusted Contributor

Re: Replacing a boot disk with LVM

1. either way is fine. This is an independent task from replacing a disk.
2. Yes, you need to remove the associated entry in fstab.
3 & 4). To replace a mirrored boot disk:
# vgcfgrestore -n /dev/vg00
# mkboot /dev/rdsk/
# mkboot -a "hpux (;0)/stand/vmunix" /dev/rdsk/
# lvlnboot -R

For older systems, you need to be in single user mode to do this - booted with no disk quorum:
reboot
interrupt boot sequence
interact with ISL
ISL> hpux -is -lq /stand/vmunix

I believe the you can hot-swap boot disks in the newer N's and L's.
If you can focus your eyes far and straight enough ahead of yourself, you can see the back of your head.
KURT HARLESS
Advisor

Re: Replacing a boot disk with LVM

These forums and your answers are awesome!

One additional dumb question;

What is the difference between /dev/dsk & /dev/rdsk ?

Thanks again, not sooooo nervous in Phoenix

Kurt
"We've come too far, for too long and done too little too much..!"
Sanjay_6
Honored Contributor

Re: Replacing a boot disk with LVM

Hi Kurt,

Like the other have already said,

1.) Remove the lvol9 after your disk change and things are over.

2.) you have to manually edit /etc/fstab and remove the entry corresponding to lvol9

3.) after replacing the disk, boot using your second boot disk, say it is set as alt boot path
bo alt 'or' bo
boot in single user mode overiding the quorum.
ISL> hpux -is -lq (;0)/stand/vmunix
vgcfgrestore -n /dev/vg00 /dev/rdsk/c2t6d0
mkboot /dev/rdsk/c2t6d0
mkboot -a "hpux (;0)/stand/vmunix" /dev/rdsk/c2t6d0
lvlnboot -R

Reboot the box, again reboot using your second disk
bo alt
Do vgsync to syncronise the data
vgsync /dev/vg00
Then reboot again using c2t6d0.

If you are trying to do vgsync in single user mode at the first boot, you have to manually mount the rest of the filesystems, i think.

Hope this helps

Thanks
Sanjay_6
Honored Contributor

Re: Replacing a boot disk with LVM

Hi Kurt,

/dev/dsk refers to the block device , /dev/rdsk refer to the character device or the raw device.

Hope this helps.

Thanks
KURT HARLESS
Advisor

Re: Replacing a boot disk with LVM

Thanks to everyone, the operation was a complete success.

Kurt
"We've come too far, for too long and done too little too much..!"