Take the 2-minute tour ×

I want to start by stating that I don't have any issues that I'm trying to resolve other than a hypothesis. And I could RTFC, but there's a lot of filesystem code that I'd have to familiarize myself with ;)

I'm curious what would happen if I were to open a file and then unlink it in the filesystem (but still have the open handle). Then the system crashes.

Specifically: I'm curious as to whether the files inode will still indicate that it has references, but nothing in the filesystem points to it anymore, or whether it's up to the OS to know that it can't write to the space, but as far as the inode is concerned it's free.

Additionally, am I missing something else in here? Thanks :)

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

After a system crash there will be one of two conditions: either the journal will be recovered or fsck will be run. Did you seen Clearing orphaned inode XXXXX messages it's printing on boot? This is exactly your case: an inode that is not referenced from anywhere in the filesystem.

share|improve this answer
Cool, I didn't actually do this to myself - so I can't comment on the symptom. This sounds like what would happen in the orphan case and perfectly answers my question. Thanks :) –  Tyler Szabo Jan 23 '10 at 1:54
add comment

Your Answer


