Operating System - HP-UX
1825747 Members
2411 Online
109687 Solutions
New Discussion

Unable to add new disk to one VG, but able to add to other VG

 
SOLVED
Go to solution
Madhu_17
Regular Advisor

Unable to add new disk to one VG, but able to add to other VG

Hi,

There was a bad disk in our server. Vendor has replaced the bad disk. When i try to add the new disk to the existing VG. i'm getting i/o error 'n' the new disk is showing as stale in lvdisplay.

But the same disk i could able to add to other VG successfully.

Can anybody suggest me?

Thanks,
Madhu
44 REPLIES 44
Stf
Esteemed Contributor

Re: Unable to add new disk to one VG, but able to add to other VG

Hello,

Do a pvcreate -f on your new disk before adding it in the VG

could you send the exact error message please?

Stf ;-)
RAC_1
Honored Contributor

Re: Unable to add new disk to one VG, but able to add to other VG

Shouldn't you add the disk to the VG it belonged to?? If it was not part of any VG, you can do pvcreate on it and add it to any VG you want. If disk belonged to a VG, after replacement, just do vgcfgrestore -n /dev/vgxx /dev/dsk/cxtxdx and do a vgsync

Anil
There is no substitute to HARDWORK
Madhu_17
Regular Advisor

Re: Unable to add new disk to one VG, but able to add to other VG

I tried all these options.

i'm trying to add to the same old VG. but i've removed the entry related to this bad disk before the hdd replacement.

i'm getting the below error when i try to extend LV.

#lvextend -m 1 /dev/vg02/u02
The newly allocated mirrors are now being synchronized. This operation will
take some time. Please wait ....
lvextend: Couldn't re-synchronize stale partitions of the logical volume: I/O error
lvextend: Couldn't resynchronize logical volume "/dev/vg02/u02".

Initially i suspected disk problem. But i could able to add the same disk to other VG successfully.

Any expert suggetions???

Stf
Esteemed Contributor

Re: Unable to add new disk to one VG, but able to add to other VG

What is the result of the command:

# lvdisplay -v /dev/vg02/u02

Stf
Madhu_17
Regular Advisor

Re: Unable to add new disk to one VG, but able to add to other VG

lvdisplay is showing stale partitions for fully.
other disk(mirror copy) is showing current.



Stf
Esteemed Contributor

Re: Unable to add new disk to one VG, but able to add to other VG

OK you have to do an

# lvreduce -m 0 /dev/vg02/u02
and then you can do an

# lvextend -m 1 /dev/vg02/u02

Stf ;-)
Madhu_17
Regular Advisor

Re: Unable to add new disk to one VG, but able to add to other VG

stf,

i tried all those options. looks like VG is corrupted.

Can you pls suggest me some high funda commands.
Fred Ruffet
Honored Contributor

Re: Unable to add new disk to one VG, but able to add to other VG

And what is output for pvdisplay on your new disk ?

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
Madhu_17
Regular Advisor

Re: Unable to add new disk to one VG, but able to add to other VG

right now i've detached the problematic disk from mirror. i think it was showing that this disk was related to vg02 VG
Stf
Esteemed Contributor

Re: Unable to add new disk to one VG, but able to add to other VG

OK did your new disk have the same special files (/dev/dsk/cxtxdx) that the bad you have replaced?

If this is the case :

# vgcfgrestore -n /dev/vg02
# vgchange -a y /dev/vg02
# vgsync /dev/vg02

Stf ;-)
Madhu_17
Regular Advisor

Re: Unable to add new disk to one VG, but able to add to other VG

Mr.stf,

I told clearly that i tried all the basic things like these.

Can anybody suggest me regarding VG corruptions and recovry.

RAC_1
Honored Contributor

Re: Unable to add new disk to one VG, but able to add to other VG

lvreduce -m 0 -k /dev/vgxx/u02 /dev/dsk/cxtxdx
The disk is the disk which is faulty and has been replaced by you.

If that succeeds, then do lvextend -m 1 /dev/vgxx/u02

