1836629 Members
2085 Online
110102 Solutions
New Discussion

Mistake on vgcreate

 
SOLVED
Go to solution
Tim Medford
Valued Contributor

Mistake on vgcreate

Last weekend I created a number of new volume groups on a Nike disk array. On one of the vgcreates, I accidentally reversed the order of the primary/alternate device files.

mkdir /dev/vg04
mknod /dev/vg04/group c 64 0x040000
vgcreate /dev/vg04 /dev/dsk/c5t6d4 /dev/dsk/c2t6d4

I should have put the c2t6d4 device file first, and then had c5t6d4 as an alternate link. As a consequence of all this, I have one controller carrying a lot more traffic than another.

Question: Is there any way I can reverse the primary/alternate device paths without completely dropping all the LVM structures and rebuilding it from scratch?

Thanks in advance!
Tim

4 REPLIES 4
Iain F. Brown
Valued Contributor

Re: Mistake on vgcreate

It is easy to change primary and secondary links just vgreduce primary link, secondary link becomes primary link then vgextend the vgreduced link and it becomes secondary link.
Eileen Millen
Trusted Contributor

Re: Mistake on vgcreate

I haven't tried this yet.

pvcreate -s /dev/dsk/cXtXdX
to make it become the primary

I added some EMC disks with SAM and couldn't see a way to pick the primary and alternate path.
Eileen
James R. Ferguson
Acclaimed Contributor
Solution

Re: Mistake on vgcreate

Tim:

If all you want to do is swap the alternate links, simply do a 'vgreduce', as for example:

# vgreduce /dev/vg?? /dev/dsk/c?t?d? # current primary link

# vgextend /dev/vg?? /dev/dsk/c?t?d? # add back old link now as the alternate

Regards!

...JRF...
Eileen Millen
Trusted Contributor

Re: Mistake on vgcreate

Sorry, that should be pvchange, you can check the man page on it.

You have to umount the disks to do it.