1834498 Members
3855 Online
110067 Solutions
New Discussion

Re: pvcreate pvlink

 
SOLVED
Go to solution
Wilfred Chau_1
Respected Contributor

pvcreate pvlink

Hi all,
I did a "pvcreate -f /dev/rdsk/c5t0d0" which is the alt path to /dev/rdsk/c4t0d0. After
that when I vgextend this disk to vg01, the
system doesn't see this as an alternate link
but instead an individual disk. Other disk
that work just fine, when me issuing the pvcreate command...
What is being destroyed? and How can I restore the info? Thanks.
6 REPLIES 6
Peggy Fong
Respected Contributor

Re: pvcreate pvlink

You should not use the -f option on the pvcreate command since it is the same disk as the primary. You just want lvmtab to have this disk registered. Then when you extend it should show up as an alternate link. The -f destroys any existing information in the LVM headers on the disk. It didn't hurt the headers on your primary disk?

Are you sure this is the alternate disk?
Wilfred Chau_1
Respected Contributor

Re: pvcreate pvlink

I guess I didn't check. I just did a vgdisplay and saw the lv info, then assumed LVM header is on the primary disk is ok. Sounds like it is not the case. Then I did a vgcfgrestore -n vg01 -o /dev/rdsk/c4t0d0 /dev/rdsk/c5t0d0, hope to restore the info back to c5t0d0...looks like if I did it without the -o option, I would have fixed the problem. Right?
Peggy Fong
Respected Contributor

Re: pvcreate pvlink

I'm not really sure you do a pvcreate on the 2d device file since it is actually the same disk.

When originally created you could have specified both disk on the vgcreate command
vgcreate /dev/vg01 /dev/dsk/pv1 /dev/dsk/pv2

I'm not sure what the vgcfgrestore command did - what is the behaviour or output of vgdisplay -v /dev/vgXX (your volume group)

You mentioned the output of vgdisplay worked so your headers were ok on the disk.

You can also vgexport the volume group and then vgimport with both disks.

If vgdisplay shows your volume group with 2 disks and no alternate links, and the pvcreate did not damage the headers on the first disk it really sounds to me like they are 2 different disks. Have you verified that the 2 device files actually point to the same physical disk?

Peggy
Wilfred Chau_1
Respected Contributor

Re: pvcreate pvlink

I didn't spend too much time on it unfortunately, since it was a newly created vg and I was short of time. I vgexport everything then, create vg01 again. But this time, didn't pvcreate on the alt path, just vgextend. The system can then see the alt path.
Peggy Fong
Respected Contributor
Solution

Re: pvcreate pvlink

Great - so as I mentioned in my last post then you weren't supposed to the pvcreate - that is what messed up the alternate link information. Good troubleshooting.

Peggy
Rob Mallard
Valued Contributor

Re: pvcreate pvlink

Creating PV Links:

Where /dev/rdsk/cXtXdX is the Primary Link
and /dev/rdsk/cYtYdY is the Alternate Link

pvcreate /dev/rdsk/cXtXdX
vgcreate /dev/vg04 /dev/dsk/cXtXdX /dev/rdsk/cXtXdX

Do NOT pvcreate the Alternate Link!