Orphaned Files.
Posted: Tue Sep 15, 2015 6:04 pm
Well, this week has been interesting so far...
So today the power went out (no big deal, I had stuff to do outside anyways), so when it finally came back on (after almost 5 hours...) I start up my computer, and walk out the room to get coffee knowing lubuntu would ask for my password by the time I got back.
Upon sitting back at my desk, I notice the boot logo is still on the screen, and (as most of us would do) I pressed Esc to see where it was in the process. Turns out it was recovering orphaned files, at 9000 something of 15000ish.
So needless to say the boot was slow this time around, and thankfully all the files were recovered correctly (as far as I can tell thus far, over 4TB of data spread across 6 internal and 3 external drives [yes most are small] so it's hard to say...)
This is not the first power outage, though they are rare. But this is the first time I have ever seen thousands of orphaned files (sometimes it's one or two - usually none) and the stranger thing is, I was at idle, I was reading WiKi pages - not accessing the drive myself, usually I am accessing the drive when the power goes out and have way fewer to no orphaned files.
And as with most computer issues this got me to thinking. I do not want a reactive approach in my OS (when it actually gets there) I want more of a proactive approach (if that's even possible).
So, shy of directly reading and writing to the drive (as in no cache), how would one prevent this type of thing from happening (at least to the scale it did this time)? And if not possible what would be the steps to recover from this sort of issue?
Currently (on version 0.0.3) I have only cached FAT and Root Directory (yea... I only have FAT support thus far...) and after every change (or a chain of changes) this is flushed back to the HDD. The reading and writing of actual files is live to the disk. Now obviously I have not even tested pulling the plug on it while transferring data (plus I hate having to reset the BIOS - OLD POS "dumpster" PCs).
Thanks for your time.
So today the power went out (no big deal, I had stuff to do outside anyways), so when it finally came back on (after almost 5 hours...) I start up my computer, and walk out the room to get coffee knowing lubuntu would ask for my password by the time I got back.
Upon sitting back at my desk, I notice the boot logo is still on the screen, and (as most of us would do) I pressed Esc to see where it was in the process. Turns out it was recovering orphaned files, at 9000 something of 15000ish.
So needless to say the boot was slow this time around, and thankfully all the files were recovered correctly (as far as I can tell thus far, over 4TB of data spread across 6 internal and 3 external drives [yes most are small] so it's hard to say...)
This is not the first power outage, though they are rare. But this is the first time I have ever seen thousands of orphaned files (sometimes it's one or two - usually none) and the stranger thing is, I was at idle, I was reading WiKi pages - not accessing the drive myself, usually I am accessing the drive when the power goes out and have way fewer to no orphaned files.
And as with most computer issues this got me to thinking. I do not want a reactive approach in my OS (when it actually gets there) I want more of a proactive approach (if that's even possible).
So, shy of directly reading and writing to the drive (as in no cache), how would one prevent this type of thing from happening (at least to the scale it did this time)? And if not possible what would be the steps to recover from this sort of issue?
Currently (on version 0.0.3) I have only cached FAT and Root Directory (yea... I only have FAT support thus far...) and after every change (or a chain of changes) this is flushed back to the HDD. The reading and writing of actual files is live to the disk. Now obviously I have not even tested pulling the plug on it while transferring data (plus I hate having to reset the BIOS - OLD POS "dumpster" PCs).
Thanks for your time.