Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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