Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have an empty seperate partition used for my vhd/virtualbox. mounted at /mount/win7.

I've deleted everything now and there's a lost+found folder left over. It takes up about 5gigs

Is it safe to remove a lost and found folder?

share|improve this question

2 Answers 2

up vote 9 down vote accepted

fsck will recreate the lost+found directory if it is missing.

On startup most distributions run fsck if the filesystem is detected as not being unmounted cleanly.

As fsck creates the lost+found directory if it is missing, it will create it then and place anything that it finds into that directory.

So you can remove it without any problem.

share|improve this answer

So far I was under the impression that deleting lost+found was perfectly safe, as it would be recreated by fsck whenever it is needed. But after the Ubuntu 12.10 upgrade I got this mail from cron:

/etc/cron.daily/standard:

Some local file systems lack a lost+found directory. This means if the
file system is damaged and needs to be repaired, fsck will not have
anywhere to put stray files for recovery. You should consider creating
a lost+found directory with mklost+found(8).

The following lost+found directories were not available:

/home/lost+found

The man-page of mklost+found says:

mklost+found pre-allocates disk blocks to the lost+found directory
so that when e2fsck(8) is being run to recover a filesystem, it does 
not  need to allocate blocks in the filesystem to store a large number
of unlinked files.  This ensures that e2fsck will not have to allocate
data blocks in the filesystem during recovery.

I am not sure what exactly that means, but it seems to indicate that not having lost+found might cause trouble on recovery. Furthermore it indicates that lost+found different from a regular directory in that it has preallocated blocks associated with it.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.