Gparted creates "lost+found" directory when formatting a new ext3 partition

Asked by Mirko Fiaccadori

I would like to create 3 different partitions in my external hard-disk. One NTFS partition (already created with the windows utility), one FAT32 partition and one ext3 partition.
I opened GParted and I created the FAT32 partition without any problems.
The problems are with the ext3 partition. It seems that the the partition is correctly created, but at the end of the process I can see a 8.8GB directory called "lost+found". I tried to repeat the process more times, but the result is always the same.
I thought that my hard disk could be damaged, but if I format the same partition using the FAT32 file system... no problems.

Can anyone explain me why this issue?
How can I format the third partition using the ext3 file system?

Thank you very much.
Mirko Fiaccadori

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Mirko Fiaccadori
Solved:
Last query:
Last reply:
Revision history for this message
Joel Goguen (jgoguen) said :
#1

The lost+found directory is created to hold any corrupt files that are found after an improper shutdown. This is a really good directory to keep, since without it you don't get to keep recovered files. It's only created in the root directory of each partition. For example, I have two partitions:

/dev/sda1 - /
/dev/sdb1 - /home/jgoguen

Thus, I would have two lost+found directories: one at /lost+found and a second at /home/jgoguen/lost+found. I make sure to keep these directories in case I need to recover files after a crash or power outage or similar occurrence.

As for why yours is 8.8GB right away, I don't know...

Revision history for this message
Mirko Fiaccadori (mirko-fiaccadori) said :
#2

Dear Joel Goguen,
thank you for the explanation.
So, if I correctly understand, the "lost+found" directory is always created when formatting (with the ext3 file system) the partition, right?
Because, reading in other forums, I understood that the "lost+found" directory is created only when the system recovers corrupted files.

Regarding the size (8.8GB) of this directory: is it possible that the size is related to the total capacity of the partition?
For example, my ext3 partition is 173.0 GB. The "lost+found" directory is 8.8GB, i.e.exactly the 5% of the partition capacity.

Can anyone confirm?

Thank you.
Mirko Fiaccadori

Revision history for this message
Joel Goguen (jgoguen) said :
#3

As far as I can tell, it's created when creating the partition. I've never actually had a crash on my desktop, and it has one lost+found directory for each partition. My laptop has also never crashed and it also has a lost+found directory for the single partition. The laptop is formatted using ext3, but the desktop is reiserfs.

I'm not aware of it being any particular percentage of disk space, and I don't seem to be able to find anything to that effect. I have a laptop with a single 200GB partition and the /lost+found directory registers as approximately 16KB. My desktop is turned off and at home so I can't check its lost+found directories yet.

Revision history for this message
Joel Goguen (jgoguen) said :
#4

A co-worker of mine asks that you check to see what's in the lost+found directory. He says you'll probably find that there's a lot of randomly named files in there, and that the large size of this directory could indicate that there's bad sectors on your disk. If this is the case, then you should probably replace the drive as soon as you notice any performance degradation or if you notice that a file system check is being run on the drive a lot. With ext3, I think a file system check is scheduled once per 21 mounts.

Revision history for this message
Mirko Fiaccadori (mirko-fiaccadori) said :
#5

I think I have solved.
Thank you for the precious support.

I try to explain.
After the format of that partition with ext3 filesystem, I found the icon of the new disk on the desktop. I look at the properties of the disk just created and I can see that there are 8.8GB of space used.
"It's impossible" I think...
Double-click on the disk icon and I can see only one directory... "lost+found".
My thought is: the lost+found directory is 8.8GB!
But this is not correct...
Unfortunately, this directory is unreadable, therefore the graphical interface of Ubuntu is not able to show me the real size of the directory.
I look in the documentation and I find that it is possible to know the size of a directory using the "du" command:

mirko@fiaccadori:~$ sudo du -h /media/disk-1/lost+found
16K /media/disk-1/lost+found

The lost+found directory is 16K, and not 8.8GB

Now my question is: what are used for these 8.8GB?
I already found the answer: ext2 and ext3 partitions keep as default the 5% of the disk space reserved for the root user. It is possible to remove this limit using this command:

tune2fs -m 0 /dev/sdxx

In this example, the space reserved to the root in the partition sdxx is set to 0.
I will try this...

Sorry if my problem was not a real problem, but I am using Linux only from 2 weeks...

Mirko Fiaccadori