Operating System - HP-UX
1823729 Members
2920 Online
109664 Solutions
New Discussion юеВ

vgcfgrestore - unable to restore config bec. of PV size???

 
SOLVED
Go to solution
cam9269
Regular Advisor

vgcfgrestore - unable to restore config bec. of PV size???

Hi Guys,

We've recently replaced a failed disk from one of our VGs which has the ff. disk assignments:
Failed disk is c6t0d0
------------------------------------

--- Physical volume groups ---
PVG Name PVG_primary
PV Name /dev/dsk/c4t8d0
PV Name /dev/dsk/c4t9d0
PV Name /dev/dsk/c4t10d0
PV Name /dev/dsk/c4t11d0
PV Name /dev/dsk/c4t12d0
PV Name /dev/dsk/c4t13d0
PV Name /dev/dsk/c4t14d0

PVG Name PVG_mirror
PV Name /dev/dsk/c6t0d0
PV Name /dev/dsk/c6t1d0
PV Name /dev/dsk/c6t2d0
PV Name /dev/dsk/c6t3d0
PV Name /dev/dsk/c6t4d0
PV Name /dev/dsk/c6t5d0
PV Name /dev/dsk/c6t6d0

--------------------------------------------

The PV's status is 'unavailable' in the vgdisplay output.

We are following instructions from the "When_Good_Disks_Go_Bad.pdf" document and the next step is to use: vgcfgrestore -n

But when we execute this, we get the ff. error messages:
----------------------------------------------
Size of Physical Volume "/dev/rdsk/c6t0d0" is smaller than the corresponding PV size in configuration backup file saved by "vgcfgbackup" command. Cannot restore.
----------------------------------------------

I know for a fact that we do have the same disk size and all... But we can't get past this issue. Would like to seek help with this one.

Thanks!
23 REPLIES 23
Kapil Jha
Honored Contributor

Re: vgcfgrestore - unable to restore config bec. of PV size???

Hi,

Since you are using PVG you have to have a disk with same or big size,

Since there are so many disk in PVG its better not to touch the config and get a disk with bigger size.

BR,
Kapil+
I am in this small bowl, I wane see the real world......
cam9269
Regular Advisor

Re: vgcfgrestore - unable to restore config bec. of PV size???

But I am using the same disk size... wouldn't that be enough replacement?
Kapil Jha
Honored Contributor

Re: vgcfgrestore - unable to restore config bec. of PV size???

Ok so you can do one thing I suppose, do not use vgcfgrestore rather than add the disk from command line and vgsync it.
It should work.

BR,
Kapil+
I am in this small bowl, I wane see the real world......
cam9269
Regular Advisor

Re: vgcfgrestore - unable to restore config bec. of PV size???

You mean I do:
1. vgextend
2. vgsync?
Michael Steele_2
Honored Contributor

Re: vgcfgrestore - unable to restore config bec. of PV size???

Hi

"...Size of Physical Volume "/dev/rdsk/c6t0d0" is smaller than the corresponding PV size in configuration backup file saved by "vgcfgbackup" command. Cannot restore..."

Please perform a 'diskinfo' on all your disks, obtain the product numbers for all and compare them with the old c6t0d0 product number.
Support Fatherhood - Stop Family Law
cam9269
Regular Advisor

Re: vgcfgrestore - unable to restore config bec. of PV size???

Thanks Michael, that's just what I did and found that c6t0d0 is smaller by 480bytes! So now, I am getting that disk replaced with the exact disk size as the ones already installed.

Will let you guys know how this goes.

Thanks for the replies!
Kapil Jha
Honored Contributor

Re: vgcfgrestore - unable to restore config bec. of PV size???

Yes vgextend and vgsync?


It would work, extend it with -g option is PVG.
Or enter the disk name later in /etc/lvmpvg file

BR,
Kapil+
I am in this small bowl, I wane see the real world......
AVV
Super Advisor

Re: vgcfgrestore - unable to restore config bec. of PV size???

HI,


If you have same size of disk, I would suggest a vgrestore.
Amitav
Frequent Advisor

Re: vgcfgrestore - unable to restore config bec. of PV size???

Hi,
If you have got the bigger disk now, please use vgcfgrestore to restore all the datas.

Amitav
Frequent Advisor

Re: vgcfgrestore - unable to restore config bec. of PV size???

and yes, plz do not forget to assign points for the answers u received, as all of us are taking out our time and giving an extended help...!!
cam9269
Regular Advisor

Re: vgcfgrestore - unable to restore config bec. of PV size???

We managed to put in a new disk which is supposed to have the same capacity being that we put in a similar part number although, it's marked as a seagate disk as opposed to an HP disk currently installed

But when this new disk was plugged into the system, we still see that it is less than the disk sizes of the other disks currently installed. Here's a diskinfo o/p for your reference (c6t0d0 is the replaced disk)

SCSI describe of /dev/rdsk/c6t0d0:
vendor: SEAGATE
product id: ST336753LC
type: direct access
size: 35566479 Kbytes
bytes per sector: 512
---------------------------------------------
SCSI describe of /dev/rdsk/c4t8d0:
vendor: HP 36.4G
product id: ST336753LC
type: direct access
size: 35566480 Kbytes
bytes per sector: 512


Michael Steele_2
Honored Contributor

Re: vgcfgrestore - unable to restore config bec. of PV size???


size: 35566479 Kbytes
bytes per sector: 512
---------------------------------------------

size: 35566480 Kbytes
bytes per sector: 512


It is odd that c6t0d0 is seagate and c4t8d0 is hp. I admit to have never seen this.

