- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- test NFS before using it?
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
Discussions
Discussions
Discussions
Forums
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
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
тАО10-04-2001 09:11 AM
тАО10-04-2001 09:11 AM
below is an example of the script i run from serverB
serverB# remsh serverA -l userA -n /net/serverB/export/disk1/home/idt_newcode/bin/node_clean_up/temp/check_node
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-04-2001 09:18 AM
тАО10-04-2001 09:18 AM
Re: test NFS before using it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-04-2001 09:32 AM
тАО10-04-2001 09:32 AM
Re: test NFS before using it?
i have a server which has NFS all hosed and needs a reboot to fix, so i have this server to test against, and the following commands also hang
bdf, mount, df
so when my cronjob/script runs its ls command against /net/whatever it too hangs, and this is what i am trying to avoid (the cronjob hanging ...not NFS, which i out of my control)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-04-2001 09:45 AM
тАО10-04-2001 09:45 AM
Re: test NFS before using it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-04-2001 09:59 AM
тАО10-04-2001 09:59 AM
Re: test NFS before using it?
I would try to fix the underlying NFS problem. Are you running the automounter?
In any event, there is a way to run the commands without hanging and thus answer your specific question. The way to do this is in perl using a signal handler. The basic idea is to set an alarm to fire after a given time. A system call is then made to a command (e.g. nfsstat); if the system call returns, all is well and you issue an alarm 0 to cancel the alarm. However, if the system call does not return the alarm is sent to the process and the signal handler responds and can be used to set an error flag.
See the attached small perl script; this should be very close to what you need.
Regards, Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-04-2001 10:00 AM
тАО10-04-2001 10:00 AM
Re: test NFS before using it?
...thx for your quick responses
i know that this system will behave better with respect to NFS if i add the latest patches, but i do not want to add them yet because i was hoping there was a way (and now is a great time for me to test it with this system) to test if NFS is not going to behave correctly BEFORE actually trying to use it
my goal is to make my scripts more robust, along the lines of pinging a sever first before trying to remsh it (i want to "ping" a NFS mount point before using it ...because even with patches there can be a time when the NFS mount is not good)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-04-2001 10:27 AM
тАО10-04-2001 10:27 AM
Re: test NFS before using it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-04-2001 10:42 AM
тАО10-04-2001 10:42 AM
Re: test NFS before using it?
In that case, I would also check for automounter patches as well. I would cd to /tmp_mnt and look for any strange entries there for clues.
I would definitely upgrade the Perl 5.6.x; 5.6.0 binaries install without any problems; the 5.6.1's usually do. The binaries are available from any on the HP-UX Porting Centers or just follow the links from www.perl.com/CPAN. The short answer is that yes, you could let the signal handler look for the process called within the system call and kill it. This is pretty straightforward in perl. You might consider another command to test your server so that no kill is really needed. I simply chose nfsstat because it eas mentioned earlier. Bear in mind, that if you need to kill this process and it is on a remote box via remsh; the perl script must be on the remote box. I really just gve your the script to serve as a starting point and to illustrate signal handlers - which are just what you need.
Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-05-2001 03:03 PM
тАО10-05-2001 03:03 PM
Re: test NFS before using it?
thx guys, have enough to move forward (perl scripting and NFS/automount patches)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-06-2001 12:20 PM
тАО10-06-2001 12:20 PM
SolutionYou can also use the standard shell to do this by starting the process in the background, then obtain the process ID, wait for a return code and if nothing, kill the process. Because NFS s really a disk in HP-UX, all the possible ways to access the disk are valid...ll is just as complicated as cd or cp...and they will all hang. Recent patches for NFS on 11.x allow a 'forced' unmount of a bad NFS filesystem.
Bill Hassell, sysadmin