Operating System - HP-UX
1834639 Members
2370 Online
110069 Solutions
New Discussion

Halting a package but still accessing its file systems

 
SOLVED
Go to solution
Mark_Tunnell
Occasional Contributor

Halting a package but still accessing its file systems

We need to shut down a Serviceguard package, but we still need to be able to access the file systems it owns. How would we go about this? Would we just re-import its VGs?

We also need to keep the package configuration intact in case we need to start it up again.

Any suggestions would be appreciated.

Thanks.
5 REPLIES 5
Matti_Kurkela
Honored Contributor
Solution

Re: Halting a package but still accessing its file systems

No need to re-import, just halt the package but keep the SG node(s) running (=don't run cmhaltnode/cmhaltcl), activate the VG & mount the filesystems manually.

Remember that you must use "vgchange -a e vgpackage" to activate the VG in Exclusive mode as it is still configured as a cluster VG. This will also make sure you can't accidentally activate the package VG on two nodes and then corrupt your filesystems by mounting them simultaneously on two systems.

Before starting the package again, unmount the package filesystems and deactivate the VG with "vgchange -a n vgpackage"

If you think you may have to do it often, write a pair of small scripts to do the job:

pkgmount.sh:
#!/bin/sh
vgchange -a e vgpackage
mount /dev/vgpackage/lvol1 /pkgfs1
mount /dev/vgpackage/lvol2 /pkgfs2
# ... as many mounts as required...

pkgumount.sh:
#!/bin/sh
umount /pkgfs1
umount /pkgfs2
# ...unmount all package filesystems...
vgchange -a n vgpackage

MK
MK
Vishu
Trusted Contributor

Re: Halting a package but still accessing its file systems

Exactly what the Matti has suggested.

1. Halt the package
2. Activate that VG in exclusive mode
3. mount all FS.

Now, you can use all you FS.

Mark_Tunnell
Occasional Contributor

Re: Halting a package but still accessing its file systems

Thanks for the responses!

"...just halt the package but keep the SG node(s) running..." Will that release the package IP?

We're in the process of shutting down these servers. We need to move the IP the package is using to a new server. We'd like to still be able to access the old server as a standalone by its host IP.

Will the procedure you described allow us to do this?

Thanks.
Matti_Kurkela
Honored Contributor

Re: Halting a package but still accessing its file systems

Yes. Once the package is halted, you're free to use the package IP for other purposes. The host IP is not dependent on Serviceguard and can be used as before.

Activating just the package VG(s) and filesystem(s) manually is not tied to the package IP address(es) in any way.

If you reuse the package IP for other purposes, you might wish to use cmgetconf to get the latest version of the package configuration in text form for archival purposes, then use cmdeleteconf to delete the package configuration from Serviceguard. This does not cause any changes to the package filesystems: just the Serviceguard is made unaware of the existence of the package (and thus unable to accidentally re-start it, so that the risk of duplicate IPs in the network is minimized).

If you later need to return to Serviceguard mode, you can simply re-apply the archived package configuration with cmapplyconf.

---

If you wish to stop the cluster daemons (cmhaltnode/cmhaltcl), you should first change the VG back to non-cluster mode:

vgchange -c n vgpackage

The VG must be deactivated when you run this command. After that, you can activate the VG with plain "vgchange -a y" even if Serviceguard has been completely shut down... but if the failover node still exists and has the package disks presented to it, you lose the exclusive activation protection that Serviceguard provides.

So if you do this, I *strongly* recommend that you disconnect the package disks/unpresent the LUNs from the failover node(s), making the package disk(s) available to the single stand-alone host only. If you're removing or re-purposing the failover node(s), you may be doing this anyway.

At this point, you have effectively stopped using Serviceguard. You can move the package filesystem definitions to /etc/fstab so that they will be mounted automatically at system boot. If you do this, remember to also look at /etc/lvmrc and make sure the ex-package VG is not excluded from automatic activation at system boot time.

You can then use cmgetconf to archive the package and cluster configuration in text form. Remember to also archive the package control script.

The last steps would be using cmdeleteconf to remove the active cluster configuration and then swremove to de-install Serviceguard software.

MK
MK
Mark_Tunnell
Occasional Contributor

Re: Halting a package but still accessing its file systems

Thank you very much!