Re: Tar'ing /proc ???

From: Jesse Pollard (pollard@admin.navo.hpc.mil)
Date: Thu Jan 16 2003 - 11:30:45 EST


On Thursday 16 January 2003 08:06 am, Maciej Soltysiak wrote:
> > Normally, you do `tar -clf`
> >
> > |________ stay on the same file-system.
> >
> > Otherwise toy need to use --exclude /proc. Proc is a virtual
> > file-system that contains things like kcore. You can get into
>
> Well i think that besides kcore (and maybe kmem) you should be able
> to archive it.

Ummm not really - consider what some of the data files disappear while
tar is running (process directory tree). You may be in the process of
copying the process memory space when the process exits.

Kablooie

Your current directory just disappeared, along with the other files
you were going to backup.

You end up with a corrupted tar file.

I used to consider this as being possible to make a system
"snapshot" for later examination... but no.

Consider that a process will change contents out from under
tar as well. Since the process memory changed, you cannot
get a consistant process dump.

And think about what happens when the tar starts copying
itself... You can/will get another deadlock.

In fact - you may get a deadlock whenever you read process
memory - that stuff can extend/contract as the system pages
things in and out of memory.

-- 
-------------------------------------------------------------------------
Jesse I Pollard, II
Email: pollard@navo.hpc.mil

Any opinions expressed are solely my own. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jan 23 2003 - 22:00:13 EST