* Rename a mountpoint (forcibly)?
@ 2013-04-30 22:16 Andy Lutomirski
2013-05-02 13:33 ` J. Bruce Fields
2013-05-02 13:42 ` Al Viro
0 siblings, 2 replies; 3+ messages in thread
From: Andy Lutomirski @ 2013-04-30 22:16 UTC (permalink / raw)
To: Linux FS Devel
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.
--Andy
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Rename a mountpoint (forcibly)?
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
1 sibling, 0 replies; 3+ messages in thread
From: J. Bruce Fields @ 2013-05-02 13:33 UTC (permalink / raw)
To: Andy Lutomirski; +Cc: Linux FS Devel
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.
Maybe you want "mount --move"? Or pivot_root?
--b.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Rename a mountpoint (forcibly)?
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
1 sibling, 0 replies; 3+ messages in thread
From: Al Viro @ 2013-05-02 13:42 UTC (permalink / raw)
To: Andy Lutomirski; +Cc: Linux FS Devel
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-05-02 13:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).