Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Weird disk problem

Status
Not open for further replies.

gerudman

IS-IT--Management
Feb 12, 2002
91
0
0
ZA
Hi all,

I'm sitting with a weird problem on a clients box where they changed from one storage type to another and get weird disk problems. I investigated and found the following which doesn't seem right:

When doing a vgdisplay -v vg03 I get the follow physical disk display at the bottom : (please note the VG03)

--- Physical volumes ---
PV Name /dev/dsk/c12t0d2
PV Status available
Total PE 269
Free PE 0
Autoswitch On

Now, if I do a pvdisplay /dev/dsk/c12t0d2, I get the following error :

pvdisplay: Cannot open the control file "/dev/vg04/group":
No such file or directory
pvdisplay: Cannot display physical volume "/dev/dsk/c12t0d2".

Note the vg04. This indicates to me that this physical volume was originally connected to a vg04 and somehow the disk is now connected to a vg03?? Could it have been that the previous administrator didn't know what he was doing and, when connecting his new storage, tried to create another volume group to make his life easier??

Somehow this pv is linked to vg04 (there's no such vg on the box now!), but can I rectify the problem without losing the data on the disks???

Thank you very much
gerudman
 
I don't know how can you do that, quite weird...

As you know, PVID and VGID is stored in the disk itself (metadata) and you can change it with vgchgid command.

This is a generical procedure that I use with my storage systems (it can make internal mirrors -as clones-) in order to clean that data and put new ones:

1. Change the VGID on the BCV raw device.
vgchgid /dev/rdsk/c0t0d0 /dev/rdsk/c0t0d1 /dev/rdsk/c0t0d2 (all volumes in volume group)

IMPORTANT! If this procedure is to be used in a script it is CRITICAL to check for a return status of 0 on the vgchgid command (see man page for vgchgid) and retry or end script if value is not 0. Failure to check for good status could lead to activating volume group members with duplicate ID's and may result in loss of data.

2. Make a new volume group using the disks.
mkdir /dev/vgXX
mknod /dev/vgXX/group c 64 0x040000
(The minor number 0x040000 must be unique)

3. Import the disks into the new volume group.
vgimport /dev/vgXX /dev/dsk/c0t0d0 /dev/dsk/c0t0d1 /dev/dsk/c0t0d2

4. Activate the new volume group.
vgchange -a y /dev/vgXX

5. Backup the new volume group.
vgcfgbackup /dev/vgXX

6. Mount the associated logical volumes.
mount /dev/vgXX/lvolX /mnt_point

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top