Operating System - HP-UX
1835564 Members
2493 Online
110078 Solutions
New Discussion

Extending VG on SAN (vxfs) & proper use of pvcreate for SAN LUN

 
SOLVED
Go to solution
imrichar
Advisor

Extending VG on SAN (vxfs) & proper use of pvcreate for SAN LUN

Is it safe to extend a volume group (PVs in the VG are Symmetrix SAN LUNs) while the VG is still mounted? The FS type is vxfs, I'd be performing a pvcreate/vgextend/pvchange/lvchange/lvextend/and fsadm.

I'm also adding a new volume group with a fresh SAN LUN to a server. I've heard that you are only supposed to use pvcreate on a single path (there are 2 active/active paths). Why is this, and is there harm in performing a pvcreate on both paths? If so how would I reverse the pvcreate on one of the paths?

As always your help is greatly appreciated!

Thanks!
4 REPLIES 4
Steven E. Protter
Exalted Contributor
Solution

Re: Extending VG on SAN (vxfs) & proper use of pvcreate for SAN LUN

Shalom,

Yes it is safe.

I personally would have a good backup and schedule this for an off prime time maintenance window because its not completely safe.

My experience is it does not matter how many times you run pvcreate.

I try and run it right before I create the volume group.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Heironimus
Honored Contributor

Re: Extending VG on SAN (vxfs) & proper use of pvcreate for SAN LUN

You only run pvcreate on one path because it prepares the LUN to be managed through LVM. It's writing to the disk, so it doesn't matter which path you use - both point to the same volume out on the SAN. If you pvcreate it twice the second run just overwrites the first, which is fine if you haven't done anything with it yet.
James R. Ferguson
Acclaimed Contributor

Re: Extending VG on SAN (vxfs) & proper use of pvcreate for SAN LUN

HI:

> Is it safe to extend a volume group (PVs in the VG are Symmetrix SAN LUNs) while the VG is still mounted? The FS type is vxfs, I'd be performing a pvcreate/vgextend/pvchange/lvchange/lvextend/and fsadm.

There isn't any problem with this. Enlarging a filesystem by adding new physical volumes to a volume group ('pvcreate', 'vgextend'); then growing a logical volume ('lvextend') and then the filesystem therein ('fsadm') is common.

I'm note sure what you want to do with 'pvchange' and or 'lvchange' in this context, however.


> I'm also adding a new volume group with a fresh SAN LUN to a server. I've heard that you are only supposed to use pvcreate on a single path (there are 2 active/active paths). Why is this, and is there harm in performing a pvcreate on both paths? If so how would I reverse the pvcreate on one of the paths?

ALternate paths (otherwise known as 'pvlinks') are simply different paths (channels) to the same physical device. Hence, performing a 'pvcreate' using path-A is the same as performing a 'pvcreate' using path-B. The device (disk) at the end of the path is initialized with fresh LVM metadata each time. This accomplishes the same objective twice.

Do NOT use 'pvcreate' when you have a disk that contains useful data AND you are simply adding an alternate link. In that case, simply use 'vgextend' to add the new alternate path to the volume group.

Regards!

...JRF...
imrichar
Advisor

Re: Extending VG on SAN (vxfs) & proper use of pvcreate for SAN LUN

Thank you everyone for the information, all my questions were answered. I was using pv/lvchange for some tuning (turning off bad block replacement, and setting timeouts).

Thanks!