LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-25-2012, 12:55 PM   #1
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,415

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
command do not exit successfully after execution.


Hi,


I am using RHEL 5.3 64-bit OS and when I execute 'df -h' command it shows the output but it just hangs there only and do not exit.

It shows like this -

Code:
[root@portalnode01 ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/cciss/c0d0p1      20G  2.3G   17G  13% /
/dev/cciss/c0d0p10     11G  156M  9.7G   2% /tmp
/dev/cciss/c0d0p7     9.7G  3.5G  5.8G  38% /home
/dev/cciss/c0d0p6      20G  5.5G   13G  30% /opt
/dev/cciss/c0d0p5      20G  5.9G   13G  33% /var
/dev/cciss/c0d0p3      20G  4.0G   15G  22% /usr
/dev/cciss/c0d0p2      20G  610M   18G   4% /backup
tmpfs                 3.8G     0  3.8G   0% /dev/shm
none                  3.8G  104K  3.8G   1% /var/lib/xenstored
and just hangs there only.

It should return to the shell prompt after the successful execution of command.
The ctrl+C, ctrl+D, ctrl+X any key combination also do not work.
Just have to click on the close button of the terminal then only it exits from there.

So, what is the problem exactly?


Thank You!

Last edited by Satyaveer Arya; 08-27-2012 at 06:40 AM.
 
Old 08-25-2012, 02:28 PM   #2
NyteOwl
Member
 
Registered: Aug 2008
Location: Nova Scotia, Canada
Distribution: Slackware, OpenBSD, others periodically
Posts: 512

Rep: Reputation: 139Reputation: 139
Does it return properly froma normal text console rather than a terminal window?

BTW - you might get a faster response by calling RH tech support. After all, if you're using RHEL that's what you paid for.
 
Old 08-25-2012, 02:33 PM   #3
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian + kde 4 / 5
Posts: 6,848

Rep: Reputation: 2010Reputation: 2010Reputation: 2010Reputation: 2010Reputation: 2010Reputation: 2010Reputation: 2010Reputation: 2010Reputation: 2010Reputation: 2010Reputation: 2010
Could it be trying to read a network share that's currently unavailable? That generally locks up my shell, and pretty much any other program I use. Try it perhaps with the -l/--local option.
 
Old 08-27-2012, 06:00 AM   #4
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,415

Original Poster
Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
Quote:
Does it return properly froma normal text console rather than a terminal window?
I am accessing the server using ssh, so I get normal text console.
 
Old 08-27-2012, 06:24 AM   #5
SecretCode
Member
 
Registered: Apr 2011
Location: UK
Distribution: Kubuntu 11.10
Posts: 562

Rep: Reputation: 102Reputation: 102
Does it return to the prompt if you check just one device, e.g.
Code:
df -h /dev/cciss/c0d0p1
There might be one filesystem that it's waiting for.
 
Old 08-27-2012, 06:35 AM   #6
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,415

Original Poster
Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
Quote:
Does it return to the prompt if you check just one device
Yeah, when I check for only one device, the cursor returns back to the terminal prompt.
 
Old 08-27-2012, 06:39 AM   #7
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,415

Original Poster
Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
Quote:
Could it be trying to read a network share that's currently unavailable?
Sorry, I didn't get!

Quote:
Try it perhaps with the -l/--local option.
I tried the command with -l option and the cursor returns back to the terminal prompt. Here is the output-

Code:
[root@portalnode01 ~]# df -l
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/cciss/c0d0p1     20315812   2327864  16939308  13% /
/dev/cciss/c0d0p10    10862032    158812  10142556   2% /tmp
/dev/cciss/c0d0p7     10153988   3592228   6037644  38% /home
/dev/cciss/c0d0p6     20315812   5371680  13895492  28% /opt
/dev/cciss/c0d0p5     20315812   6172992  13094180  33% /var
/dev/cciss/c0d0p3     20315844   4163200  15104004  22% /usr
/dev/cciss/c0d0p2     20315844    624536  18642668   4% /backup
tmpfs                  3919960         0   3919960   0% /dev/shm
none                   3919960       104   3919856   1% /var/lib/xenstored
[root@portalnode01 ~]#
 
Old 08-27-2012, 06:42 AM   #8
SecretCode
Member
 
Registered: Apr 2011
Location: UK
Distribution: Kubuntu 11.10
Posts: 562

Rep: Reputation: 102Reputation: 102
So I would say that one of your volumes has some kind of issue - corrupt, an odd filesystem, or simply taking a very long time to respond. If you look at mount are there any volumes missing from the df output?

You could list by type using
Code:
df -hTt ext4
(-T shows the type in the output, -t TYPE limits to a specific type - work through the various possibilities)

eta: scrap that, an unresponsive network share is the most likely thing

Last edited by SecretCode; 08-27-2012 at 06:43 AM. Reason: cross post
 
Old 08-27-2012, 06:54 AM   #9
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,415

Original Poster
Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
Quote:
So I would say that one of your volumes has some kind of issue - corrupt, an odd filesystem, or simply taking a very long time to respond. If you look at mount are there any volumes missing from the df output?
We have mounted the partitions from SAN.

And when I executed the 'cat /etc/mtab' command I found this -
Code:
[root@portalnode01 ~]# cat /etc/mtab 
/dev/cciss/c0d0p1 / ext3 rw 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
/dev/cciss/c0d0p10 /tmp ext3 rw 0 0
/dev/cciss/c0d0p7 /home ext3 rw 0 0
/dev/cciss/c0d0p6 /opt ext3 rw 0 0
/dev/cciss/c0d0p5 /var ext3 rw 0 0
/dev/cciss/c0d0p3 /usr ext3 rw 0 0
/dev/cciss/c0d0p2 /backup ext3 rw 0 0
tmpfs /dev/shm tmpfs rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0
none /var/lib/xenstored tmpfs rw 0 0
172.16.107.152:/rhnpackages /mnt nfs rw,addr=172.16.107.152 0 0
[root@portalnode01 ~]#
So, the last line shows that I have mounted the /rhnpackages of other server on /mnt. The problem lies here and when I try to unmount the partition, it does not unmount.
 
Old 08-27-2012, 06:56 AM   #10
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,415

Original Poster
Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
And if I try to go into the /mnt directory, the terminal just hangs on. So, to quit just now I used the close button of terminal window.
 
Old 08-27-2012, 07:10 AM   #11
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,415

Original Poster
Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
And here is the output of 'mount' command -

Code:
[root@portalnode01 ~]# mount
/dev/cciss/c0d0p1 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/cciss/c0d0p10 on /tmp type ext3 (rw)
/dev/cciss/c0d0p7 on /home type ext3 (rw)
/dev/cciss/c0d0p6 on /opt type ext3 (rw)
/dev/cciss/c0d0p5 on /var type ext3 (rw)
/dev/cciss/c0d0p3 on /usr type ext3 (rw)
/dev/cciss/c0d0p2 on /backup type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
none on /var/lib/xenstored type tmpfs (rw)
172.16.107.152:/rhnpackages on /mnt type nfs (rw,addr=172.16.107.152)
nfsd on /proc/fs/nfsd type nfsd (rw)
 
Old 08-27-2012, 08:23 AM   #12
SecretCode
Member
 
Registered: Apr 2011
Location: UK
Distribution: Kubuntu 11.10
Posts: 562

Rep: Reputation: 102Reputation: 102
So you need to diagnose why that nfs share is not responding ... and whether you need it at all. Either fix the server, or remove the entry from /etc/fstab or whatever script is causing it to be mounted.
 
Old 08-27-2012, 09:01 AM   #13
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,415

Original Poster
Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
Hi,

The problem was due to NFS share. Actually, there was another server on which I configured NFS and mounted the nfs share on this machine on which I get this problem.

So, recently I formated the nfs configured server and forgot to unmount the nfs share on client side before formating the nfs server.

So, now on nfs configured server I again configured nfs server and on client side I remounted the nfs share and then I unmounted the partition and it worked.

Now, the problem has been solved and I am marking the thread as SOLVED.
 
  


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
Command not completed successfully?? anishkumarv Linux - Newbie 2 07-29-2011 04:05 AM
[SOLVED] Remote command execution via SSH and newgrp command SuperMegaMau Linux - General 4 05-13-2011 07:31 AM
command execution vaalu Linux - Newbie 4 08-23-2010 09:06 AM
Only execute 2nd command on successufl execution of 1st command kregec05 Linux - Newbie 3 08-19-2009 10:29 AM
How to exit and save (or just to exit) inside a "make config" running command? scrat75 Linux - Kernel 6 09-05-2008 04:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:10 PM.

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