Can't unmount drive without killing bash [duplicate]
Clash Royale CLAN TAG#URR8PPP
This question already has an answer here:
Busy Device on Umount
6 answers
umount /home does not work
7 answers
Mounting and unmounting in same shell script results in error
2 answers
I don't know whether its normal or not but when I mount a filesystem(ext4 partition, USB, SD card etc) via command line, I can't unmount it because it says target is busy
It is the bash process which is using/accessing it.
So I have to kill it first and then only can unmount the drive. As you have guessed, when I kill the bash process the terminal shuts down.and I have to reopen the terminal and unmount the drive.
Is it normal ? I don't remember it happening the last time I unmounted something.
bash usb-drive unmounting
marked as duplicate by Kusalananda
StackExchange.ready(function()
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();
);
);
);
Feb 16 at 17:42
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
Busy Device on Umount
6 answers
umount /home does not work
7 answers
Mounting and unmounting in same shell script results in error
2 answers
I don't know whether its normal or not but when I mount a filesystem(ext4 partition, USB, SD card etc) via command line, I can't unmount it because it says target is busy
It is the bash process which is using/accessing it.
So I have to kill it first and then only can unmount the drive. As you have guessed, when I kill the bash process the terminal shuts down.and I have to reopen the terminal and unmount the drive.
Is it normal ? I don't remember it happening the last time I unmounted something.
bash usb-drive unmounting
marked as duplicate by Kusalananda
StackExchange.ready(function()
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();
);
);
);
Feb 16 at 17:42
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
1
If youcd
into the mountpoint, it will be openend bybash
so of course it will be busy.cd $HOME
and then try to unmount, or usesudo fuser /mount/point
to figure out what else is using the process
– Sergiy Kolodyazhnyy
Feb 16 at 17:24
I am using fuser to detect the PID and than look it up in TOP (let me know if there's is any short cut rather than running top to identify the process). Let me just try mount and unmount in quick succession without touching anything else. BRB
– Just Khaithang
Feb 16 at 17:27
Well, not sure if it's shortcuts but I'd useps -p 1234 -o args
where 1234 is pid, or just examine/proc/1234/cmdline
– Sergiy Kolodyazhnyy
Feb 16 at 17:31
thanks for the short cut and yap you are right, it most probably was me cding into the mounted drive and could recollect a thing what I was doing. whew that's was quick.
– Just Khaithang
Feb 16 at 17:36
1
Alright, I'll make it a proper answer then
– Sergiy Kolodyazhnyy
Feb 16 at 17:38
add a comment |
This question already has an answer here:
Busy Device on Umount
6 answers
umount /home does not work
7 answers
Mounting and unmounting in same shell script results in error
2 answers
I don't know whether its normal or not but when I mount a filesystem(ext4 partition, USB, SD card etc) via command line, I can't unmount it because it says target is busy
It is the bash process which is using/accessing it.
So I have to kill it first and then only can unmount the drive. As you have guessed, when I kill the bash process the terminal shuts down.and I have to reopen the terminal and unmount the drive.
Is it normal ? I don't remember it happening the last time I unmounted something.
bash usb-drive unmounting
This question already has an answer here:
Busy Device on Umount
6 answers
umount /home does not work
7 answers
Mounting and unmounting in same shell script results in error
2 answers
I don't know whether its normal or not but when I mount a filesystem(ext4 partition, USB, SD card etc) via command line, I can't unmount it because it says target is busy
It is the bash process which is using/accessing it.
So I have to kill it first and then only can unmount the drive. As you have guessed, when I kill the bash process the terminal shuts down.and I have to reopen the terminal and unmount the drive.
Is it normal ? I don't remember it happening the last time I unmounted something.
This question already has an answer here:
Busy Device on Umount
6 answers
umount /home does not work
7 answers
Mounting and unmounting in same shell script results in error
2 answers
bash usb-drive unmounting
bash usb-drive unmounting
asked Feb 16 at 17:20
Just KhaithangJust Khaithang
62
62
marked as duplicate by Kusalananda
StackExchange.ready(function()
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();
);
);
);
Feb 16 at 17:42
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by Kusalananda
StackExchange.ready(function()
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();
);
);
);
Feb 16 at 17:42
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
1
If youcd
into the mountpoint, it will be openend bybash
so of course it will be busy.cd $HOME
and then try to unmount, or usesudo fuser /mount/point
to figure out what else is using the process
– Sergiy Kolodyazhnyy
Feb 16 at 17:24
I am using fuser to detect the PID and than look it up in TOP (let me know if there's is any short cut rather than running top to identify the process). Let me just try mount and unmount in quick succession without touching anything else. BRB
– Just Khaithang
Feb 16 at 17:27
Well, not sure if it's shortcuts but I'd useps -p 1234 -o args
where 1234 is pid, or just examine/proc/1234/cmdline
– Sergiy Kolodyazhnyy
Feb 16 at 17:31
thanks for the short cut and yap you are right, it most probably was me cding into the mounted drive and could recollect a thing what I was doing. whew that's was quick.
– Just Khaithang
Feb 16 at 17:36
1
Alright, I'll make it a proper answer then
– Sergiy Kolodyazhnyy
Feb 16 at 17:38
add a comment |
1
If youcd
into the mountpoint, it will be openend bybash
so of course it will be busy.cd $HOME
and then try to unmount, or usesudo fuser /mount/point
to figure out what else is using the process
– Sergiy Kolodyazhnyy
Feb 16 at 17:24
I am using fuser to detect the PID and than look it up in TOP (let me know if there's is any short cut rather than running top to identify the process). Let me just try mount and unmount in quick succession without touching anything else. BRB
– Just Khaithang
Feb 16 at 17:27
Well, not sure if it's shortcuts but I'd useps -p 1234 -o args
where 1234 is pid, or just examine/proc/1234/cmdline
– Sergiy Kolodyazhnyy
Feb 16 at 17:31
thanks for the short cut and yap you are right, it most probably was me cding into the mounted drive and could recollect a thing what I was doing. whew that's was quick.
– Just Khaithang
Feb 16 at 17:36
1
Alright, I'll make it a proper answer then
– Sergiy Kolodyazhnyy
Feb 16 at 17:38
1
1
If you
cd
into the mountpoint, it will be openend by bash
so of course it will be busy. cd $HOME
and then try to unmount, or use sudo fuser /mount/point
to figure out what else is using the process– Sergiy Kolodyazhnyy
Feb 16 at 17:24
If you
cd
into the mountpoint, it will be openend by bash
so of course it will be busy. cd $HOME
and then try to unmount, or use sudo fuser /mount/point
to figure out what else is using the process– Sergiy Kolodyazhnyy
Feb 16 at 17:24
I am using fuser to detect the PID and than look it up in TOP (let me know if there's is any short cut rather than running top to identify the process). Let me just try mount and unmount in quick succession without touching anything else. BRB
– Just Khaithang
Feb 16 at 17:27
I am using fuser to detect the PID and than look it up in TOP (let me know if there's is any short cut rather than running top to identify the process). Let me just try mount and unmount in quick succession without touching anything else. BRB
– Just Khaithang
Feb 16 at 17:27
Well, not sure if it's shortcuts but I'd use
ps -p 1234 -o args
where 1234 is pid, or just examine /proc/1234/cmdline
– Sergiy Kolodyazhnyy
Feb 16 at 17:31
Well, not sure if it's shortcuts but I'd use
ps -p 1234 -o args
where 1234 is pid, or just examine /proc/1234/cmdline
– Sergiy Kolodyazhnyy
Feb 16 at 17:31
thanks for the short cut and yap you are right, it most probably was me cding into the mounted drive and could recollect a thing what I was doing. whew that's was quick.
– Just Khaithang
Feb 16 at 17:36
thanks for the short cut and yap you are right, it most probably was me cding into the mounted drive and could recollect a thing what I was doing. whew that's was quick.
– Just Khaithang
Feb 16 at 17:36
1
1
Alright, I'll make it a proper answer then
– Sergiy Kolodyazhnyy
Feb 16 at 17:38
Alright, I'll make it a proper answer then
– Sergiy Kolodyazhnyy
Feb 16 at 17:38
add a comment |
1 Answer
1
active
oldest
votes
If you cd
into the mountpoint, it will be openend by bash so of course it will be busy. cd $HOME
and then try to unmount. Otherwise use sudo fuser /mount/point
to figure out what else is using the mountpoint or files within it.
source: doing exactly the same mistake and learning from it
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
If you cd
into the mountpoint, it will be openend by bash so of course it will be busy. cd $HOME
and then try to unmount. Otherwise use sudo fuser /mount/point
to figure out what else is using the mountpoint or files within it.
source: doing exactly the same mistake and learning from it
add a comment |
If you cd
into the mountpoint, it will be openend by bash so of course it will be busy. cd $HOME
and then try to unmount. Otherwise use sudo fuser /mount/point
to figure out what else is using the mountpoint or files within it.
source: doing exactly the same mistake and learning from it
add a comment |
If you cd
into the mountpoint, it will be openend by bash so of course it will be busy. cd $HOME
and then try to unmount. Otherwise use sudo fuser /mount/point
to figure out what else is using the mountpoint or files within it.
source: doing exactly the same mistake and learning from it
If you cd
into the mountpoint, it will be openend by bash so of course it will be busy. cd $HOME
and then try to unmount. Otherwise use sudo fuser /mount/point
to figure out what else is using the mountpoint or files within it.
source: doing exactly the same mistake and learning from it
edited Feb 16 at 17:43
Jesse_b
13.3k23370
13.3k23370
answered Feb 16 at 17:40
Sergiy KolodyazhnyySergiy Kolodyazhnyy
10.5k42663
10.5k42663
add a comment |
add a comment |
1
If you
cd
into the mountpoint, it will be openend bybash
so of course it will be busy.cd $HOME
and then try to unmount, or usesudo fuser /mount/point
to figure out what else is using the process– Sergiy Kolodyazhnyy
Feb 16 at 17:24
I am using fuser to detect the PID and than look it up in TOP (let me know if there's is any short cut rather than running top to identify the process). Let me just try mount and unmount in quick succession without touching anything else. BRB
– Just Khaithang
Feb 16 at 17:27
Well, not sure if it's shortcuts but I'd use
ps -p 1234 -o args
where 1234 is pid, or just examine/proc/1234/cmdline
– Sergiy Kolodyazhnyy
Feb 16 at 17:31
thanks for the short cut and yap you are right, it most probably was me cding into the mounted drive and could recollect a thing what I was doing. whew that's was quick.
– Just Khaithang
Feb 16 at 17:36
1
Alright, I'll make it a proper answer then
– Sergiy Kolodyazhnyy
Feb 16 at 17:38