I'd check my firmware on everything including the PDC. I'm thinking the new disk is the latest and greatest and you're old somewhere in the GSP, PDC, ...
Support Fatherhood - Stop Family Law
Michael Steele_2
Honored Contributor

Re: vgcfgrestore - unable to restore config bec. of PV size???

oh, diskinfo -v for disk firmware versions. 'fcmsutil' for HBA's. ts99 for pdc.
Support Fatherhood - Stop Family Law
Bill Hassell
Honored Contributor

Re: vgcfgrestore - unable to restore config bec. of PV size???

This is not that unusual. Unfortunately, 36GB is not always 36GB...I have seen the numbers off by 24 to over 1000. Here is the key:

vendor: SEAGATE
product id: ST336753LC

vendor: HP 36.4G
product id: ST336753LC

Even though the mfr is Seagate with the exact same Seagate product number, the vendor ID is the giveaway that it is not the same disk. There are a large number of reasons for the variations, none of which make it easy for sysadmins. You can always replace the disk with a bigger one but the reverse won't work.

So diskinfo is your friend -- hopefully you have this info before you have to replace the disk. Always replace with the same vendor ID and product ID. Sometimes, this information is printed on the drive...sometimes not.


Bill Hassell, sysadmin
cam9269
Regular Advisor

Re: vgcfgrestore - unable to restore config bec. of PV size???

Thanks Bill, that's what we are thinking now. We are now ordering the exact part number as seen from the failed disk. Am just waiting for the delivery then we can continue with this replacement.

Kapil Jha
Honored Contributor
Solution

Re: vgcfgrestore - unable to restore config bec. of PV size???

Hi Bill,

I have one question for you, here the problem is becuase this guy is using vgcfgrestore and disks are in PVG.
size if disk is just 1KB less....
so what would happen if he removes disks from PVG temporary.....add it with normal LVM command..........put back in PVG and sync it.
It should work right ??
Lemme know if my understanding is correct.

BR,
Kapil+

I am in this small bowl, I wane see the real world......
Bill Hassell
Honored Contributor

Re: vgcfgrestore - unable to restore config bec. of PV size???

Yes, you can remove the disk completely, then add it back as a new disk in the VG. You'll need to lvreduce any mirror information on that disk so it is unused in the VG. Then pvcreate the replacement disk, vgextend it into the VG and then lvextend -m 1 the lvols onto it for mirroring. Just make sure there are enough extents on the new disk to handle the mirrored PEs.


Bill Hassell, sysadmin
cam9269
Regular Advisor

Re: vgcfgrestore - unable to restore config bec. of PV size???

Thanks for the inputs guys, just how do I remove/add a disk from a PVG? This may be my next plan of action if I can't get my disk until early next week
Kapil Jha
Honored Contributor

Re: vgcfgrestore - unable to restore config bec. of PV size???

PVG is nothing but a acsii file, which just make sure that you do not mirror the disk in same group/controller.
remove the disk entry from PVG from /etc/lvmpvg add disk as explained by Bill and then put the entry back in PVG file.

BR,
Kapil+
I am in this small bowl, I wane see the real world......
Vishu
Trusted Contributor

Re: vgcfgrestore - unable to restore config bec. of PV size???

Hi,

You can remove the disk entry from the /etc/lvmpvg file and after new disk is installed, you can extend your VG with -g option by specifying the PVG name. and there you go, you have your new disk in your PVG, you can now mirror your LVs on it.

cam9269
Regular Advisor

Re: vgcfgrestore - unable to restore config bec. of PV size???

Hey guys, I haven't tried doing the vgreduce routine. I got a question in mind:

The LVs are composed of several PVs since its PVG distributed - in the primary/mirror PVGs. If I perform an 'lvreduce -m 0 LVname', will this will remove the mirror copies from all the other PVs it's distributed onto?


Thanks!
Johnson Punniyalingam
Honored Contributor

Re: vgcfgrestore - unable to restore config bec. of PV size???

>>The LVs are composed of several PVs since its PVG distributed - in the primary/mirror PVGs. If I perform an 'lvreduce -m 0 LVname', will this will remove the mirror copies from all the other PVs it's distributed onto? <<<<

see example from the "lvreduce" man page

man lvreduce

Remove mirror copies of logical extents of a logical volume from the
physical volume /dev/dsk/c1t0d0:

lvreduce -m 0 /dev/vg01/lvol4 /dev/dsk/c1t0d0

form above example, you can check on how many "PV's" your logical volume has been mirrored you need to specify them as below example, do get the "PV's" use "lvdisplay -v

#lvdisplay -v /dev/vgxx/lvolxx |more -> take note the "PV's" name and followed by "lvreduce"

#lvreduce -m 0 /dev/vgxx/lvolxx /dev/dsk/c1t2d1 /dev/dsk/c2t2d2 /dev/dsk/c1t1d1 /dev/dsk/c1t2d2
Problems are common to all, but attitude makes the difference
Michael Steele_2
Honored Contributor

Re: vgcfgrestore - unable to restore config bec. of PV size???

Are you using extent-based striping?
Are you using PVG-strict mirroring?

Are your mirrored copies in one PVG only?

This would be PVG-Strict mirroring were the primary is in one PVG and the mirror in the 2nd PVG.

With PVG's mirroring occurs across HBA so that a loss of an HBA would not completely blow up the mirroring. You manually edit the /etc/lvmpvg file so primary PVs are in one group and the mirrors are in the 2nd.

As long as you pv and vg are set up correctly then LVM will handle the lvremove automatically.

List your pvdisplay -v with a few extents and your /etc/lvmtab. Also a lvdisplay -v with a few extents.
Support Fatherhood - Stop Family Law