Question & Answer
Question
The "lost+found" directory from one of my filesystems is gone. How do I recreate it?
Answer
The directory in the root of local filesystems called "lost+found" is used when fsck needs to reattach files and directories into the filesystem tree, but it cannot determine what the file or directory name was, or what directory they were in.
The fsck utility copies them into this directory, and names them numerically based on the inode they are using.
There are two ways to recreate this directory:
- Unmount the filesystem and run fsck against it. The fsck utility will recreate the lost+found directory.
# umount /myfs
# fsck /myfs - Use the utility /usr/sbin/mklost+found to recreate the directory. This utility will create the directory, put a few zero-length files in it to create slots in the directory table, then remove those files. Running this does not require unmounting the filesystem.
[{"Product":{"code":"SWG10","label":"AIX"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Not Applicable","Platform":[{"code":"PF002","label":"AIX"}],"Version":"5.3;6.1;7.1","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]
Was this topic helpful?
Document Information
Modified date:
17 June 2018
UID
isg3T1011765