Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vgscan fails after HPUX Mirrordisk was installed 1

Status
Not open for further replies.

abbysux

Technical User
Oct 8, 2001
9
0
0
DE
It´s not possible to use only SAM for mirroring a disk.
I had only success by using the commands in a shell.

1. pvcreate -B -f /dev/rdsk/c2t5d0
2 .vgextend /dev/vg00 /dev/dsk/c2t5d0
3. mkboot /dev/dsk/c2t5d0
4. mkboot -a "hpux -lq" /dev/dsk/c2t5d0
5. mkboot -a "hpux -lq" /dev/dsk/c2t6d0
6. lvlnboot -R
for i in `ls /dev/vg00/lvol*`
do
lvextend -m 1 $i
done


In my tests changing a corrupted hard disk I had problems
with installing the new one in the existing mirroring system. Unfortunately I used vgscan and
it fails with a core dump after HPUX Mirrordisk was installed.
The result was, that /etc/lvmtab is corrupted and a reboot of the system fails. I´m using HP-UX 10.20.
How can I recreate the /etc/lvmtab??
 
Once you have booted off of one of the good disks (mirrored I hope) you need to do these three steps.

# vgcfgrestore -n /dev/vg00 /dev/rdsk/c2d5t0
# vgchange -a y /dev/vg00
# vgsync /dev/vg00

The vgcfgrestore is what re-builds the /etc/lvmtab file, assuming you have a good mirrored copy.
crowe
 
In the meantime I have found my own solution for the problem, but it is a much longer process than your way.

Thanks for the help, I really appreciate it.

Here my version:

After installing a new HD (e.g. /dev/dsk/c2t5d0 was bad)
reboot the system

1. Free pysical extends.

# lvreduce -A n -m 0 /dev/vg00/lvol1
# lvreduce -A n -m 0 /dev/vg00/lvol2
# lvreduce -A n -m 0 /dev/vg00/lvol3

2. Set cur PV and act PV equal

# vgreduce -f /dev/vg00

3. Remove the Mirror Disk Software from the system
by using

# swremove

Don't forget you need a backup of the software to reinstalling it. Otherwise forget this method.

After rebooting.

4. Re-crerate /etc/lvmtab (only the boot disk will be inserted)

save /etc/lvmtab to another file
remove /etc/lvmtab
use vgscan -v to re-create /etc/lvmtab

Vgscan works correctly without any core dump

5. Re-install the Mirror Disk Software
wtih
# swinstall

6. Use the steps for mirroring a disk
pvcreate
vgextend
mkboot
lvextend
lvlnboot

as descripte before



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top