From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,21af6d668211ab0f X-Google-Attributes: gidfee84,public 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 Message-ID: <89k53r$kcg$1@mailint03.im.hou.compaq.com>#1/1 X-Deja-AN: 591958495 Distribution: world References: <38BD900B.15A16233@iskp.uni-bonn.de> X-Complaints-To: usenet@mailint03.im.hou.compaq.com X-Trace: mailint03.im.hou.compaq.com 951949243 20880 16.82.16.67 (1 Mar 2000 22:20:43 GMT) Organization: Digital Equipment Corporation Reply-To: alan@nabeth.cxo.dec.com (Alan Rollow - Dr. File System's Home for Wayward Inodes.) NNTP-Posting-Date: 1 Mar 2000 22:20:43 GMT Newsgroups: comp.unix.osf.osf1 In article <38BD900B.15A16233@iskp.uni-bonn.de>, Harald van Pee 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