1826378 Members
4188 Online
109692 Solutions
New Discussion

lvmtab file

 
SOLVED
Go to solution
Scott Guy_2
Advisor

lvmtab file

Ok, I recently lost one of my boot disks and just had it replaced. I'm trying to re-establish the mirror with the other disk, but with the disk still being listed in the /etc/lvmtab file, I'm getting nowhere. I can't put the disk back in the volume group, can't mirror logical volumes, etc.

Maybe I'm going about this the wrong way. Any help would be greatly appreciated. BTW, I'm running 11.0
9 REPLIES 9
Pete Randall
Outstanding Contributor

Re: lvmtab file

Scott,

Try copying the lvmtab file to lvmtab.bak and then re-create it with vgscan -a.


Pete

Pete
Steve Steel
Honored Contributor

Re: lvmtab file

Hi

vgreduce should help

see man page examples




Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Patrick Wallek
Honored Contributor
Solution

Re: lvmtab file

The way I usually replace hot-swappable boot disks:

Pull the bad disk
Insert the new disk

# ioscan -fnC disk
to make sure the new disk is available

# vgchange -a y vg00

# vgcfgrestore -n vg00 /dev/dsk/c?t?d0

# vgsync vg00

And that does it.

A good reference for replaceing disks:
HP Software Recovery Handbook - Chapter 16 - LVM
http://www1.itrc.hp.com/service/iv/node.do?node=prodITRC%2FWW_Start%2FN1%7C16%7C11

Look for the section on replacing disks.
melvyn burnard
Honored Contributor

Re: lvmtab file

have you vgcfgrestored onto the replaced drive?
This should set it up readsy again, then use vgsync to synchronise the mirrors.
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Todd McDaniel_1
Honored Contributor

Re: lvmtab file

It should have taken the same device name...and recognized it as well. try to ioscan -f and insf -e after a vgscan. Remember to move the old /etc/lvmtab.


Else, pvcreate the disk, then try to add it.
If not, then you may need to remove the mirror then add the disk to the VG then restablish the mirrors.
Unix, the other white meat.
Cesare Salvioni
Trusted Contributor

Re: lvmtab file

hi

use vgrestore, if you didn't change the default, you should have a backup of vg configuration. The command vgrestore will restore the tables needed by LVM on the new disk

Let's say c0t6d0 is the disk replaced and vg00 is the name of your vg

first
pvcreate -B /dev/rdsk/c6t0d0
mkboot /dev/rdsk/c6t0d0
vgrestore vg00 /dev/dsk/c6t0d0

After this you should have the vg restored.
Try vgdisplay to see if both disks are seen
All you have to do is a vgsync to resync the lv copies

Maybe some commands need raw device instead of block device or viceversa, anyway the command will tell you. Only be sure to use the correct special file !!!

Hope it helps
Cesare Salvioni
Trusted Contributor

Re: lvmtab file

ooppps
vgcfgrestore, not vgrestore

hope this helps
Scott Guy_2
Advisor

Re: lvmtab file

Thanks everybody. Everything is back to normal.

Todd McDaniel_1
Honored Contributor

Re: lvmtab file

Scott

What did you do?


No points please.
Unix, the other white meat.