Operating System - HP-UX
1834800 Members
2785 Online
110070 Solutions
New Discussion

Re: deleted lost+found directory. How to recreate?

 
SOLVED
Go to solution
Joe Profaizer
Super Advisor

deleted lost+found directory. How to recreate?

How do I re-create the lost+found directory? Wondering if there is something special versus just a mkdir?

Thanks!!
5 REPLIES 5
James R. Ferguson
Acclaimed Contributor
Solution

Re: deleted lost+found directory. How to recreate?

Hi Joe:

# mklost+found

...see the man pages (1M) for more information.

Regards!

...JRF...
MANOJ SRIVASTAVA
Honored Contributor

Re: deleted lost+found directory. How to recreate?

Hi Joe


Nothing differnt asl it has to owned by root , thoguh even if it owned by the user it doesnt mater bcoz at this is used if there are any errors in the filesystem when the OS runs a fsck when the system is coming up so you are good to go , jsut ensure that this direcoty is there in the mountpoint.


Manoj Srivastava
Robert-Jan Goossens
Honored Contributor

Re: deleted lost+found directory. How to recreate?

Hi.

Just do

cp -R /home/lost+found /?

Regards,

Robert-Jan.
Ravi_8
Honored Contributor

Re: deleted lost+found directory. How to recreate?

Hi,

it's an unnecessary, unless otherwise system make fsck at boot time. Make sure it exist in /

It cab be craeted using touch lost+found
never give up
Bill Hassell
Honored Contributor

Re: deleted lost+found directory. How to recreate?

lost+found is a critical directory for *ALL* mounted filesystems. Normally, nothing will be in these directories. However, should your system be halted abnormally (such as a power failure or OS crash), it is possible for filesystem corruption to disconnect the name of a file or directory from the inode(s) belonging to that file/directory name.

fsck will fix this problem by assigning a temporary name consisting of the inode number with a # character in front. That way, you can investigate the nature of the file or directory and perhaps figure out what the original file/directory's name might have been.

fsck is very good at solving corruption problems so most files/directories in lost+found are temporary files or directories which were in a state of flux during the system halt. It is a good idea to scan all mountpoints as the system boots to see that:

1. the directory still exists, and

2. it is empty. If there is something in the directory, send an email to sysadmin support so the contents can be investigated.

Some suggestions for investigating:

file lost+found/*

The file command will decode the type of file (well, 'guess' the type of file). If it is a directory, you list the contents:

ll lost+found/\#12345

NOTE: The # character is a comment for the shell so escape it with a backslash.


Bill Hassell, sysadmin