All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Andy Lutomirski <luto@amacapital.net>
Cc: Linux FS Devel <linux-fsdevel@vger.kernel.org>
Subject: Re: Rename a mountpoint (forcibly)?
Date: Thu, 2 May 2013 14:42:33 +0100	[thread overview]
Message-ID: <20130502134232.GF11630@ZenIV.linux.org.uk> (raw)
In-Reply-To: <CALCETrX5MEAcsdVd2iGDg2UMEJW0tJxWyBH6ceQkJh3xmjy3mQ@mail.gmail.com>

On Tue, Apr 30, 2013 at 03:16:46PM -0700, Andy Lutomirski wrote:
> Is there a way to forcibly rename a mountpoint?  I can rename a
> directory that contains a mountpoint, but even if I bind-mount the
> underlying FS, I get EBUSY if I try to rename a mountpoint.  This is
> annoying -- I want to replace the entire contents of my root partition
> by moving the old contents away and moving replacements in, but the
> mountpoints get in the way.
> 
> Yes, this is evil, but it seems like the kernel is unnecessarily
> preventing my from shooting myself in the foot, and in this case the
> shot-in-the-foot is actually the desired effect.

POSIX, IIRC, and in this case it's really common practice.  As bfields
suggested, use mount --move.

      parent reply	other threads:[~2013-05-02 13:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-30 22:16 Rename a mountpoint (forcibly)? Andy Lutomirski
2013-05-02 13:33 ` J. Bruce Fields
2013-05-02 13:42 ` Al Viro [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=20130502134232.GF11630@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=luto@amacapital.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.