Operating System - HP-UX
1834218 Members
3072 Online
110066 Solutions
New Discussion

Re: New filesystem addition in SG package

 
SOLVED
Go to solution
Nikesh Bansal
New Member

New filesystem addition in SG package

Hello,

I am very new to Serviceguard. I have one package running on primary node.
I want to know if I can add new filesystem to package, witout halting the package.
Also please let me know the steps.

Thanks for reply.

Regards,
Nikesh
6 REPLIES 6
Manix
Honored Contributor
Solution

Re: New filesystem addition in SG package

Hello Nikesh,

Please find the steps below.

Create a file system on the new logical volume if needed. Example:
# newfs -F vxfs /dev/vg07/rlvol1
# mkdir (do this on all nodes)
Repeat for each logical volume as needed.

If it's host package is up, mount the logical volumes to the file
systems:
# mount /dev/vg07/lvol1 /vg07/lvol1_mount
...

The logical volume/s (new ) are now ready for use.


Create a map file prior to vgimporting the VG on other nodes.

# vgexport -pvs -m /etc/lvmconf/map.vg07 vg07

The results of this command will produce a file of the following
format:

VGID 2c80715b3462331e (-s option add this unique VG ID)
2 lv2
3 lv3
4 lv4
1 lv1
5 lv5
\ \_ custom lvol names
\
\_ lvol numbers

Copy the map file to the other nodes. Example:
# rcp /etc/lvmconf/map.vg07 (othernode):/etc/lvmconf/map.vg07
NOTE: "othernode" is a reference to the hostname of the destination
server

#. On the other nodes in the cluster, prepare to vgimport the new VG:
# mkdir /dev/vg07
# mknod /dev/vg07/group c 64 0x0N0000
/|\
... where N is a unique number among group files
NOTE NFS restriction for minor number in step 1 above.

Import the new VG on the adoptive node:
# vgimport -vs -m /etc/lvmconf/map.vg07 vg07


# Add the LVOL and mount points to the package control script that
controls the VG.

Example lines added to package control script:

VG[7]="vg07"
and
LV[4]="/dev/vg01/lvol1"; FS[4]="/sg1"; FS_MOUNT_OPT[4]="-o rw"
LV[5]="/dev/vg01/lvol2"; FS[5]="/sg2"; FS_MOUNT_OPT[5]="-o rw"
LV[6]="/dev/vg01/lvol3"; FS[6]="/dump5"; FS_MOUNT_OPT[6]="-o rw"
LV[7]="/dev/vg01/lvol4"; FS[7]="/depot"; FS_MOUNT_OPT[7]="-o rw"
\ / /
Note consecutive incremented index value

Check the script for syntax errors:
# sh -n
Copy the updated control script to the adoptive node(s).

Ensure the modified package control script works by testing package
startup and stop when downtime is available.

To stop a currently running package:
# cmhaltpkg

To start a package on a specific node:
# cmrunpkg -n
Drop the '-n ' if the package is to be started on the
current node.

Thanks
Manix
HP-UX been always lovable - Mani Kalra
nijokj
Trusted Contributor

Re: New filesystem addition in SG package

one more adds to manix post,
you need to export the vg from system before import it.
Before exporting notedown the minor number used.
vgexport vgname
thanks
nijo
Nikesh Bansal
New Member

Re: New filesystem addition in SG package

Thanks for the steps. I want to know if we can edit the package control file without halting the package.

Any downtime (package downtime) is requesired during filesystem addition to the package?
P Arumugavel
Respected Contributor

Re: New filesystem addition in SG package

hi,

Yes, you can edit the package control file without halting the package.

But to apply the changes, the associated package needs to be brought down.

Rgds...
Florian Heigl (new acc)
Honored Contributor

Re: New filesystem addition in SG package

If it's the first time you're doing this, it would be wise to have a downtime & test.
But in general it's not needed to restart the package to add/remove FS.

The problem is, if you make any errors in editing the package config and you restart the package later, you will have a lot more unexpected trouble (like being down for long period until you found all errors). So nothing you should do w/o experience.

If you're good at scripting, you can source the "FS" array from the package config and build the mount commands from the settings in the file. Then you'll know you got it all right.
yesterday I stood at the edge. Today I'm one step ahead.
Srikanth Kancharla
Occasional Advisor

Re: New filesystem addition in SG package

Hi Nikesh,

Have a look at this. There are 2 procedures.

Regards
Srikanth