Anil
There is no substitute to HARDWORK
Stf
Esteemed Contributor

Re: Unable to add new disk to one VG, but able to add to other VG

OK...

1. what is the path of your new disk that causes problem?

2. can you attach result of strings /etc/lvmtab?

3. can you attach result of strings /etc/lvmconf/vg02.conf?

Stf ;-)

Madhu_17
Regular Advisor

Re: Unable to add new disk to one VG, but able to add to other VG

I tried all these options. Looks like VG got corrupted. Any ideas about VG corruption and recovery?
RAC_1
Honored Contributor

Re: Unable to add new disk to one VG, but able to add to other VG

MAdhu,

Dont jump to a conclusion. You have decided that the vg corrupted. That is what is causing the problem.
Be open, listen to what people say. Did you try my last post??? (Use of -k for lvreduce)

Anil
There is no substitute to HARDWORK
Madhu_17
Regular Advisor

Re: Unable to add new disk to one VG, but able to add to other VG

Dear Anil,

I used pvkey option very inititally, while removing the bad disk from the mirror, before the disk replacement.

The problem started like this.

disk was missing completely after the reboot. means ioscan was not showing the disk and the lvdisplay was showing this disk as stale. so, before calling vendor i removed this disk from LV. at that time i used -k option, as it was not showing the dev. file in lvdisplay. instead it was showing question mark ("???" ).

after lvreduce, i did vgreduce.

after the disk replacement i did following.

pccreate, vgextend and lvextend.

RAC_1
Honored Contributor

Re: Unable to add new disk to one VG, but able to add to other VG

OK, what is status as of now?? Is the disk in vg??

Anil
There is no substitute to HARDWORK
Madhu_17
Regular Advisor

Re: Unable to add new disk to one VG, but able to add to other VG

after adding to the existing vg, it was still showing stale. so, i tried adding the same disk to the other VG successfully to test the functionality of the disk.

here my question is, why i'm unable to add the disk to the old VG. but i'm able to add to the other VG.
RAC_1
Honored Contributor

Re: Unable to add new disk to one VG, but able to add to other VG

Do a vgreduve -f /dev/vgxx (This will force to remove the PVs missing/has problems)

Now check /etc/lvmtab and vgdisplay -v output to check if disk is in vgxx or not. If not do a pvcreate on it anddo a vgextend.

Anil
There is no substitute to HARDWORK
Fred Ruffet
Honored Contributor

Re: Unable to add new disk to one VG, but able to add to other VG

can't you send us result for "pvdisplay -v /dev/dsk/cXtYdZ | head -50" ? We can't get further without more info.

Regards,

Fred

--

"Reality is just a point of view." (P. K. D.)
Madhu_17
Regular Advisor

Re: Unable to add new disk to one VG, but able to add to other VG

Fred,

I have already removed the disk from the mirrpr. I will give you the details of pvdisplay tomorrow.

Thanks,
Madhu
Fred Ruffet
Honored Contributor

Re: Unable to add new disk to one VG, but able to add to other VG

It is a little bit confusing when you talk about "disk". Disk is physical, mirror is logical, PV is logical. Even if you used lvreduce to break the mirror, PV is still there. You can use pvdisplay on it.
Your problem can come from this point : Did you get the whole process when you try to add the disk to the LV (pvcreate, vgextend, lvextend) or did you miss the pvcreate step ?

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
Madhu_17
Regular Advisor

Re: Unable to add new disk to one VG, but able to add to other VG

Fred,

I am getting the below message:

pvdisplay -v /dev/dsk/cxtydz
pvdisplay: Couldn't find the volume group to which
physical volume "/dev/dsk/cxtydz" belongs.
pvdisplay: Cannot display physical volume "/dev/dsk/cxtydz".

i tried pvcreate -f <> also. even after that it's giving the same error.

Madhu_17
Regular Advisor

Re: Unable to add new disk to one VG, but able to add to other VG

in lvmtab and /etc/lvmconf/vgxx.conf, there is no entry related to this problematic disk