Can I get rid of the "lost+found" folder?

Hi all. I’m very new to Linux but fairly competent in Windows so with the help of these forums I’ve managed to struggle through setting up a Linux fileserver for my home network. I’ve run into something I can’t solve though. I installed OpenSuse 11.1 on an 80GB drive and when I got VNC working, I attempted to install two 1TB drives in a RAID 1 config. I got that set up using the YaSt Expert Partition method, and after some more headaches, have the drive showing up on my two Windows boxes and can share files successfully.

Sounds good huh? What is bugging me is the “lost+found” folder which I can’t get rid of. It shows up as soon as I’ve set the drive up and mounted it. There are no files in the folder, Windows shows the folder size as zero bytes, zero files, zero folders. Dolphin shows it as 16kb but zero files or folders. But both Linux and Windows show 870GB available, 916GB total.

Man…now that I look at it in black and white, 916GB total is off too. Hmm…and Expert Partition shows the partitions as 935GB, which is about right.

Anyway, one thing at a time. Sorry for the long post but I wanted to try to cover any questions that might come up. Mainly, why is this “lost+found” folder created immediately upon setting up and mounting the drive, and why is it taking up 50GB of space but showing as totally empty?

Or is something else entirely using 50GB of my drive?

Thanks in advance,

RJ.

lost+found isn’t taking up 50GB, it’s just an empty directory. Look somewhere else for the problem.

lost+found is a piece of Unix history. When recovering files from a damaged filesystem, the repair program sometimes needs to put files whose containing directory cannot be identified (probably because the directory blocks were lost) somewhere. lost+found is that place. The reason it’s created ahead of time is because you do not want to create a directory on an already damaged filesystem at repair time, you might allocate blocks that belong to some damaged file. Furthermore lost+found is allocated a certain number of directory blocks for entries ahead of time. But certainly not 50GB worth. Anyway, just leave it alone, it’s a red herring in this situation.

I should add that not all Linux filesystem types have lost+found. Some filesystems don’t use this means of handling orphaned files.

You’re sure that difference isn’t due to GB vs GiB?

I am by no means an expert when it comes to file systems, but it is my understanding that there is a fairly significant amount of space that is used as the index and journal for a partition, at least with modern systems. This could be where your 50 GB have gone to.

Ken, thanks for the response. I’ll stop worrying about the lost+found directory.

However, it’s definitely not the GB vs GiB conversion. What’s sold as a 1TB drive shows up at roughly 935GB, which is the size partition the Expert Partition tool is creating.

However, both Windows and Dolphin (in Linux) show the drive as 916GB total, 870GB free. And both have that cute little bar that shows the total drive with a small percentage showing as used (blue).

Something’s there, I wish I knew what. Considering the partition should be 935GB, and I have 870GB free before putting a single file on the disk, I’m a bit bummed. That 65GB is nothing to sneeze at.

Possibly, I’m far too new to Linux to have any idea if that’s the case. But I’ve never noticed that in any version of Windows I’ve ever used…which is pretty much all of them. A freshly partitioned and formatted drive has never shown up as anything but virgin territory. Maybe Linux handles it differently and someone can confirm that theory. Or disprove it.

> But I’ve never noticed that in any version of Windows I’ve ever
> used . . . Maybe Linux handles it differently and someone can
> confirm that theory. Or disprove it.

bingo!!

Rule 1: If you do not know exactly what it is, and why it is there DO
NOT even try to remove it! (keep your hands off lost+found, for example)

Rule 2: Linux is NOT Windows[tm], read all about it:
http://linux.oneandoneis2.org/LNW.htm


Conficter

You haven’t accounted for the bit that gets reserved for root to write to the drive when it gets full. It is a percentage of the size of the drive.

I read that article already and I’m pretty sure I avoided any of the pitfalls mentioned, or at least I tried. I don’t believe I saw anything there which explains why 50GB of a freshly formatted drive shows as used, though. Perhaps if you’re really trying to be helpful you could provide such a link; I’d gladly learn.

Filesystems (ext3, reiser, xfs, jfs) comparison on Debian Etch

Partition capacity

Initial (after filesystem creation) and residual (after removal of all files) partition capacity was computed as the ratio of number of available blocks by number of blocks on the partition. Ext3 has the worst inital capacity (92.77%), while others FS preserve almost full partition capacity (ReiserFS = 99.83%, JFS = 99.82%, XFS = 99.95%). Interestingly, the residual capacity of Ext3 and ReiserFS was identical to the initial, while JFS and XFS lost about 0.02% of their partition capacity, suggesting that these FS can dynamically grow but do not completely return to their inital state (and size) after file removal.
Conclusion : To use the maximum of your partition capacity, choose ReiserFS, JFS or XFS.

Does this account for it in part? And as stated above, a certain part is reserved for root. You can change it…

Thanks for the hint.

Yes, that is almost exactly what I’m seeing. I did use Ext3 as the file system and I’m unable to account for about 7% of the disk space, which is apparently right on target. Thanks for the link and the info, I’ll do a little more research but probably end up reformatting with reiser (unless there’s some reason not to use it).

Thanks again.

ReiserFS is suffering stalled development because its creator has been jailed.

It is an open debate which filesystem is best - and in part, this may be because they’re all pretty good, and many excel at some thing.

As a rule of thumb, if you’re going for high performance, I’ve heard use XFS if you’re using big files, and ReiserFS for small ones.

However, EXT4 will be commonplace soon, so don’t discount the EXT line either.

I am doubting that Ext4 will take off just as the issues are coming to light. However, please double check any settings you have on any XFS drives that can increase speed at the cost of performance (Though you said you were doing this with Ext3).

You should also consider, that to speed performance slightly, on a share that you may not care much about certain access log information, to set “noatime” as one of the mount parameters.

I did a little research and decided that XFS is probably well suited to my current needs. So, I reformatted and now the drive is showing as 931GB total, 931GB available. Ext3 was definitely the reason I was “missing” the 65GB before, now all is well.
(At least until my next ‘learning experience’).
Thanks much!

No worries :slight_smile:

I’m using XFS for a Zenwalk install on my Eee pc (which doesn’t work for being Slackware rather than filesystem related reasons ;))

It’s ridiculously quick. I’ve heard of it corrupting during power loss, but I suppose you’ll sometimes get that with anything…