Showing results for 
Search instead for 
Did you mean: 

vgchange -s

Frequent Advisor

vgchange -s

I'm thinking of changing the way our volume groups sync when a mirror is stale in a service guard failover (Although I think this applies in a non-cluster enviroment).

At present the volume groups don't activate until the mirror has been sync'd. According to the HP document (see below) you can use the -s option to have the volume group activated, but then you have to do a manual vgsync on the volume groups.

The questions I have is in what circumstances would you use the -s? is it worth using it considering that the application maybe unusable due to high WIO? are there any other problems or issues in doing this?

hp document (snip):-

HP Logical Volume Manager (LVM) usually assumes that it has to sync the
copies in a mirrored volumegroup (VG) at activation time. If stale extents
exist, vgchange will first call vgsync and then activate the VG. Depending on
the number of stale extents (which, for example, might be encountered in an
MC/SG cluster after a TOC/pkg-switch), this can take some time (tens of
minutes or more).
To speed up volume group activation, the "-s" option to vgchange can be
specified. This option requests that stale extents be accepted temporarily.
Note, however, that vgsync MUST be called manually afterwards.
John Palmer
Honored Contributor

Re: vgchange -s

None that I can think of, especially in a Serviceguard environment.

I don't believe that your statement 'At present the volume groups don't activate until the mirror has been sync'd.' is correct. In my experience, vgsync runs as a background task and the LV's are available much as they are when you add a mirror with lvextend. A bit slow maybe but usable. This is only noticeable when you've got LV's with Mirror Write Cache off in any case. With MWC on, VG recovery is very quick.

Do you heve LV's with MWC off?

Frequent Advisor

Re: vgchange -s

Hi John,

I believe we work for the same company. Anyway according to the document (UMCSGKBRC00014603) it seems to indicate that vgsync is called and then vg is activated , but I don't believe that it completes the activation until it has sync'd.

This is the behaviour that we noticed when we failed over and one of our mirrors was stale when the volume group activated it started to sync and none of the lv/filesystems were mounted until VG had finished, then it did the next one and so on.

The document seems to indicate that it can take tens of minutes and therefore the solution to get it backup quickly is to use the -s option to force acception of stale pe's and then do a manual (or scripted) vgsync after.