It appears that I cannot unmount dev
after mounting it. I am running on Ubuntu 18.04.2 LTS
with 4.15.0-1052-aws
.
mkdir -p ~/jail/dev
pushd ~/jail
sudo mount --rbind /dev dev/
sudo umount dev/
umount: /home/ubuntu/Code/conversations/jail/dev: target is busy.
Is there some way I can unmount it without rebooting my machine?
Alternately, is there a way I can mount it so that it is easier to unmount?
Update: This is the output of lsof /home/ubuntu/Code/conversations/jail/dev
:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
kdevtmpfs 55 root cwd DIR 0,6 2980 2 dev
kdevtmpfs 55 root rtd DIR 0,6 2980 2 dev
--rbind
, which is a recursive bind mount. – sourcejedi Nov 01 '19 at 20:40