From: alan@nabeth.cxo.dec.com (Alan Rollow - Dr. File System's Home for Wayward Inodes.)
Subject: Re: urgent: ufs fs, can I undelete removed files?
Date: 2000/03/01 [thread overview]
Message-ID: <89k53r$kcg$1@mailint03.im.hou.compaq.com> (raw)
In-Reply-To: 38BD900B.15A16233@iskp.uni-bonn.de
In article <38BD900B.15A16233@iskp.uni-bonn.de>, Harald van Pee <pee@iskp.uni-bonn.de> writes:
>If so how?
Where feasible, the easiest way is to restore them from a backup.
When that isn't feasible, you have do a cost analysis of the
expense of having someone type the contents back in vs. having
someone spend a lot of time sifting through the jigsaw puzzle
that is the file system's free block "list".
When a file is deleted all record of the blocks that belonged
to file the is cleared. The data goes back to the file system's
free space to be used by whatever happens to need a block. The
good news is that until those blocks are reallocated, their
original data is still in them (*). To preserve this data
you'll want to dismount the file system as soon as possible.
Then you can make a physical backup of the file system to
sort through the free blocks, or just keep the file system
out of service.
There are a couple of things that help with sorting through
the free space.
1. Space is organized in groups of cylinders. When a file is
created the blocks tend to be allocated in the same cylinder
group that the directory is in. Large files will have their
scattered over many groups to keep such files from using up
all the space in a group, but for small files, this makes it
easier to find the data.
2. Each cylinder group has a bit map of which blocks are free.
This makes it easier for a custom program to search only
the likely data.
3. On gatekeeper.dec.com in /pub/sysadm is a compressed tar
archive called recover.tar.Z. This is the sources of a
program that knows how to read the DEC OSF/1 (and ULTRIX
for whatever that's worth), cylinder group bitmaps and
examine free blocks for text data. The data examination
routine can be customized if your data isn't text. It
includes a feature to limit search to a specific cylinder
group. The program was used to recover itself. I haven't
touched it in years, but the UFS on-disk structure probably
hasn't changed enough since to be a problem.
Good luck.
(*) Possible exception. There might be a security layered
product which includes the feature of overwriting freed
blocks. If it does and you're using it, too bad.
>
>Harald
>
--
Alan Rollow alan@nabeth.cxo.dec.com
next prev parent reply other threads:[~2000-03-01 5:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-03-01 5:00 urgent: ufs fs, can I undelete removed files? Harald van Pee
2000-03-01 5:00 ` Alan Rollow - Dr. File System's Home for Wayward Inodes. [this message]
2000-03-02 5:00 ` Harald van Pee
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox