LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 10-19-2008, 02:07 PM   #1
keysorsoze
Member
 
Registered: Apr 2004
Location: Queens, NY
Distribution: Red Hat, Solaris
Posts: 295

Rep: Reputation: 30
Breaking out of hanging df -h when NFS shares are unreachable.


Hi! We have had several instances where we would issue a "df -h" to see if our NFS shares are mounted where we experience hangs when they are not avalible. I have tried the classic ctrl+c using the bash shell with no luck can someone offer a better solution? The entire terminal seems to just hang and we cannot break out of it.

Thanks
 
Old 10-19-2008, 09:14 PM   #2
irishbitte
Senior Member
 
Registered: Oct 2007
Location: Brighton, UK
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,213
Blog Entries: 1

Rep: Reputation: 88
Check your mount commands in /etc/fstab. If you have soft mount, it will wait until it receives a response.
 
Old 10-20-2008, 01:24 AM   #3
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
You can try Control-Z instead of Control-C or just run the df command in background to avoid the issue.
 
Old 10-20-2008, 08:29 AM   #4
irishbitte
Senior Member
 
Registered: Oct 2007
Location: Brighton, UK
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,213
Blog Entries: 1

Rep: Reputation: 88
The console session will hang until it sees something, do
Code:
man df
and see do you turn up anything interesting? An interesting option is -l:
Code:
df -l
This will return only locally mounted disks, and will ignore NFS systems.

BTW, any idea why your NFS disk is not responding to df?
 
Old 10-20-2008, 07:10 PM   #5
keysorsoze
Member
 
Registered: Apr 2004
Location: Queens, NY
Distribution: Red Hat, Solaris
Posts: 295

Original Poster
Rep: Reputation: 30
Thank you for your replies irishbitte and jlliagre. I normally run "df -h" but on accident sometimes run a "df -h" which returns all mounted disks. The reason they are not mounted is because we have a netapp filer that gets powered on last on some instances. Thus the solaris boxes freak out when they can't mount the mount points. I will add soft nfs mount points and try the Ctrl+Z next time they lock up to see if it helps.
 
Old 10-21-2008, 09:29 AM   #6
irishbitte
Senior Member
 
Registered: Oct 2007
Location: Brighton, UK
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,213
Blog Entries: 1

Rep: Reputation: 88
My suggestion is that you change your process, and try to ssh into your netapp box first to make sure it is up before using df? This way, you can always check if the box is available before invoking df. Bit of a kludge, but it will stop your machine hanging....
 
Old 10-23-2008, 04:39 PM   #7
ADxD_7
Member
 
Registered: May 2007
Location: CO
Distribution: Solaris , Redhat , Debian
Posts: 152

Rep: Reputation: 23
Another couple cool commands I like are dfshares and dfmounts - man them and check them out -
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
DPKG over NFS hanging. NFS possible cause gosuperninja Linux - General 0 10-23-2007 10:50 PM
NFS hanging at start mijohnst Linux - Networking 3 01-29-2005 01:49 PM
NFS Hanging kapilraj AIX 1 05-04-2004 05:05 AM
nfs hanging server on shutdown bdp Linux - General 2 08-24-2003 09:32 PM
changed local net address nfs is hanging at boot spooge Linux - Networking 2 08-20-2003 01:37 PM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 01:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration