From: Willy Tarreau <w@1wt.eu>
To: NeilBrown <neilb@suse.de>
Cc: "Andrew Morton" <akpm@linux-foundation.org>,
"Lothar Waßmann" <lw@karo-electronics.de>,
linux-kernel@vger.kernel.org
Subject: Re: linux-2.6.25: 'mkdir -p' does not work with rootdir as mount point inside a read only filesystem
Date: Sat, 3 May 2008 08:32:31 +0200 [thread overview]
Message-ID: <20080503063231.GA688@1wt.eu> (raw)
In-Reply-To: <53722.192.168.1.70.1209711343.squirrel@neil.brown.name>
On Fri, May 02, 2008 at 04:55:43PM +1000, NeilBrown wrote:
> On Fri, May 2, 2008 2:52 pm, Andrew Morton wrote:
> > On Wed, 30 Apr 2008 16:50:20 +0200 Lothar Wa__mann
> > <LW@KARO-electronics.de> wrote:
> >
> >> Hi,
> >
> > (y'know that ~4000 people read your email and hit 'n'? Except for me?
> > That's one bug I'd like to get fixed)
>
> Tricky....
>
> >
> >> when trying to create a directory path with 'mkdir -p' with the root
> >> being a mount point of a writeable filesystem that exists inside a
> >> read-only file system, mkdir return -EROFS.
>
> My guess is that you have an old/buggy version of mkdir.
>
> What does
> mkdir --version
>
> say?
> Mine says:
> mkdir (GNU coreutils) 6.10
> Copyright (C) 2008 Free Software Foundation, Inc.
> etc...
I would bet this is the problem for the reporter.
I tried the same here, and cannot exhibit the problem. Just like the
reporter, my / is ro and /dev is rw :
# mkdir --version
mkdir (coreutils) 5.2.1
...
# uname -a
Linux alix-2C3 2.6.25-wt4-alix #3 Thu Apr 24 08:30:05 CEST 2008 i586 i586 i386 GNU/Linux
(this is essentially 2.6.25+squashfs+some geode patches)
# mount
/dev/sda4 on / type ext3 (ro,errors=continue,data=ordered)
/dev on /dev type tmpfs (rw,size=0k,nr_inodes=4096,mode=755)
# mkdir -p /dev/a/b/c
# ls -lad /dev/a/b/c
drwxr-xr-x 2 root root 40 Jan 3 00:49 /dev/a/b/c/
# rmdir -p /dev/a/b/c
rmdir: `/dev': Read-only file system
# strace mkdir -p /dev/a/b/c
stat64("/dev/a/b/c", 0xbf9175dc) = -1 ENOENT (No such file or directory)
umask(0) = 022
open(".", O_RDONLY|O_LARGEFILE|O_DIRECTORY) = 3
chdir("/") = 0
mkdir("dev", 0755) = -1 EEXIST (File exists)
stat64("dev", {st_mode=S_IFDIR|0755, st_size=17080, ...}) = 0
chdir("dev") = 0
mkdir("a", 0755) = 0
chdir("a") = 0
mkdir("b", 0755) = 0
chdir("b") = 0
umask(022) = 0
mkdir("c", 0777) = 0
fchdir(3) = 0
close(3) = 0
Regards,
Willy
next prev parent reply other threads:[~2008-05-03 6:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-30 14:50 linux-2.6.25: 'mkdir -p' does not work with rootdir as mount point inside a read only filesystem Lothar Waßmann
2008-05-02 4:52 ` Andrew Morton
2008-05-02 6:55 ` NeilBrown
2008-05-03 6:32 ` Willy Tarreau [this message]
2008-05-05 6:27 ` Lothar Waßmann
2008-05-05 7:02 ` Willy Tarreau
2008-05-05 7:08 ` Lothar Waßmann
2008-05-05 7:28 ` Willy Tarreau
2008-05-05 7:38 ` Lothar Waßmann
2008-05-05 12:02 ` Al Viro
2008-05-02 11:32 ` Dan Noé
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=20080503063231.GA688@1wt.eu \
--to=w@1wt.eu \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lw@karo-electronics.de \
--cc=neilb@suse.de \
/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.