Home > Bash, Linux, Ubuntu > Kill processes for busy mount share

Kill processes for busy mount share

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:
  1. No comments yet.
  1. No trackbacks yet.