Archive for April, 2020

Kill processes for busy mount share

April 13th, 2020 No comments

If you have hung files to a file share mount, and want to kill the processes in Linux causing the hang, you can try this command. First, modify the mount point to your own!

lsof | grep '/mnt/nas'

If you get hits of processes, and you believe those are causing the hang, kill them with the following command:

lsof | grep '/mnt/nas'|awk '{print $2}'|sudo xargs kill -9

If it still doesn’t work, you can try to remount the share:

mount -o remount /mnt/nas

Or, unmount and then mount again if the above command didn’t work.

umount /mnt/nas
mount /mnt/nas
Categories: Bash, Linux, Ubuntu Tags: