1833777 Members
2652 Online
110063 Solutions
New Discussion

Stale logical volume

 
SOLVED
Go to solution
rewtme
Occasional Advisor

Stale logical volume

I have a K450 with 8 Winchester drive trays(shelves) containing various disk arrays attached to it. A couple of weeks ago, I lost two disks in one of the arrays on the top shelf and the data on it was of course blown away. On this particular disk shelf, it is comprised of 3 different groups of 3 disks all raid 5, each of which has its own controller. The two disks I lost were in the middle array.

/dev/dsk/c0t0d0 - array on the left, data intact
/dev/dsk/c1t0d0 - middle disk array (blown away)
/dev/dsk/c2t0d0 - array on the right, data intact

All three of these 3-disk arrays made up one volume group which was /dev/vg01a. I replaced the two disks on the /dev/dsk/c1t0d0 array and now I have a brand new array with no data on it. When I boot up, vg01a is able to be activated but I get a stale logical volume error on one of the logical volumes that was in vg01a. This is obviously due to the blown away data. I need to know how to go about readding the new physical disk to the volume group.

It still has the same address and everything. Doing a pvdisplay /dev/dsk/c1t0d0 gives me an error saying that the specified path does not correspond to physical volume attached to this volume group. I have yet to do a vgexport on this volume group since replacing the disks, although I do have the mapfile from the old configuration. Can someone please guide me as to what I need to do here to in essence reinitialize this volume group with the newly replaced disks? Do I need to do a pvcreate on c1t0d0??

Thanks a bunch for your help and if I missed some vital information that needs to be posted, let me know.
7 REPLIES 7
James R. Ferguson
Acclaimed Contributor
Solution

Re: Stale logical volume

Hi:

Do the following:

# vgcfgrestore -n /dev/vg01a /dev/rdsk/cXtYdZ
# vgchange -a y /dev/vg01a
# newfs -F [hfs|vxfs] /dev/vg01a/rlvolX

...and restore the data to lvolX appropriately. You can use 'pvdisplay -v /dev/dsk/cXtYdZ' to ascertain the logical volumes that were affected by the disk that you replaced.

...JRF...
rewtme
Occasional Advisor

Re: Stale logical volume

Hi James...thanks for responding. When I executed the vgcfgrestore command I get the following message:

vgdisplay: Warning: couldn't query the physical volume "/dev/dsk/c1t0d0":
The specified path does not correspond to physical volume attached to this volume group.
Volume Group configuration has been restored to /dev/rdsk/c1t0d0

John

I am able to do a diskinfo on /dev/rdsk/c1t0d0 and it shows up as CLAIMED by HP/UX when I do an ioscan -funC
Carlos Fernandez Riera
Honored Contributor

Re: Stale logical volume

Since you do a vgexport , You must create again that vg and run vgimport

mkdir /dev/vgxx
mknod c group 64 0x....

vgimport -m mapfile /dev/vgxx /dev/dsk/xxx /dev/dsk/xxx /dev/dsk/xxx


vgchange -a y /dev/vgxx

Now you vg must be active again.

unsupported
rewtme
Occasional Advisor

Re: Stale logical volume

Ok I haven't done the vgexport so there's no need to recreate the volume group directory and whatnot at this point. If I need to do a vgexport I can but I was trying what James said and that didn't work because it's still complaining about not being able to get to /dev/dsk/c1t0d0. I tried a pvcreate on /dev/dsk/c1t0d0 and it came back and told me that it is already attached to a volume group (vg01a). Any other suggestions?
rewtme
Occasional Advisor

Re: Stale logical volume

just as fyi it's fixed...James' suggestion was the correct one but, me being retarded, I forgot to deactive the volume group before attempting the vgcfgrestore. Thank you for your help.
Carlos Fernandez Riera
Honored Contributor

Re: Stale logical volume

OK. Sorry, i dont understand it correctly.

You say it was a RAID-5. So when new disk is available is should be reconstructed automaticaly from others disks, so neither pvcreate or vgcfgrestore must be ran.

We dont know what is your hardware/software.

I am still confused about vgdisplay says

"Volume Group configuration has been restored to /dev/rdsk/c1t0d0 "




unsupported
Sridhar Bhaskarla
Honored Contributor

Re: Stale logical volume

I assume you have fixed the problem by now. You did well till vgcfgrestore and vgchange. That would be the default message I would get when I do a vgcfgrestore. That will go away with vgchange -a y.

Once this is done, you are fine. You just need to do lvremove on all the logical volumes that have the stale partitions.

Then you can create new lvs and mount them.

You don't need to do vgexport and import.

Sri
You may be disappointed if you fail, but you are doomed if you don't try