1837835 Members
2333 Online
110121 Solutions
New Discussion

Re: lvlnboot -R Error

 
Paul van der Mee
New Member

lvlnboot -R Error

Hi

I'm trying to make mirroring working on an hp9000 server with HP-UX 10.20.
I'm doing the following:
==================================
#!/bin/sh
echo"*** WARNING ***"
echo "This script will create a new physical volume"
echo "on the disk c0t6t0."
echo "Do not run this script if you do not want to"
echo "re-create a disk!!!"
echo " "
echo "Do you want to continue [Yes/No]?"
read a
if [ "$a" != "Yes" ]
then
exit 0
fi
echo "Creating Physical Volume c0t6t0..."
pvcreate -f -B /dev/rdsk/c0t6d0
echo "Making Boot Device..."
mkboot /dev/rdsk/c0t6d0
mkboot -a "hpux (;0)/stand/vmunix" /dev/rdsk/c0t6d0
echo "Extending vg00..."
vgextend /dev/vg00 /dev/dsk/c0t6d0
lvlnboot -v
lvlnboot -R


===========
#!/bin/sh
echo "*** WARNING ***"
echo "This script will create a new physical volume"
echo "on the disks c0t5d0 c0t4d0 c0t3d0."
echo "Do not run this script if you do not want to"
echo "re-create these disks!!!"
echo " "
echo "Do you want to continue [Yes/No]?"
read a
if [ "$a" != "Yes" ]
then
exit 0
fi
for i in c0t5d0 c0t4d0 c0t3d0 do
echo "creating Physical Volume ${i}..."
pvcreate -f /dev/rdsk/$i
done
echo "extending vg01..."
vgextend /dev/vg01 /dev/dsk/c0t5d0
echo "extending vg02..."
vgextend /dev/vg02 /dev/dsk/c0t4d0
echo "extending vg03..."
vgextend /dev/vg03 /dev/dsk/c0t3d0
echo "updating lvmconf..."
lvlnboot -R
=======================
with the script it gives the following error:
Volume group /dev/vg00 has been succesfully extenden
vgcfgbackup: IO error on physical volume device /dev/rdsk/c0t5d0: bad file number

anybody knows what is wrong and how i can solve this

Thanks

Paul van der Mee
5 REPLIES 5
Bill McNAMARA_1
Honored Contributor

Re: lvlnboot -R Error

You yould change your auto file in the mkboot but that's not your problem..

In either case don't reinvent the wheel here is a good script (Andreas Voss' script attachment) to create mirrored boot disks.

http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0x9f86dfe5920fd5118fef0090279cd0f9,00.html

Your problem seems to be with the c0t5d0 volume group.
You may want to verify that from an
ll /dev/*/group that vg01 exists and that it's group file is unique in terms of the mknod id and that in fact c0t5d0 does exits from ioscan -fnkCdisk.

Can you put set -x into the top of your script and run it again and post up the output. We'll see exactly then where the script is failing. Although I'd recommend to put more testing for validity there first..
Modify the script in the post above.

Later,
Bill
It works for me (tm)
Peggy Fong
Respected Contributor

Re: lvlnboot -R Error

Hi
I believe you should not run lvlnboot -R until you have defined lvols in the vg and in fact you should really run this only after you have created the boot, swap, stand, dump lvols with the lvlnboot command. Then you would run lvlnboot -R to sync up the LABEL on the disks in the vg00 group. So your error is probably because none of this data exists.

Peggy
Shahul
Esteemed Contributor

Re: lvlnboot -R Error


Hi

I am not able to find any mistake in ur script. Can U give some more details like ur old strings /etc/lvmtab, And what exactly U are going to do now? How many HDD U are going to add...etc


Shahul
Wieslaw Krajewski
Honored Contributor

Re: lvlnboot -R Error

Hi,

1. I agree with Shahul's answer, there are no mistakes in your scripts. So, please give some extra info relating to your problem.

2. You can run lvlnboot -R at any time, no needs to do anything before. However this command relates to the boot volume group, so I do not feel, why you run it in the second script. So after which lvlnboot -R you obtain error message.

3. Try to run all these commands manually, without script to check if the same error message appears.

Rgds.
Permanent training makes master
Ajitkumar Rane
Trusted Contributor

Re: lvlnboot -R Error

Hi paul,

Basically If you read the error message correctly it says vgcfgbackup: I/O error on pv c0t5d0. I suspect you must be having bad blocks on the disk c0t5.try changing the disk.
Also you need to run lvlnboot -R only when you do changes to the root, boot, swap and dump lvols. and not for other lvols.Here in your first script you are just adding a disk to the VG00 so you need not mot run lvlnboot -R , its basically when you mirror the r b s d lvols

Goodluck.
Amidsts difficulties lie opportunities