1827807 Members
2670 Online
109969 Solutions
New Discussion

vgscan errors

 
Todd McDaniel_1
Honored Contributor

vgscan errors

All:

I have a strange issue that occured after I had a crash of my boxes.

One of my root disks was blown away as a result and I have replaced the disk physically and re-mirrored. Everything seems to be fine. Also, I had to blow away 3 lvols that I needed to recreate that had superblock issues that were easy to restore, non OS related Lvols.

Now my issue is that I can't seem to get a clean vgscan to create a new clean lvmtab. Everytime I run vgscan VG vg00 is removed from the lvmtab and dont know why.

How can i fix this?

Here is the error message from vgscan -av:

======================================
chp003g-root:/root/LVMcommands/Fix.vg00
# vgscan -av
Creating "/etc/lvmtab".

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/vg00 failed.

Unix, the other white meat.
17 REPLIES 17
Todd McDaniel_1
Honored Contributor

Re: vgscan errors

I have recreated the devices under /dev/dsk and /dev/rdsk but for some reason its not recognizing them.

is there some other step i need to do for that to be kosher?
Unix, the other white meat.
James R. Ferguson
Acclaimed Contributor

Re: vgscan errors

Hi Todd:

Did you perform a 'vgcfgrestore' as part of your replacement? Do you have '/dev/rdsk/' files for all devices that belong to 'vg00'?

Too, when recreating '/etc/lvmtab' you should rename the current copy before the 'vgscan' so old information in the old file is not factored into the rebuild.

Regards!

...JRF...
Todd McDaniel_1
Honored Contributor

Re: vgscan errors

yes i did move the lvmtab out of the way and recreated it...

I havent done a vgcfgrestore but I did reboot the box to check my boot capabilities.
Unix, the other white meat.
Todd McDaniel_1
Honored Contributor

Re: vgscan errors

both root disks are in the VG00 and mirrored with no error. I would think the reboot would help my case for the lvmtab, but it didnt.

I cant do a vgcfgrestore now since the disk is already in the VG unless I remove it according to this error.


======================================

# vgcfgrestore -n /dev/vg00 -o /dev/rdsk/c2t8d0 /dev/rdsk/c0t8d0
vgcfgrestore: Cannot restore Physical Volume "/dev/dsk/c0t8d0",
Detach the PV or detactivate the VG, before restoring the PV.
Unix, the other white meat.
Todd McDaniel_1
Honored Contributor

Re: vgscan errors

Here are my devices.... they appear to be fine to my untrained eye.

===================================
# ll /dev/rdsk/c?t8d0
crw-r----- 1 bin sys 188 0x008000 Sep 11 12:35 /dev/rdsk/c0t8d0
crw-r----- 1 bin sys 188 0x028000 Sep 11 12:35 /dev/rdsk/c2t8d0


# ll /dev/dsk/c?t8d0
brw-r----- 1 bin sys 31 0x008000 Sep 11 12:49 /dev/dsk/c0t8d0
brw-r----- 1 bin sys 31 0x028000 Sep 11 12:49 /dev/dsk/c2t8d0
Unix, the other white meat.
Todd McDaniel_1
Honored Contributor

Re: vgscan errors

Here is another problem i found... When i tried to backup my configuration. which led me to my creating this thread.

===================================
# vgcfgbackup vg00
vgcfgbackup: /etc/lvmtab is out of date with the running kernel:Kernel indicates
3 disks for "/dev/vg00"; /etc/lvmtab has 2 disks.
Cannot proceed with backup.

Unix, the other white meat.
KapilRaj
Honored Contributor

Re: vgscan errors

Did the disk device file name change after the replacement ?. In that case, please do a vgreduce -f ( I forgot but there is a way to get rid of ghost devices)

Regds,

Kaps
Nothing is impossible
Todd McDaniel_1
Honored Contributor

Re: vgscan errors

The device name shouldn't have changed b/c we replaced the disk in the same slot.

There are no ghost devices that I can tell. I don't get the typical message for that error.

I may try to restore the raw devices from a backup before the crash and see what I get. Hopefully that will fix the problem and I can move on with this.
Unix, the other white meat.
Alzhy
Honored Contributor

Re: vgscan errors

mv /etc/lvmtab /etc/lvmtab.1

Then do a preview vgscan:

vgscan -p -v -a

What does the system complain?
Hakuna Matata.
Patrick Wallek
Honored Contributor

Re: vgscan errors

What does a 'vgdisplay -v vg00' show? Is there a phantom disk for vg00?

Post the results back, please.
Todd McDaniel_1
Honored Contributor

Re: vgscan errors

There are no phantom disks in vg00 when I run vgdisplay. It has normal output.


vgscan output below. I have recreated the disk devices from backup and by rmsf and recreating them with insf -e.

===============================
# vgscan -av
Creating "/etc/lvmtab".

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/vg00 failed.
Unix, the other white meat.
Alzhy
Honored Contributor

Re: vgscan errors

Run ioscan;insf -e

It should rebuild all your RAW devices that are missing...

Hakuna Matata.
Todd McDaniel_1
Honored Contributor

Re: vgscan errors

yep already done that multiple times and even restored them from a backup.
Unix, the other white meat.
Alex Georgiev
Regular Advisor

Re: vgscan errors

Well, looks like you've tried a lot of things, so that kind of leaves patches as a suspicion.

How recent are your LVM patches; specifically the LVM commands cumulative patches? Are you running 11.0 or 11i?

Also, can you show us the output of 'strings /etc/lvmtab' and 'strings /etc/lvmtab.1'?

Also, I know you say that there are no ghost disks, but have you run 'lvdisplay -kv' on one (or all) of the mirrored LVs?

Now that I think about it, what I might do in your situation is to reduce LVs in vg00 to a single copy (no mirrored LVs). Then I would remove the newly installed PV from vg00.

I would also do 'pvremove /dev/rdsk/c?t8d0'.

Then try another vgscan.

I would also dust off the ignite tapes just in case. :-(
Alex Georgiev
Regular Advisor

Re: vgscan errors

Todd, did you find a solution? I'd like to know how this turned out, and what the problem was.
Bernhard Mueller
Honored Contributor

Re: vgscan errors

Todd,

I think you did not remove the broken disk from vg00, but used the replacement disk with the same device file to add a mirror, right?

vgdisplay vg00 then tells you you have 3 disks but only 2 active.

so for each lvol you run lvdisplay -v -k
the -k gives you the "key" which you have to use in order to remove the old disk and lvol extents from the LVM header (since the device file is not unique) the extents will be displayed with "????" instead of current or stale.

i.e you need to use lvreduce -k to remove all those mirrors and when you are through you can just vgreduce -f vg00 to get rid of the dead PV.

that should settle it.

Regards
Bernhard
Prashanth.D.S
Honored Contributor

Re: vgscan errors

Hi Todd,

Am not a champion in LVM but as i understand this error occurs when a group files are not removed from the non-existant vg's can you please check that once.

Best Regards,
Prashanth