Operating System - HP-UX
1833325 Members
2866 Online
110051 Solutions
New Discussion

Re: Mount options using ServiceGuard

 
SOLVED
Go to solution
phil cook
Frequent Advisor

Mount options using ServiceGuard

Hello - Can anybody suggest how I can control vxfs mount options for individual filesystems mounted by SG package scripts. A cluster I currently maintain mounts my Oracle data areas as so:

/dev/vg02/lvol1 /data/u01 vxfs log 0 0
/dev/vg02/lvol2 /data/u02 vxfs log 0 0

I would like to configure it so it mounts these datafile areas using raw i/o. i.e:

/dev/vg01/lvol8 /legend/oradata6 vxfs delaylog,mincache=direct,convosync=direct 0 0

There are other filesystems mounted by SG packages whose mount options I do not wish to affect.

Any help would be much appreciated.

Thanks.

Do I have to?
13 REPLIES 13
melvyn burnard
Honored Contributor
Solution

Re: Mount options using ServiceGuard

which version of Sg are you using?
the later versions have examples in the script files for mount options, as in:

# For example, if this package uses the file systems pkg1a and pkg1b,
# which are mounted on the logical volumes lvol1 and lvol2 with read and
# write options enter:
# LV[0]=/dev/vg01/lvol1; FS[0]=/pkg1a; FS_MOUNT_OPT[0]="-o rw"
# LV[1]=/dev/vg01/lvol2; FS[1]=/pkg1b; FS_MOUNT_OPT[1]="-o rw"
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
phil cook
Frequent Advisor

Re: Mount options using ServiceGuard

Thanks for your reply. My pkg control scripts have this entry:

FILESYSTEMS
# Define the filesystems which are used by this package. The filesystems
# are defined as pairs of entries specifying the logical volume and the
# mount point for the file system. Each filesystem will be fsck'd prior
# to being mounted. The filesystems will be mounted in the order specified
# during package startup and will be unmounted in reverse order during
# package shutdown. Ensure that volume groups referenced by the logical
# volume definitions below are included in volume group definitions
# above.
#
# Example: LV[0]=/dev/vg01/lvol1; FS[0]=/pkg1
# LV[1]=/dev/pkg2/lvol1; FS[1]=/pkg2
#
LV[0]="/dev/vg02/lvol1"; FS[0]="/data/u01"
LV[1]="/dev/vg02/lvol2"; FS[1]="/data/u02"
LV[2]="/dev/vg03/lvol1"; FS[2]="/data/u03"
LV[3]="/dev/vg03/lvol4"; FS[3]="/data/u04"

So I suspect this means I am running an older version of SG? Bit disappointing.

Phil C
Do I have to?
Steve Lewis
Honored Contributor

Re: Mount options using ServiceGuard

Phil,

You could always leave your filesystems out of that section altogether and mount them manually in the customer_defined_start/halt procedures. Just use the command you gave. I assume you have Online JFS (recent version and patches) required for the mincache=direct option.

Steve
melvyn burnard
Honored Contributor

Re: Mount options using ServiceGuard

so which SG version are you running?
it may be worthwhile you upgrading SG to the current Platform release of 11.09 for supportability, andthis will give you the new features.
to check, use swlist or do:
what /usr/lbin/cmcld
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
phil cook
Frequent Advisor

Re: Mount options using ServiceGuard

Swlist reports the following:

lara:/usr/local/bin # swlist | grep Service
B3935BA A.10.10 MC / Service Guard
PHSS_15531 B.10.00.00.AA MC/ServiceGuard A.10.10 Cummulative patch
lara:/usr/local/bin #

So perhaps I should consider upgrading as you say.

Rgds

Phil
Do I have to?
melvyn burnard
Honored Contributor

Re: Mount options using ServiceGuard

ServiceGuard 10.12 will ALSO give you the changes I mentioned, so not such a big upgrade path :-}
Also dont forget the latest SG patch for the veriosn you load, and remember, these patches are NEVER on the patch bundle CD's ;-}

HTH
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Carsten Krege
Honored Contributor

Re: Mount options using ServiceGuard

The latest version for HPUX 10.20 is SG 10.12 (+patches). However, I'm pretty sure that the default 10.10 script provide the FS_MOUT_OPT arrays. You can check with

# cd /tmp
# cmmakepkg -s dummy
# vi dummy

You can then start to update your scripts.

In fact I would first check your present scripts and search in them for the string FS_MOUNT_OPT. If you see a line similar to

mount ${FS_MOUNT_OPT[$F]} $I ${FS[$F]}

in the function check_and_mount() the comments in the top of the file might simply been deleted and your script already supports filesystem options.

Carsten
-------------------------------------------------------------------------------------------------
In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move. -- HhGttG
phil cook
Frequent Advisor

Re: Mount options using ServiceGuard

Your right Carsten. The dummy script created does contain those examples re mount options. Confused as to why then the script that mounts as per defined in this file does not contain any reference to mount options:

lv_mount()
{
j=$1
while [ $j -lt $(($1 + $2)) ]
do
mount ${LV[$j]} ${FS[$j]} >/dev/null 2>&1
if [ $? -ne 0 ]
then
message "ERROR: Failed to mount ${FS[$j]}"
j=$(($j - 1))
while [ $j -ge 0 ]
do
umount ${FS[$j]} >/dev/null 2>&1
if [ $? -ne 0 ]
then
message "ERROR: Failed to unmount file system ${FS[$j]}"
fi
j=$(($j - 1))
done
return 1
fi
j=$(($j + 1))
done
return 0
}

Has this installation been messed with in some way? It seems from this that should I change the pkg config script to include options, the mount script will ignore them anyway?

Phil C
Do I have to?
melvyn burnard
Honored Contributor

Re: Mount options using ServiceGuard

My guess is thaht the scripts were done on an older version of SG, and then the SG version was upgraded without merging in the newer script options (as is normal ;-{ )
So you coul dprobably just recreate your scripts now and merge in the current information while tajking the opprotunity to use the new functionality

All good fun, they say
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Carsten Krege
Honored Contributor

Re: Mount options using ServiceGuard

The good news is that you don't need to update then. The bad news is that your current package script is from an ooooooold SG version. Probably the cluster has been updated earlier and the scripts of the old version were simply re-used (which is ok).

The best is to move your package control file to the new script versions, you get with "cmmakepkg -s".

Carsten

-------------------------------------------------------------------------------------------------
In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move. -- HhGttG
phil cook
Frequent Advisor

Re: Mount options using ServiceGuard

Ok chaps thanks very much for your advice, it's been very useful. I will try & regenerate the scripts on my uat node.

Best Rgds

Phil C
Do I have to?
phil cook
Frequent Advisor

Re: Mount options using ServiceGuard

I've now tried regenerating these scripts & although it's a little laborious copying in all your package settings it's worked first time.

Are there any other elements besides package control & config scripts that I should update for consistency?

Many thanks
Do I have to?
Carsten Krege
Honored Contributor

Re: Mount options using ServiceGuard

No, not for consistency.

The unfortunate thing is that SG does not separate the base package control script from the customizable parts of the script. This way the base script could be easily patched and customers would not need to incorporate updates/changes/fixes of the base script by cut&paste.

Carsten
-------------------------------------------------------------------------------------------------
In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move. -- HhGttG