Entity Opt Dell

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Tuesday, May 21, 2013

Umount a stalled/frozen NFS mount point

Posted on 7:43 AM by Unknown
NFS is known to be a little nasty when it comes to umount stalled shares.

Most of the time a simple umount doesn't work, which is a bit frustrating specially when it comes to production servers; The process just hangs and there is no way to interrupt...

Below two procedures to umount stalled  NFS shares. You should try method one before method two as it requires some network "hacks".

Method 1 :

Use a forced lazy umount, this method works 90% of the time :
 # umount -f -l /mnt/nfs_share
Note : Don't use bash auto-completion !!!


Method 2:

This method is to be used only if method one failed.

The trick is to temporarily steal the NFS server IP adress on the NFS client (the one with stalled mount) so this client thinks that the NFS server is still alive.

Warning : Use method 1 above if your NFS server is still reachable from the NFS client. Otherwise you'll have an IP conflit and trust me you really don't want that to happen.

Let's assume the NFS server IP is 192.168.0.1
  1. Double check that the NFS server is down with ping or nmap.
  2. If your NFS client has very restrictive IPTables rules shut them down temporarily
  3. On the NFS client, set the NFS server IP as secondary address
  4.  # ifconfig eth0:0 192.168.0.1  
    Note : Adjust interface to your own needs
  5. Umount the NFS with a forced lzay umount
  6.  # umount -f -l /mnt/nfs_share  
    Note : Don't use bash auto-completion !!!

  7.  Check that the NFS mount is gone
  8. Remove secondary interface
     # ifconfig eth0:0 down  
    Note : Adjust interface to your own needs
  9. Restart IPTables if needed
  10. Be happy
  11. Go to sleep, it's been a long day (or night)
 If you have multiple NFS clients stalled, you can set the secondary IP on one client only.
  • Client 1 : Step 1 to 5
  • Client 2 to n : Step 4 and 5
  • Client 1 : Step 6 to 9

This will only work if your NFS client can communicate between each others (watch for IPTables or any other filtering softwares/devices).

