Saturday, May 15, 2021

Unmounting stuck nfs mounts

 

This usually happens when the nfs server is down, you cannot umount the nfs mount, because the system will say "not found or server not reachable"

$ sudo umount /opt/logs/production

umount.nfs: nfs.local:/var/lib/backup: not found / mounted or server not reachable

umount.nfs: nfs.local:/var/lib/backup: not found / mounted or server not reachable

To fix this, you need to force mount it with lazy flag:

$ sudo umount -f -l /opt/logs/production
where -f is to do force unmount, and -l is for lazy unmounting. From man:
"Lazy  unmount.  Detach  the  filesystem from the filesystem hierarchy now, and cleanup all references to the filesystem as soon as it is not busy anymore."

Post borrowed from: https://www.linuxwave.info/2013/06/unmounting-stuck-nfs-mounts.html

Thursday, May 6, 2021

Fuzzy finder

 I learned recently about the fzf linux cli command. This is a text finder similar to grep but a lot more powerful. It can be used not only to find text but files as well in an interaftive mode.


It exists as a package for debian and its github page is: https://github.com/junegunn/fzf