Thursday, May 9, 2024
 Popular · Latest · Hot · Upcoming
25
rated 0 times [  25] [ 0]  / answers: 1 / hits: 36263  / 2 Years ago, mon, january 24, 2022, 10:20:45

I have tried to kill the process:



  sam@sam-desktop:~$ ps -aux|grep sda
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
root 2898 0.0 0.0 0 0 ? S 11:39 0:00 [jbd2/sda6-8]
root 2899 0.0 0.0 2300 716 ? D 11:39 0:00 mount -t ext4 -o uhelper=udisks,nodev,nosuid /dev/sda6 /media/634bad56-5543-40fe-843b-cd31f4a95dba_
sam 2973 0.0 0.0 3328 876 pts/0 S+ 14:13 0:00 grep --color=auto sda
sam@sam-desktop:~$ sudo kill -9 2898
sam@sam-desktop:~$ sudo kill -9 2899
sam@sam-desktop:~$ sudo killall -9 2898
2898: no process found
sam@sam-desktop:~$ sudo killall -9 2899
2899: no process found
sam@sam-desktop:~$ ps -aux|grep sda
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
root 2898 0.0 0.0 0 0 ? S 11:39 0:00 [jbd2/sda6-8]
root 2899 0.0 0.0 2300 716 ? D 11:39 0:00 mount -t ext4 -o uhelper=udisks,nodev,nosuid /dev/sda6 /media/634bad56-5543-40fe-843b-cd31f4a95dba_
sam 2987 0.0 0.0 3328 872 pts/0 S+ 14:22 0:00 grep --color=auto sda
sam@sam-desktop:~$


After suggestions I tried:



 sam@sam-desktop:~$ sudo umount -f      /media/634bad56-5543-40fe-843b-cd31f4a95dba_
umount2: Invalid argument
umount: /media/634bad56-5543-40fe-843b-cd31f4a95dba_: not mounted
sam@sam-desktop:~$ sudo umount -l /media/634bad56-5543-40fe-843b-cd31f4a95dba_
umount: /media/634bad56-5543-40fe-843b-cd31f4a95dba_: not mounted
sam@sam-desktop:~$

More From » kernel

 Answers
6

A few points:




  • killall only takes process names so your syntax there was incorrect.


  • [bracketed] processes are kernel threads which aren't going to respond to being killed by a userspace program like kill.


  • Something like mount is waiting for the kernel to respond. It should mount and then close. The only time it hangs is when the mount can't go through, AFAIK. Consider using -v in your mount options to see the exact problem.




I think you want to try sudo umount -f /media/634bad56-5543-40fe-843b-cd31f4a95dba_ and if that doesn't work: sudo umount -l /media/634bad56-5543-40fe-843b-cd31f4a95dba_. I would hope the kernel would see the unmount and would stop the previous mount operation.



Also if this is a mount from your /etc/fstab, you might want to consider using UUIDs instead of "/dev/sdxn" devices which can change name between boots.


[#41505] Tuesday, January 25, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ouschee

Total Points: 485
Total Questions: 88
Total Answers: 106

Location: Central African Republic
Member since Mon, Aug 10, 2020
4 Years ago
ouschee questions
;