Skip to content

Rage Against the Shell

Linux tips and other things…

  • Home
  • Contact
  • Privacy Policy

Creating lost+found directory

Posted on April 3, 2016 - September 18, 2016 by Mr. Reboot

Directory lost+found is a system directory placed on the root partition of the file system. e2fsck uses this special directory to deposit unlinked files after a file system repair.

Extracted from the man help: “mklost+found pre-allocates disk blocks to the lost+found directory so that when e2fsck 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.”

So it’s important this directory exists, if it was erased accidentally it’s necessary to create it:

~ $ cd /
~ $ mklost+found
~ $ cd /lost+found
~ $ ls -lha
total 20K
drwx------  2 root root  16K May  3  2016 .
drwxr-x--x 24 root root 4.0K Nov 1 23:23 ..

On the file system root partition.

Posted in File systems

Post navigation

Using MAKEDEV
Nginx status module

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Search

Calendar

April 2016
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  
« Jan   May »

Categories

  • Apache
  • Cisco
  • Command line
  • Distros
  • Dovecot
  • File systems
  • Gadgets
  • GlusterFS
  • MySQL
  • Nginx
  • NTP
  • Opendkim
  • Pacemaker + Corosync
  • Postfix
  • Raspberrypi
  • SSH
  • SSL
  • Varnish

RSS RSS

  • Using qrencode January 16, 2022
  • Compile varnish module vmod_vsthrottle April 22, 2020
  • SSH vpn with sshuttle April 9, 2020
  • Disable swap in systemd December 16, 2019
  • Getting the parent process pid October 12, 2018
Proudly powered by WordPress | Theme: micro, developed by DevriX.