Unix tip: Rescuing files from lost+found

May 6, 2008, 09:23 AM —  ITworld.com — 

The lost+found directory included in (Unix) file systems is usually empty. Only used when fsck doesn't know what to do with files that have lost their place in the file system, they stand as a temporary holding place for those rare instances in which fsck can't put everything back together after file systems have become corrupt in some way. If you see files in lost+found, you can expect them to look rather unusual. Take these files found on a Solaris 9 system after a panic and a subsequent fsck:

  -rw-r--r-- 1 johndoe staff 1576 Apr 22 11:26 #00805349
  -rw-r--r-- 1 johndoe staff 4363 Apr 22 11:26 #00805350
  -rw-r--r-- 1 johndoe staff 4566 Apr 22 11:26 #00805351

The names of these files were lost before fsck tried to piece things back together. The directory that had originally contained the salvaged files was, for some reason, not recoverable. And, since filenames are stored in directory files and nowhere else on ufs file systems, what we are able to recover for these files are the various pieces of information stored in the files' inodes — the owners, groups, access permissions and pointers to the files' contents.

Sign up for ITworld's Daily newsletter
Follow ITworld on Twitter @IT_world

I like it!
Close

On Twitter now

unix

Powered by Twitter
You are logged in | Sign out
Sign in and post to Twitter

What are you thinking?

Cancel Tweet sent

On Twitter now

Comments

Untrue

Most of what you wrote is highly inaccurate and very incomplete. And when someone begins looking in their lost+found folder its for a reason,not just to look around. So, you should have taken any inquiries more to heart.

People looking for recovery of large groups of files that are listed here need methods of recovery not inaccurate commands that result in errors and a passe way of measuring the importance of the files that might be located here.
| reply

Lost+found

Jim, I wish you would have clarified what was inaccurate and provided some resources and more information. I thought the article was very incomplete, to the point of not being useful to anyone even halfway command line savvy. Other than mentioning the filenames representing inode numbers, the rest of the article was fluff. It was rather disappointing considering the poster is co-author of the O'Reilly Backup and Reocvery book.

The kind of information I expected to find was, "How do you piece those lost+found files back together with any precision if they are pieces of binary files?" That would have been very useful for anyone trying to dig out from a corrupt file system. Of course the real answer is, keep a current backup with tested recovery routines to reconstruct a drive after such a "crash."

Please shsre what you know regarding recovery with lost+found files. Thanks!

| reply

replica bags

Women like jewelry replica bags as men like cars ,yet ,they are more crazy .They also like cloths ,but don't as much as replica handbags .Jewelry give more confident to them ,that why jewelry industries are so lucrative .
| reply
peer-to-peer

Esther Schindler
If the comments are ugly, the code is ugly

claird
SVG a graphics format for 21st century

pasmith
Take Chrome OS for a test spin

Sandra Henry-Stocker
Solaris Tip: Have Your Files Changed Since Installation?

sjvn
64-bits of protection?

jfruh
Android fragments vs. the iPhone monolith

mikelgan
What Gizmodo missed about the Pro WX Wireless USB disk drive

 

Sidekick: The Good News & the Bad News
Either way you look at it Microsoft Data Center management did not follow standards or best practices in this failure. In which case it makes me wonder more about the outsourcing of corporate data much less personal data.
- mburton325

Join the conversation here

The Daily Tip

The Daily TipQuick, practical advice for IT pros. Made fresh daily.

Hot tips:

Want to cash in on your IT savvy? Send your tip to tips@itworld.com. If we post it, we'll send you a $25 Amazon e-gift card.

Newsletters

Subscribe to ITWORLD TODAY and receive the latest IT news and analysis.

I would like to receive offers via email from ITworld partners.
By clicking submit you agree to the terms and conditions outlined in ITworld's privacy policy.
Featured Sponsor

AISO founders envisioned a Web hosting company that was environmentally friendly. While the company employed energy-efficient innovations like solar panels, its infrastructure produced unacceptable power and cooling requirements. Find out how AISO leveraged AMD technology to overcome their challenge in this case study white paper.

In this whitepaper, Scalar explores the opportunity to change the landscape with respect to mission critical databases built around Oracle. Leveraging technologies such as Linux, high-end commodity processing power and Oracle RAC technology to architect, design, build and maintain database infrastructure that delivers maximum availability, reliability and performance at a fraction of traditional cost.

On a typical day, weather.com, the Web site for The Weather Channel in Atlanta, serves up between 15 million and 20 million page views. But in September 2004, when back-to-back hurricanes ransacked Florida, the peak traffic on one day more than tripled: over 70 million page views by more than 7 million unique visitors. Read the full success story now.

Marketplace