LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   lost+found folders created in external USB mounts (Ubuntu Server 14.04) (https://www.linuxquestions.org/questions/linux-newbie-8/lost-found-folders-created-in-external-usb-mounts-ubuntu-server-14-04-a-4175512893/)

Lakeshow32 07-31-2014 03:47 PM

lost+found folders created in external USB mounts (Ubuntu Server 14.04)
 
Hi,

I have three drives mounted in my Ubuntu Server 14.04. These are external USB drives that I use for backup, file sharing, and media storage:

Code:

/dev/sda1 on /mnt/fileshare type ext2 (rw,noexec,nosuid,nodev)
/dev/sda2 on /mnt/media type ext2 (rw,noexec,nosuid,nodev)
/dev/sdb1 on /mnt/backup type ext2 (rw,noexec,nosuid,nodev)

I recently had some issues with the way these drives were being mounted and had to unmount and reboot my server many times. At some point, once I got them mounted properly, I noticed that a "lost+found" folder had been created inside each mounted folder i.e. /mnt/fileshare/lost+found, even though there are actually no files in /mnt/fileshare.

Can someone please tell me:

1-What purpose do these folders serve?
2-What can I do to remove them? (or do I absolutely need to leave them there?)

Thanks for the help.

Randicus Draco Albus 07-31-2014 05:48 PM

Quote:

This is an important directory which is useful for recovering files which are not properly closed due to many reason such as power failure. Lost+Found is created by system at the time of Linux OS installation for each partition we create.
That is a quote from the short description of one of the results when I entered "lost+found directory on linux sysyems" into an ixquick search. The website the search result links to will have the details.

So it would be a good idea to leave those directories there. In my experience, when the system creates a directory, it usually has a use.

lleb 07-31-2014 07:08 PM

also to reduce issues with external USB drives for backup you might want to use the UUID instead of /dev/sdX

that will drastically reduce issues

Lakeshow32 07-31-2014 08:23 PM

Thanks for the feedback.

If the system created those directories, does that necessarily mean that I have files that were " not properly closed" at some point? If so, do I need to do anything about that? Or does the system simply create those directories as a preventive measure?

I'm just trying to determine whether there is anything I need to address...

michaelk 07-31-2014 08:35 PM

No, as stated lost+found is created in each file system automatically. If fsck finds a corrupted file it will try recover the contents and put them in the directory.

http://www.tldp.org/LDP/Linux-Filesy...lostfound.html

Lakeshow32 07-31-2014 08:46 PM

Thanks.


All times are GMT -5. The time now is 02:07 AM.