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 :)


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.

| 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.