cancel
Showing results for 
Search instead for 
Did you mean: 
Mukeshkumar
Flight Engineer
Flight Engineer
  • 26.6K Views

df -h hangs

Jump to solution
In my RHEL server I have mounted cifs file system. When I gave dF -h it hangs an no any output of command How I can remount all those cifs file system without rebooting server.
1 Solution

Accepted Solutions
mbrito
Mission Specialist
Mission Specialist
  • 11.1K Views

Hi,

#strace /bin/df   #and verify were it hangs
# umount -l /pathToMount

 

View solution in original post

7 Replies
ricardodacosta
Moderator
Moderator
  • 26.6K Views

To remount without rebooting you could use:

mount -o remount /mountpoint

----------------------------------------------------------------------------------


If you're satisfied with the solutions provided please mark the solution as ACCEPTED.

Don't forget to thank those who helped you out with kudos!

Scott
Starfighter Starfighter
Starfighter
  • 26.6K Views

I would expect that your df -H hanging is a symptom of issues with your cifs device or configuration.  As the df marches through the mounted filesystems, it gets to that one and is unable to get a response, hence why it is hanging.  It is unusual that you would need to remount it unless you're doing something like suspending a laptop and changing it's networks where the cifs mounts was initially connected (original network) but now is not (new network).

 

-STM

--
Manager, Technical Marketing
Red Hat Enterprise Linux
Red Hat Certified Engineer (100-000-264)
NitinInd
Cadet
Cadet
  • 26.6K Views

Hi ,

I have same kind of problem in my envoirnment . So in case if mount -o remount does not work does not work .

Try # umount -lf  /mountpoint 

Please check firewall rules on samba server allow access to remote machine . Sometime because of slow reponse from sambe  or nfs share ,df -h output hangs becasue check connectiviy between share drive .

Also in case you want to df -h command to check other partition size , Use

#df -h /mountpoint 

Till share drive issue solve .

mbrito
Mission Specialist
Mission Specialist
  • 11.1K Views

Hi,

#strace /bin/df   #and verify were it hangs
# umount -l /pathToMount

 

penguins
Cadet
Cadet
  • 7,195 Views

This worked like a charm, Thank You 

0 Kudos
  • 3,122 Views

strace command is very very useful to find the errent mount!! Then simpley umount 

-l /pathToMount, as shown above, WORKS EXCELENT & SIMPLE.
Tags (1)
0 Kudos
Chetan_Tiwary_
Moderator
Moderator
  • 6,959 Views

Hi @Mukeshkumar ,

Thanks for reaching out !

You should first try to find out the reason for the hung df -h command using strace command : strace /bin/df -h or strace mount -t cifs //<cifsserverIP>/share  /mnt 

There can be multiple reasons for the hung df -h like :

1. May be CIFS server is not responding.

2. May be there is a problem with the network connection between the RHEL server and the CIFS server.

3. Finally, it is also possible that there is a problem with the CIFS file system itself.

Once you found out the reason for hung df -h , then use lazy unmount :

umount -l <mountpath>

then, mount the file system using mount -a. This should resolve your issue. 

Here are some additional tips for troubleshooting if df -h hangs for a CIFS mount:

  • Check CIFS server's logs for any errors.
  • Check server's logs for any errors.
  • Try mounting the CIFS file system from a different server.
0 Kudos
Join the discussion
You must log in to join this conversation.