Cyanrigger:
> > rsync copies the file. the target file is removed but ext3 doesn't
> > release the resources for the file since the inode is still referenced
> > and alive.
> Wow. That really bends my brain.
> You say that the target file is removed at copying. So this is the
> reason why the inode of the original filename gets changed?!
> Is it neccessary that the target file is removed? Why not instead
> overwrite the file - so the inode gets conserved?
>
> If I do the same on a pure ext3 system, the inode number of the file is
> not being changed if I copy new content in it. It is just the case if I
> do some kind of copy-on-write.

I might misunderstand the behaviour of rsync.
I thought it operats
- create a temporary empty file, get a new inode
- write latest contents to it
- rename it to the original name, old file is removed

But according to your experience, rsync seems to operate
- open and truncate a file
- write latest contents to it
So the inode number is unchanged.

I am afraid that the "Deleted inode XXXX has zero dtime" msg in your
fsck log made me misunderstood. Now I'd ask you "Who deleted what?"
Is another process like log rotation (for example) related to this
problem?


> > And these removed but still alive files may be related to the ext3's
> > orphaned inode list. These inodes will be freed and ext3 resources for
> > them will be freed too when you unmount ext3. But when you unmount it,
> I can't unmount it. It just gets remounted.
>
> > ext3 is already set to readonly, right?
> At which part of the process? Do you mean right after the rsync command?
> However, below is the script I am using.

I meant
when you shutdown your system, ext3 is readonly, right?


> > > If this option is correct, it is worth to try remounting ext3
> > > writable in your shutdown script. But it is just my guess.
> This script is not neccessarily called at shutdown. I call it at random
> times.

I meant
- run your rsync script
- before you shutdown your system, remount ext3 as readwrite
- and shutdown


J. R. Okajima

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev

Reply via email to