Hi!

Because I didn't find sufficient informations and "try and error"
would be incomplete (and insecure regarding the result), I'd like
to ask the following question:

Let's assume we have a directory D with an inode number i(D).
It contains a file F with its inode number i(F).

May I state that i(D) < i(F)?

I need to ask this in order to solve my data loss problem: I will
need to write a inode recovery program (having iintensive looks
at fsck_ffs' and fsdb's source code) to iterate over all the
inodes.

Maybe this additional question can be answered: Is there a mechanism
that output inode numbers according to a certain algorithm, or is
it random?

If I would try to check every imaginable inode nummer according to
the states "connected", "not connected - orphan" or "not connec-
ted - not used", could I iterate from 1 to the maximum of the
type ino_t, which is __uint32_t?

My idea is to "trace back" orphaned inodes by "brute force" because
fsck_ffs doesn't do the job, but similar to fsck_ffs, they will
be reconnected to the directory they originally have been gnereated
in, or in a kind of lost+found directory when the information from
the respective superstructure (e. g. file names) are lost. I may
assume that at least the inode of my former home directory has
gone away, so if everything else is still there (I have some
evidences from fsdb to assume this), after reconnecting everything
should be accessible. Only the file names from the first hierarchy
level (the files and subdirs directly within the home directory)
would change into #123456 as you know it from fsck_ffs' lost+found,
but the content inside the subdirs should still be present with
the original filenames - assumed that the corresonding inode
information structures are still complete.


Thanks for comments! And please tell me if there's already a
tool that does this! :-)

-- 
Polytropon
>From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to