Operating System - HP-UX
1827006 Members
2241 Online
109712 Solutions
New Discussion

lvmtab problems when removing disk

 
SOLVED
Go to solution
Lynne Seamans
Regular Advisor

lvmtab problems when removing disk

Had one disk in a mirrored pair go south.

un-mirrored the one lvol that was on the disk, but even with vgreduce -f it said there were PE's still in use... even though i really didn't think there were other lvols on there.

used vgreduce -l vg02 /dev/dsk/c1t0d0
to get bad disk out of there. Seemed to work.

BUT:

the VG is active, however i cannot do a vgcfgbkcp on it cause it says lvmtab is out of date with the running kernel, kernel sees two disks.

vgdisplay -v vg02 shows only one.

file system in one lvol is up and running fine.

I'm confused. On one hand, my system is functional, on the other, there's a weird error and i could have a problem lurking.

Any ideas?
7 REPLIES 7
Hasan  Atasoy
Honored Contributor

Re: lvmtab problems when removing disk

hi lyenne;

did you see any pe in the output of

pvdisplay -v /dev/rdsk/c1t0d0

if you cannot see try to recreate lvmtab by

mv /etc/lvmtab /etc/lvmtab.11012008
vgscan -a


hasan
Lynne Seamans
Regular Advisor

Re: lvmtab problems when removing disk

Thanks for the tips. Here's what i got:

pvdisplay -v /dev/rdsk/c1t0d0
pvdisplay: Physical volume "/dev/rdsk/c1t0d0" is not a block special file.

then when i ran vgscan -a, YIKES, it looks bad:

r:/etc> vgscan -a
Creating "/etc/lvmtab".
Couldn't stat physical volume "/dev/dsk/c3t2d0":
Invalid argument


vgscan: has no correspoding valid raw device file under /dev/rdsk.
Verification of unique LVM disk id on each disk in the volume group
/dev/vg02 failed.




*** LVMTAB has been created successfully.
*** If PV links are configured in the system.
*** Do the following to resync information on disk.
*** #1. vgchange -a y
*** #2. lvlnboot -R

Now vgdisplay -v vg02 says it's not there!

I'm putting the old lvmtab back :)
Hasan  Atasoy
Honored Contributor

Re: lvmtab problems when removing disk

what about

pvdisplay -v /dev/dsk/c1t0d0
and
pvdisplay -v other_disk_in vg02

Hasan
Lynne Seamans
Regular Advisor

Re: lvmtab problems when removing disk

r:/etc> pvdisplay -v /dev/dsk/c1t0d0
pvdisplay: Couldn't find the volume group to which
physical volume "/dev/dsk/c1t0d0" belongs.
pvdisplay: Cannot display physical volume "/dev/dsk/c1t0d0"

r:/etc> pvdisplay -v /dev/dsk/c2t0d0 | more
--- Physical volumes ---
PV Name /dev/dsk/c2t0d0
VG Name /dev/vg02
PV Status available
Allocatable yes
VGDA 2
Cur LV 1
PE Size (Mbytes) 4
Total PE 4340
Free PE 1340
Allocated PE 3000
Stale PE 0
IO Timeout (Seconds) default
Autoswitch On

--- Distribution of physical volume ---
LV Name LE of LV PE for LV
/dev/vg02/loralogs 3000 3000

--- Physical extents ---
PE Status LV LE
00000 current /dev/vg02/loralogs 00000
00001 current /dev/vg02/loralogs 00001
00002 current /dev/vg02/loralogs 00002
00003 current /dev/vg02/loralogs 00003
00004 current /dev/vg02/loralogs 00004
00005 current /dev/vg02/loralogs 00005
00006 current /dev/vg02/loralogs 00006
00007 current /dev/vg02/loralogs 00007
00008 current /dev/vg02/loralogs 00008
00009 current /dev/vg02/loralogs 00009

(lots more)
Hasan  Atasoy
Honored Contributor
Solution

Re: lvmtab problems when removing disk

what about

vgreduce -f vg02

Hasan
Lynne Seamans
Regular Advisor

Re: lvmtab problems when removing disk

Well, it's my production system, and at least it's running OK now.

(university, students moving back, had database down a long time already :( )

I'm going to try that EARLY monday AM.

I'm thinking that is the absolute right answer, and that i can limp along till a better time.

Thank you thank you. I will post a followup as soon as i'm comfortable running our little experiment.
Mridul Shrivastava
Honored Contributor

Re: lvmtab problems when removing disk

First thing.. If you just want to replace the bad disk which is mirrored, it could have been done without reducing the lv and vg. using pvchange -a n
so it will detach the PV from VG and then after replacement execute pvchange -a y to attach it again and restore the vgcfg on the disk.. everything will be as it was earlier.
however since u have already removed the disk from the VG and however kernel information is not updated then vgreduce -f vg02 will remove the disk information from the kernel for the disk which are not present in lvmtab.

So as suggested vgreduce -f should resolve the issue. Please post the outcome after Monday task.
Time has a wonderful way of weeding out the trivial