- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: unmount file systems prior to package start
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2006 04:29 AM
03-07-2006 04:29 AM
The customer functions in the control file come after the LV mounts so that would not provide me an opportunity to fuser/unmount those filesystems.
I'm looking at several options to try and was wondering if anyone had already solved this issue:
1) In the package config file redirecting the RUN_SCRIPT to point to another script, which will do the fuser/unmounting and then call the package control file. I'm concerned that the cmapplyconf won't like this "control file wrapper" setup.
2) make the 3 filesystems on the failover server their own package and have that package halt (no failover) prior to the production package starting there. I like this idea but I see no mechanism in MC/SG to direct one package to stop before another will start.
Thanks - Greg
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2006 04:34 AM
03-07-2006 04:34 AM
Re: unmount file systems prior to package start
Jeff Traigle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2006 04:40 AM
03-07-2006 04:40 AM
Re: unmount file systems prior to package start
/app link to /app_noncl
FS_noncl mounted on /app_noncl
This way you need to remove a link, no unmounting.
Not a solution to your question but maybe an alternative to consider.
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2006 04:45 AM
03-07-2006 04:45 AM
Re: unmount file systems prior to package start
Vanadio -> you're right it doesn't actually solve the problem but I like the suggestion in that it is one less step (rm the link instead of fuser/umount) and probably would work more often.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2006 05:05 AM
03-07-2006 05:05 AM
Re: unmount file systems prior to package start
If you're FS_MOUNT_RETRY_COUNT is >0 then this function fuser's anyone on your mount point. I added a "umount ${mount_pt} immediately after the fuser command and it worked (on a test cluster). My addition is between the double-comments:
function freeup_busy_mountpoint_and_mount_fs
{
typeset vol_to_mount
typeset mount_pt
typeset fs_mount_opt
vol_to_mount=$1
mount_pt=$2
shift 2
fs_mount_opt=$*
print "\tWARNING: Running fuser on ${mount_pt} to remove anyone using the busy
mount point directly."
UM_COUNT=0
RET=1
# The control script exits, if the mount failed after
# retrying FS_MOUNT_RETRY_COUNT times.
while (( $UM_COUNT < $FS_MOUNT_RETRY_COUNT && $RET != 0 ))
do
(( UM_COUNT = $UM_COUNT + 1 ))
fuser -ku ${mount_pt}
######
######
umount ${mount_pt}
######
######
if (($UM_COUNT == $FS_MOUNT_RETRY_COUNT))
then
mount ${fs_mount_opt} ${vol_to_mount} ${mount_pt}
(( RET = $? ))
if(( $RET != 0 ))
then
print "\tERROR: Function freeup_busy_mountpoint_and_mount_fs"
print "\tERROR: Failed to mount ${vol_to_mount} to ${mount_pt}"
break
fi
else
mount ${fs_mount_opt} ${vol_to_mount} ${mount_pt}
(( RET = $? ))
sleep 1
fi
done
return $RET
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2006 05:13 AM
03-07-2006 05:13 AM
Re: unmount file systems prior to package start
If you guys have application hard-coded pathnames then this is less than robust. Ideally, the pathnames would be based upon some environment variable so that naming the filesystems is no big deal. Production and development would have different environment variable settings so that collision would now not be possible.
Your problems appear to extend far beyond those of simple mounting issues.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2006 05:17 AM
03-07-2006 05:17 AM
Re: unmount file systems prior to package start
I agree. I've been shot down by the powers that be about changing file system names.
Excellent point about the SOX issues, as we are under that gun. I'll bring that issue up to the business.
Thanks - G.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2006 05:20 AM
03-07-2006 05:20 AM
SolutionAt the bottom of the cntl file, add it before the activate_volume_group:
customer_defined_umount
activate_volume_group
Under "# START OF CUSTOMER DEFINED FUNCTIONS" put your function something like:
function customer_defined_umount
{
print "umount filesystems because some developers are....well...you get the idea..."
fuser -cku /mount1
sleep 5
fuser -cku /mount2
sleep 5
fuser -cku /mount3
sleep 5
umount /mount1
umount /mount2
umount /mount3
test_return 51
}
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2006 05:22 AM
03-07-2006 05:22 AM
Re: unmount file systems prior to package start
Say you have package A that is the one you need to move. Say Package B is the one you have the mounts you need to umount before Package A can start.
In Package A halt section, run cmhaltpkg on Package B. Everything is umounted before Package A ever tries to start on the other node.
Granted, not ideal way to be handling this. Always best to have unique mount points, but it can be handled within the control script framework with some messy checks and balances coded into it.
Jeff Traigle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2006 05:30 AM
03-07-2006 05:30 AM
Re: unmount file systems prior to package start
Jeff -> Not bad too. The only problem I see with it is if a hard crash occurs and cmhaltpkg can't do its work. Still your idea would take care of most issues.
Clay -> Good news is that the main package actually does shut down development (using the SAP toolkit). But that does not deny the fact that the developers could have ftp jobs or something else run even when dev is down. So I just went back with the SOX argument. Might as well use it to my advantage.
Thanks to the excellent responses by all.
G.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2006 05:34 AM
03-07-2006 05:34 AM
Re: unmount file systems prior to package start
I restate my position more diplomatically. It's still state of the art stupid.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2006 05:36 AM
03-07-2006 05:36 AM
Re: unmount file systems prior to package start
Sure, it'll work, but it's not a very maintainable approach within standard guidelines.
Jeff Traigle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2006 05:43 AM
03-07-2006 05:43 AM
Re: unmount file systems prior to package start
SOX will be my sword in this fight since I've been reminded of this tool. I don't know why I would be afraid of Clay being my internal auditor, I don't want it this way.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2006 05:45 AM
03-07-2006 05:45 AM