Sometimes when I remove SD card I can notice that when I reinsert it - it doesn't mount by itself. Also I've notice that umount process is stalled and I cannot kill it (not even with -9). I use Ubuntu 14.04.
Any idea what I do wrong?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
First things first: get out from that directory :) Joking.. but not so much, thinking how many times I run
umount and it gives me back an error because I'm indeed inside the mounted folder.
lsof | grep <your_sd_card_directory_here>, to check if that directory is in use.
Example output of
lsof | grep /mnt/share,
/mnt/share is mounted:
COMMAND PID TID USER FD TYPE DEVICE SIZE/OFF NODE NAME lsof 11930 root cwd DIR 253,2 15 213678 /mnt/share
This is showing that
lsof is being run exactly from
/mnt/share with FD (File Descriptor) cwd, the Current Working Directory.
If you see the same.. get out from that directory ;)
umount process is stuck in system call and kernel waiting for something - perhaps it's a bad driver issue, because normally USB drivers correctly handle such situations and let userspace processes go on to exit, instead of hanging them into kernel mode, when user suddenly pulls out USB stick or SD card from reader.