On 07/31/2014 12:49 PM, Malahal Naineni wrote: > Ben Greear [greearb@xxxxxxxxxxxxxxx] wrote: >> So, this has been asked all over the interweb for years and years, but >> the best answer I can find is to reboot the system or create a fake NFS >> server somewhere with the same IP as the gone-away NFS server. >> >> The problem is: >> >> I have some mounts to an NFS server that no longer exists (crashed/powered down). >> >> I have some processes stuck trying to write to files open on these mounts. >> >> I want to kill the process and unmount. >> >> umount -l will make the mount go a way, sort of. But process is still hung. >> umount -f complains: >> umount2: Device or resource busy >> umount.nfs: /mnt/foo: device is busy >> >> kill -9 does not work on process. >> >> >> Aside from bringing a fake NFS server back up on the same IP, is there any >> other way to get these mounts unmounted and the processes killed without >> rebooting? > > You don't need a fake NFS server, you just need a fake or real server > with that IP address. A popular way is to alias that IP on the NFS > client itself. > > See the second popular answer below: > http://stackoverflow.com/questions/40317/force-unmount-of-nfs-mounted-directory In my case, routing is set up so that the NFS traffic always exits the system, so doing a local IP that matches the server is not an option. It also seems like a horrible hack that should have a better solution :P Thanks, Ben > > Regards, Malahal. -- Ben Greear <greearb@xxxxxxxxxxxxxxx> Candela Technologies Inc http://www.candelatech.com -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html