Hope that helps ! (that helped me a lot :)
    Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
    Posted in cli, File Systems, Linux, NFS, Shell | No comments
    Newer Post Older Post Home

    0 comments:

    Post a Comment

    Subscribe to: Post Comments (Atom)

    Popular Posts

    • Whitelist files with Clamav
      Exclude files from scan : Sometimes, you will need to whitelist files from a scan, clamscan offers the --exclude option but its usage is not...
    • omreport : failed to load external entity "/opt/dell/srvadmin/var/lib/openmanage/xslroot//oma/cli/about.xsl"
      If you're having the following error when executing omreport : I/O warning : failed to load external entity "/opt/dell/srvadmin/va...
    • Bash : Wait for a command with timeout
      Here is a very useful little command that wait for a process to finish and kill it if doesn't exit after a pre defined timeout. The comm...
    • Fixing the "ExSec32.dll is incompatible with Microsoft Outlook" Error
      The Problem I had a user who the the following error on the computer "The file ExSec32.dll is incompatible with Microsoft Outlook. Inst...
    • Easy way to find your public IP in scripts or CLI
      There is a lot of online tools that gives your public IP but most of them are either not accepting cli User-Agent or they requires nasty par...
    • Windows Update on Windows 7 failing at Configuring Updates
      The Problem So I had a strange problem. I have over the last couple of months had a problem where occasionally my computer when shutting dow...
    • Juniper JunOS transfer on commit fails
      I had quite a surprise when I discover that my transfer on commit stopped working on my SRX firewall. The error in the logfile was : ACCT_X...
    • Shrew VPN Client + Juniper SRX : "session terminated by gateway" (Autodisconnect)
      If like me, you're trying to connect to a Juniper dynamic VPN with Shrew VPN Client, be aware that this not yet possible. The connection...
    • IE8 Strikes again
      Summary: My wife tells me that the internet seems slow on our Desktop at home. She says it seems to get worse using 2 tabs. After using it ...
    • Enable LDAP SSL/TLS user authentification in Zabbix
      By default Zabbix Web interface doesn't offer the SSL/TLS encryption option for the LDAP connector however the feature is available in t...

    Categories

    • 007
    • 7
    • A+
    • Academic
    • Anti Virus
    • Antivirus Live
    • Avaya
    • AverPen
    • Bash
    • Begin
    • broken
    • Bugs
    • CentOS
    • CentOS 6.3
    • Centos 6.4
    • Certifications
    • CIP
    • ClamAV
    • Clean Slate
    • cli
    • CompTIA
    • Dead
    • Deal
    • Dell
    • Desktops
    • DHCP
    • Digital Camera
    • EBS
    • Error
    • Exchange 2007
    • fail
    • fax
    • File Systems
    • Firefox
    • Firewall
    • Fix
    • Flashback
    • FMTG
    • Fraud
    • FTP
    • GPO
    • Hard drive
    • Hardware
    • ICOP
    • IE8
    • Imaging
    • In-Car Video
    • Internet
    • Internet Explorer
    • IPO
    • ISA
    • Juniper
    • Kernel
    • Kodak
    • License
    • Linux
    • Microsoft
    • Microsoft Office
    • NERC
    • Network
    • Network+
    • Networking
    • NFS
    • Office 2010
    • OpenManage
    • Outlook2010
    • PDF
    • Performances
    • Phones
    • Ports
    • Presentation
    • printer
    • Protection
    • RAID
    • Remote
    • Renewal
    • Scam
    • SCE
    • Script
    • Security
    • Security+
    • Services
    • Shell
    • Shrew
    • Silverlight
    • SMS
    • SRX
    • SteadyState
    • Symantec
    • sysinternals
    • System
    • Tech
    • Text
    • Timer
    • Times Up
    • Tip
    • UAC
    • Unbootable
    • update
    • Virus
    • Virus Removal
    • VPN
    • Whiteboard
    • Windows
    • Windows 8
    • Windows Phone
    • Windows Server
    • Windows Update
    • Wireless
    • WSUS
    • Yahoo
    • Zabbix

    Blog Archive

    • ▼  2013 (36)
      • ►  October (5)
      • ►  September (1)
      • ►  August (1)
      • ►  July (4)
      • ►  June (2)
      • ▼  May (12)
        • omreport : failed to load external entity "/opt/de...
        • DRAC Firmware update failed : Error: 30001 Method ...
        • Yum stuck/hangs at "Running Transaction Test"
        • Umount a stalled/frozen NFS mount point
        • Remove absolute path from MD5 file
        • Whitelist files with Clamav
        • Multiple cluster per site, Site Recovery Manager (...
        • Enable LDAP SSL/TLS user authentification in Zabbix
        • Dell 11-12th gen 710-720 firmware update observations
        • Updated*** Dell OpenManage 7.2 on ESXi5 fails with...
        • Windows Server 2008R2 missing gateway IP address
        • Hello!
      • ►  April (6)
      • ►  March (2)
      • ►  February (1)
      • ►  January (2)
    • ►  2012 (9)
      • ►  September (1)
      • ►  April (3)
      • ►  March (1)
      • ►  January (4)
    • ►  2011 (18)
      • ►  December (2)
      • ►  November (1)
      • ►  October (1)
      • ►  September (3)
      • ►  August (2)
      • ►  July (1)
      • ►  May (1)
      • ►  March (1)
      • ►  February (2)
      • ►  January (4)
    • ►  2010 (13)
      • ►  December (2)
      • ►  November (1)
      • ►  October (2)
      • ►  August (2)
      • ►  March (1)
      • ►  February (3)
      • ►  January (2)
    • ►  2009 (7)
      • ►  December (2)
      • ►  October (4)
      • ►  September (1)
    Powered by Blogger.

    About Me

    Unknown
    View my complete profile