Linux RAID subsystem development
 help / color / mirror / Atom feed
From: Roman Mamedov <rm@romanrm.ru>
To: simonmcnair@gmail.com
Cc: linux-raid@vger.kernel.org
Subject: Re: flummoxed why I can't umount my md device.  fuser and lsof show no files locked
Date: Tue, 21 Jun 2011 00:03:17 +0600	[thread overview]
Message-ID: <20110621000317.156d7d27@natsu> (raw)
In-Reply-To: <4DFF87F8.8050202@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1669 bytes --]

On Mon, 20 Jun 2011 18:48:40 +0100
Simon McNair <simonmcnair@gmail.com> wrote:

> I wanted to run 'mkfs.ext4 -n /dev/md0' to see what settings it would 
> choose that were different to mine but it keeps saying:
> "/dev/md0 is apparently in use by the system; will not make a filesystem 
> here!".
> 
> I also can't stop the array using 'mdadm --stop /dev/md0' as it says 
> mdadm: failed to stop array /dev/md0: Device or resource busy.  pretty 
> much the same error occurs when trying lvchange -an /media/local/Raid
> 
> I've no problem with any of this except I can't find out what process 
> has a handle on the mount and/or why.  so I can't stop/kill it.
> 
> I tried lsof | grep /media/local/Raid and fuser -m /media/local/Raid to 
> no avail.  I also tried ps aux | grep Raid.  I've stopped pretty much 
> everything in init.d including samba,nfs,mediatomb,squeezebox and 
> anything I can think of that I've installed.
> 
> Any advice/ideas please ?

I don't see you mention actually running "umount /media/local/Raid" (and
perhaps listing the error messages you get after that). Perhaps it goes
without saying and you did this, but in case not, remember that "mdadm --stop"
will not try to auto-unmount the filesystem for you first.

Other ideas, AFAIK lsof and fuser won't show you a process that holds the
filesystem mounted in case it doesn't have any files open there, but instead
just has its *current directory* on the FS. So if you launched something while
cd'ed somewhere in /media/local/Raid, and it's still running (maybe the
superuser shell you currently work in?), that'd be your reason.

- 
With respect,
Roman

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2011-06-20 18:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-20 17:48 flummoxed why I can't umount my md device. fuser and lsof show no files locked Simon McNair
2011-06-20 18:03 ` Roman Mamedov [this message]
2011-06-20 18:16   ` Simon McNair
2011-06-20 19:06     ` Phil Turmel

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=20110621000317.156d7d27@natsu \
    --to=rm@romanrm.ru \
    --cc=linux-raid@vger.kernel.org \
    --cc=simonmcnair@gmail.com \
    /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