public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Alex Schuster <wonko@wonkology.org>
To: gentoo-user@lists.gentoo.org
Subject: [gentoo-user] How to unmount bind-mounted /dev?
Date: Sat, 30 Apr 2011 01:42:21 +0200	[thread overview]
Message-ID: <4DBB4CDD.80306@wonkology.org> (raw)

Hi there!

I want to shrink [*] a partition that holds a 32-bit Gentoo chroot. But
I cannot unmount it, the device is busy because proc and /dev is
bind-mounted there. And I cannot unmount this /dev, again, the device is
busy:

weird ~ # umount /32/dev
umount: /32/dev: device is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))

lsof /32/dev gives a lot of stuff, the same that lsof /dev gives. lsof
/proc also has some lines, but I had no problem unmounting /32/proc.

I could remove the /32/dev entry from fstab and reboot, but I need the
machine up at the moment, and I'm also curious why this is a problem.
Maybe you know?

[*] BTW, I just wrote a script so automatize this. It shrinks the file
system, then reduces the logical volume. It also reduces the size of a
LUKS crypto volume on the LVM.
Enlarging also works, but that already is easy using lvresize,
cryptsetup resize and resize2fs. Shrinking is more tricky though, you
have to calculate the sizes, and things could break if the underlying
partition is made too small.

	Wonko



             reply	other threads:[~2011-04-29 23:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-29 23:42 Alex Schuster [this message]
2011-04-30  6:10 ` [gentoo-user] How to unmount bind-mounted /dev? Thomas Ulrich Nockmann
2011-04-30  9:57   ` Alex Schuster
2011-04-30 10:15     ` Alex Schuster
2011-04-30 23:22       ` Mark Shields
2011-04-30 23:48         ` Alex Schuster
2011-05-01  7:54           ` Mick
2011-05-01 13:08             ` Alex Schuster
2011-05-01 14:42               ` Mick

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=4DBB4CDD.80306@wonkology.org \
    --to=wonko@wonkology.org \
    --cc=gentoo-user@lists.gentoo.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