From: Andreas Dilger <adilger@turbolinux.com>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Renaming lost+found
Date: Mon, 29 Jan 2001 00:17:12 -0700 (MST) [thread overview]
Message-ID: <200101290717.f0T7HD126365@webber.adilger.net> (raw)
In-Reply-To: <9523bg$7dc$1@cesium.transmeta.com> from "H. Peter Anvin" at "Jan 28, 2001 01:35:44 pm"
H. Peter Anvin writes:
> Hello people... the original question was: can lost+found be
> *renamed*, i.e. does the tools (e2fsck &c) use "/lost+found" by name,
> or by inode? As far as I know it always uses the same inode number
> (11), but I don't know if that is anywhere enforced.
Bzzt. /lost+found just happens to use inode 11 on 99.9% of filesystems
because it is the first inode available when mke2fs is creating the
filesystem. If you check <linux/ext2_fs.h>, it has:
#define EXT2_GOOD_OLD_FIRST_INO 11
It is perfectly acceptable to delete lost+found, and create it again
with mklost+found, and chances are it will have a different inode...
Just tested it, and sure enough, I got inode 612 for lost+found this time.
I'm pretty sure that e2fsck looks for the name /lost+found, rather than
inode 11.
This means that with stock e2fsck, mke2fs, mklost+found, you can't rename
lost+found and expect anything to work. However, I would imagine it isn't
_too_ hard to change these tools to create a different directory, and for
e2fsck to look for the standard or the new directory to put nameless inodes.
Looking at the e2fsck source, there only appears to be a single instance of
the string "lost+found", in e2fsck/pass3.c:get_lost_and_found():
static const char name[] = "lost+found";
Same with misc/mke2fs.c:create_lost_and_found() and misc/mklost+found.
Cheers, Andreas
PS - don't blame me if you never find your files after a bad crash. At
least when it is called "lost+found" you occasionally have a look
in there.
--
Andreas Dilger \ "If a man ate a pound of pasta and a pound of antipasto,
\ would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/ -- Dogbert
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2001-01-29 7:18 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-26 13:13 Rob Kaper
2001-01-26 13:49 ` Richard B. Johnson
2001-01-26 18:19 ` James Lewis Nance
2001-01-26 20:05 ` Rodrigo Barbosa (aka morcego)
2001-01-27 20:43 ` Stephen C. Tweedie
2001-01-28 19:26 ` Chris Mason
2001-01-27 23:14 ` Thunder from the hill
2001-01-28 21:35 ` H. Peter Anvin
2001-01-28 21:41 ` Mo McKinlay
2001-01-28 21:56 ` Support for 802.11 cards? Mike Pontillo
2001-01-28 22:07 ` John Jasen
2001-01-28 23:23 ` Michael H. Warfield
2001-01-29 0:13 ` Joe deBlaquiere
2001-01-29 2:00 ` Anton Blanchard
2001-01-29 18:18 ` Bryan O'Sullivan
2001-01-30 1:09 ` Mike Pontillo
2001-01-29 6:41 ` Renaming lost+found Mike Galbraith
2001-01-29 7:17 ` Andreas Dilger [this message]
2001-01-31 15:32 ` tytso
2001-01-26 19:24 ` Andreas Dilger
2001-01-26 19:45 ` patrick.mourlhon
[not found] ` <200101262005.PAA05246@mah21awu.cas.org>
2001-01-26 20:21 ` patrick.mourlhon
2001-01-26 22:09 NDias
2001-01-27 21:01 ` Albert D. Cahalan
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=200101290717.f0T7HD126365@webber.adilger.net \
--to=adilger@turbolinux.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®