Thing is, any time I try to replicate something like that, I basically get a flippant response saying to go look elsewhere.
What is the purpose of the lost+found folder in Linux and Unix? (2014)
31–40 of 95 posts
Re: What is the purpose of the lost+found folder in Linux and Unix? (2014)
#32Earlier quoted context omitted.
You need to use worse hardware and bad power :)
I used to develop SSD firmware and one of things I worked on is making it robust to power failure. The power supplies have lots of capacitance so the voltage drop was slow so we would use a special test board that would disconnect from power and discharge fast to test it.
Re: What is the purpose of the lost+found folder in Linux and Unix? (2014)
#33In a couple of decades running Linux installations of all flavours, I have never seen anything in lost+found!
Re: What is the purpose of the lost+found folder in Linux and Unix? (2014)
#34How do questions like this make it to the top? It is an obvious thing if you search for it or ask AI, but people seem to just ignore those in favor of generating new human responses. Thing is, any time I try to replicate something like that, I basically get a flippant response saying to go look elsewhere.
I also respect human responses over AI ones every day that ends in Y.
Re: What is the purpose of the lost+found folder in Linux and Unix? (2014)
#35I had a lost+found folder in all Unix file systems I used since the 80s. It's where fsck places files that it found during a scan and can't figure out to which directory they belong. Sometimes I found stuff in there. From what I googled XFS, Btrfs and ZFS don't use lost+found. It's a thing of the old not journaled filesystems and of the ext family.
XFS does use /lost+found, it calls it the "orphanage directory" and xfs_repair reparents children of corrupt directories there. Based on comments in the kernel source, it seems like the userspace fsck for JFS and F2FS will also sometimes create /lost+found. There might be more that do.
In the very rare occasions when one has to run "xfs_repair", it will create a "/lost+found" directory, if it is required for recovered files.
After the repair and after investigating whether the recovered files contain useful data or not (and after moving the useful files elsewhere), one should normally delete the "/lost+found" directory, because it is no longer needed.
Re: What is the purpose of the lost+found folder in Linux and Unix? (2014)
#36Re: What is the purpose of the lost+found folder in Linux and Unix? (2014)
#37Fortunately I was using ReiserFS at the time and something about its murderous tree data structure made it trivial to undelete.
Reiser_fsck found ALL my stuff, mostly with full dir tree structure in tact and put it all in lost+found
Re: What is the purpose of the lost+found folder in Linux and Unix? (2014)
#38* Probably DEC Ultrix 2.2, a BSD 4.2 derivative.
Re: What is the purpose of the lost+found folder in Linux and Unix? (2014)
#39lost+found is still used on OpenBSD, seems it is created when needed. Only /home has that directory on my system. IIRC, it was created when a kernel panic happened a few releases ago. Plus some files were placed in it when fsck executed on /home
Re: What is the purpose of the lost+found folder in Linux and Unix? (2014)
#40How do questions like this make it to the top? It is an obvious thing if you search for it or ask AI, but people seem to just ignore those in favor of generating new human responses. Thing is, any time I try to replicate something like that, I basically get a flippant response saying to go look elsewhere.
Reaching HN or other sites allows for exposure to information that a person otherwise would not ask themselves. I also respect human responses over AI ones every day that ends in Y.