From: Francis Moreau <francis.moro@gmail.com>
To: LKML <linux-kernel@vger.kernel.org>
Subject: Re: Can't umount /mnt/dev after calling dd(1) and with /mnt/dev is a bind mount
Date: Sun, 30 Mar 2014 09:54:11 +0200 [thread overview]
Message-ID: <5337CDA3.7000906@gmail.com> (raw)
In-Reply-To: <532DBFC8.4020202@gmail.com>
up
On 03/22/2014 05:52 PM, Francis Moreau wrote:
> Hello,
>
> I'm posting here because it might be a behaviour related to the kernel
> internals that I can't explain from my user point of view :)
>
> Basically I'm doing this:
>
> mount -o bind /dev/ /mnt/dev &&
> chroot /mnt dd bs=440 conv=notrunc count=1 if=gptmbr.bin of=/dev/loop0
> umount /mnt/dev
>
> but umount gives the following error: "umount: /mnt/dev: target is busy"
>
> I tried to see if any processes were still using a file in dev with
> fuser(1) but there weren't. Futhermore inserting a call to fuser(1)
> right before umount fixed the issue, so it really seems a timing issue.
>
> stracing umount showed that umount failed here:
> umount("/mnt/dev", 0) = -1 EBUSY (Device or resource busy)
>
> I replaced the bind mount of /dev by:
> mount -t devtmpfs none /mnt/dev
> and it worked.
>
> Could anybody tell me what I'm doing wrong ?
>
> Thanks.
>
prev parent reply other threads:[~2014-03-30 7:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-22 16:52 Can't umount /mnt/dev after calling dd(1) and with /mnt/dev is a bind mount Francis Moreau
2014-03-22 19:24 ` Al Viro
2014-03-22 20:30 ` Francis Moreau
2014-03-30 7:54 ` Francis Moreau [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5337CDA3.7000906@gmail.com \
--to=francis.moro@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox