1836535 Members
3775 Online
110102 Solutions
New Discussion

error creating vg in SAM

 
SOLVED
Go to solution
MarkW_1
Regular Advisor

error creating vg in SAM

A vendor working on our new N class box accidentally blew away VG 05-10. Got errors about major ang minor #s. Removed the device file names in etc/dsk. removed vg... in /dev. Trying to recreate volumes in sam. Got error that lvmtab and lvmpvg not consistent. Lvmtab correct. renamed lvmpvg. When trying to recreate volumes in SAM get error message, "The path does not specify a valid physical volume"
17 REPLIES 17
Steffi Jones_1
Esteemed Contributor

Re: error creating vg in SAM

try the following steps:

1) mv /etc/lvmtab /etc/lvmtab.old
2) vgscan -v

That will create a new lvmtab file based on the info current of the system.

Steffi Jones
MarkW_1
Regular Advisor

Re: error creating vg in SAM

Tried it. got the same error. Is the lvmpvg implicated?
Steffi Jones_1
Esteemed Contributor

Re: error creating vg in SAM

1. lvmpvg is an ASCII file that lists physical volume groups (created by vgcreate -g) for each volume group (used only for mirroring). An ASCII file, /etc/lvmpvg contains all the mapping information for the physical volume group, but the mapping is not recorded on disk. Physical volume groups have no fixed naming convention; you might name them PVG0, PVG1 and so on.

2. The /etc/lvmpvg file is created and updated using the vgcreate, vgextend, and vgreduce commands. See lvm(4) manpage for more information.


So it seems as if you have to recreate the volume groups and not only the lvols in the volumegroup.

What is the exact error message?

Hope that helps a bit further

Steffi Jones
MarkW_1
Regular Advisor

Re: error creating vg in SAM

The exact error message in SAM is, "The group dev/vg05 not created. The path does not specify a valid physical volume"
Steffi Jones_1
Esteemed Contributor

Re: error creating vg in SAM

Do you still have the device files for the disks in /dev/dsk?

What does ioscan -fnC disk list?

Check if you can recreate the disks device file with the mksf command. Check the manpage for that, but I would probably go and use mksf -H .

Do you have a backup of the system. You might be faster restoring the lvm structure from there.

Steffi Jones

David Hixson
Advisor

Re: error creating vg in SAM

Mark,

I think Steffi has the right idea with considering a restore. You might also consider having a serious talk with the vendor who deleted the volume groups.

Also, SAM isn't the best tool to use for LVM, particularly after things go south.

If you know the original configuration, you might try building the /dev/vg05/groups file and trying to do a vgimport to bring it back that way.

If /etc/lvmpvg is getting in your way, you can also try to move that file away temporarily. It should only be used when you are building mirrored disks.
LVM is a powerful tool in the hands of the devious.
MarkW_1
Regular Advisor

Re: error creating vg in SAM

I added the device files back using "mksf -H", but when I perform another ioscan I get the following for one of the paths:
disk 20 1/4/0/0.8.0.4.0.0.5 sdisk CLAIMED DEVICE HP A5277A /dev/dsk/c6t0d5 /dev/rdsk/c6t0d5 /dev/rdsk/disk_query
Darrel Louis
Honored Contributor
Solution

Re: error creating vg in SAM

Mark,

Check for the following:
In /etc/lvmcomf/vg[05-10].conf you have the VG config files.
With the following command you can check which disk belongs to each Volume Group:
# strings /etc/lvmconf/vg05.conf
The disk that you see does it exists in /dev/dsk or /dev/rdsk.
When you perform the following on the disk:
dd if=/dev/rdsk/c?t?d? of=/dev/null bs=64k count=5000
What is the message?
If error it could be that the device isn't oke.
Run the insf command Steffie Suggested.
If no Errors:
Check if you can restore the VG via vgcfgrestore.

Good Luck
Steffi Jones_1
Esteemed Contributor

Re: error creating vg in SAM

The /dev/dsk/disk_query device file was created at the same time that the new vg was created, and the device file was not removed by sam.
It looks like SAM is adding the /dev/dsk/disk_query device file into the lvmtab file, which corrupts the newly created vg. Then any attempts to create another vg fail with device already included in the lvmtab file.



MarkW_1
Regular Advisor

Re: error creating vg in SAM

I am still getting the same error massage in sam when trying to create group vg05. Here is the string output.
# strings /etc/lvmconf/vg05.conf
CONFIG01
/dev/vg05
/dev/rdsk/c6t0d5
/dev/rdsk/c3t0d5
LVMREC01&
LVMREC01&
~VGDA0001
VGSA0001:.

the dd if=/dev/rdsk/c?t?d? of=/dev/null bs=64k count=5000 did not return any errors.
Darrel Louis
Honored Contributor

Re: error creating vg in SAM

Mark,

Did you try to restore the VG, with vgcfgrestore.

If your VG conf file is correct and the dd on the disk doesn't give a error message, you should be able to restore the VG.

This means that all the data should be on the disk.
Check man vgcfgrestore.
Don't use SAM to recover this.
MarkW_1
Regular Advisor

Re: error creating vg in SAM

I am still having trouble with the VGs. This is a pre production environment. I would like to start over on the VG other than VG00 which is the internal drive. Is there a way to blow everything away that contributes to this and begin again.
Patrick Wallek
Honored Contributor

Re: error creating vg in SAM

If you want to blow away all VG config info, you could try doing a vgexport on all the VGs you want to kill. You will have to do them one at a time. See 'man vgexport' for more info.
MarkW_1
Regular Advisor

Re: error creating vg in SAM

Vgexport does not work since the VGs have been removed with SAM. What I am concerned about is that there is a reference somewhere for paths and devices. The disks have been moved to balance the controllers so I am not sure if the VG can be successfully created. I would like a clean start.
Steffi Jones_1
Esteemed Contributor

Re: error creating vg in SAM

Hello,

I'm coming back to one of my initial responses and that is going back to your backup and restore the data from there.

Steffi Jones
Pete Ellis
Trusted Contributor

Re: error creating vg in SAM

This may be a bit late (time diff etc) but did you try re-creating the device files using mknod. I've done this myself for single device files and it works fine so long as the config info hasn't been touched.
Darrel Louis
Honored Contributor

Re: error creating vg in SAM

Mark,

What is the status now.
Have you tried to re-create the VG in /dev with mknod.
mkdir /dev/vg05
mknod /dev/vg05/group c 64 0x050000
vgcfgrestore -n /dev/vg05 -f /etc/lvmconf/vg05.conf
-o /dev/rdsk/c6t0d5 /dev/rdsk/c3t0d5

With "pvcreate -f"(man pvcreate) you can totally wipe the disks.