An interesting filesystem corruption problemToday we had a fun problem created by a combination of entirely rational
An important Linux server took some kind of hit that turned some files into directories (with contents, presumably stolen from some other poor directory). We found some but were pretty sure there were others lurking out there too, and wanted to do our best to find them. (If only to figure out what we needed to restore from the last good backups.) As it happens, most of the actual files on this filesystem have some sort of extension, and pretty much all directories don't. So, I made the obvious attempt:
Much to my surprise, this didn't report anything, not even the files
we already knew about in Okay, first guess: I happened to know that But that didn't work either. Fortunately I happened to know about the
other optimization modern Unixes do for A quick In retrospect, I have to thank (And writing a brute force file tree walker, even in C, turns out to be not as much work as I thought it would be.) This is of course a great example of leaky abstractions and how
knowing the low-level details can really matter. If I hadn't been well
read enough about Unix geek stuff, I wouldn't have known about either
(One comment.)
|
These are my WanderingThoughts GettingAround This is part of CSpace, and is written by ChrisSiebenmann. * * * Atom feeds are available; see the bottom of most pages. Categories: links, linux, programming, python, snark, solaris, spam, sysadmin, tech, unix, web |