Operating System - HP-UX
1830062 Members
2208 Online
109998 Solutions
New Discussion

lvmrc - What is the exact syntax

 
SOLVED
Go to solution
IT IS UNIX
Occasional Advisor

lvmrc - What is the exact syntax

Hello,

I have the following problem:

On my server we have disks devices from a EMC frame attached. We approx 20 VGs and two of them have disk devices which are only avaiable read only on the EMC frame. During boot of this server we got a lot of error messages like these:


Dec 8 08:27:59 arbor01 vmunix: DIAGNOSTIC SYSTEM WARNING:
Dec 8 08:27:59 arbor01 vmunix: The diagnostic logging facility has started receiving excessive
Dec 8 08:27:59 arbor01 vmunix: errors from the I/O subsystem. I/O error entries will be lost
Dec 8 08:27:59 arbor01 vmunix: until the cause of the excessive I/O logging is corrected.
Dec 8 08:27:59 arbor01 vmunix: If the diaglogd daemon is not active, use the Daemon Startup command
Dec 8 08:27:59 arbor01 vmunix: in stm to start it.
Dec 8 08:27:59 arbor01 vmunix: If the diaglogd daemon is active, use the logtool utility in stm
Dec 8 08:27:59 arbor01 vmunix: to determine which I/O subsystem is logging excessive errors.
Dec 8 08:27:59 arbor01 vmunix: Error writing VGDA [3] to disk H/W path 0/4/0/0.21.23.0.1.0.0 (error = 5)


The server comes up and we have to export/import and activate these VGs with "vgchange -a r VGNAME".

No I discovered that we can activate the VGs in /etc/lvmrc. But what is the right syntax and do I have to activate all the VGs or only the two in read-only mode?

Lets say we have the VGs vgl01 vgl02 vgl03 and vgl04r2log (the last one "vgl04r2log" should be activated in read-only mode)

Thanks a lot in advance

Ralf
3 REPLIES 3
Ralph Grothe
Honored Contributor

Re: lvmrc - What is the exact syntax

If you need individual avtivation of your VGs you need to set the variable AUTO_VG_ACTIVATE to 0 and populate the function's custom_vg_activation() block with valid shell commands and commands from /sbin
This is because this script is run fairly early in the init sequence, i.e. before /usr is mounted.
Therefore you either have to apply with commands that reside in /sbin and are available at this stage, or place there your own statically linked commands.


# grep -E ^AUTO_\|^custom /etc/lvmrc
AUTO_VG_ACTIVATE=1
custom_vg_activation()
Madness, thy name is system administration
Ralph Grothe
Honored Contributor

Re: lvmrc - What is the exact syntax

Forgot the 2nd part of your question.
If AUTO_VG_ACTIVATE=0 then only vg00 gets activated, and you're required to place vgchange commands in the function for all the other VGs you need to have activated.
Madness, thy name is system administration
Stuart Abramson
Trusted Contributor
Solution

Re: lvmrc - What is the exact syntax

As Ralph said, you modify /etc/lvmrc:

cd /etc
cp lvmrc lvmrc.old
vi lvmrc
set
AUTO_VG_ACTIVATE=0
set VGs to activate in "custom_vg_activation()"
/sbin/vgchange -a y vg01 # activate vg01
# vg00 is always activated on boot
/sbin/vgchange -a y vg02
...
/sbin/vgchange -a r vgreadonly