RE: Shouldn't GNU tar be ignoring /proc with --one-file-system?

2011-11-18 Thread Terrence Koeman
> -Original Message-
> From: owner-freebsd-questi...@freebsd.org [mailto:owner-freebsd-
> questi...@freebsd.org] On Behalf Of Daniel Staal
> Sent: Friday, November 18, 2011 18:00
> To: freebsd-questions@freebsd.org
> Subject: Re: Shouldn't GNU tar be ignoring /proc with --one-file-
> system?
>
>
> On Fri, November 18, 2011 10:34 am, Kirk Strauser wrote:
> > I use Amanda to make nightly backups of a bunch of servers using GNU
> tar.
> > However, gtar doesn't seem to respect its --one-file-system flag with
> > /proc. Amanda runs a variation of this command:
> >
> > # /usr/local/bin/gtar --create --file - --directory /
> > --one-file-system --sparse --ignore-failed-read --totals . >
> /dev/null
> > /usr/local/bin/gtar: ./proc: file changed as we read it
> >
> > Before I file a bug report, can anyone think of a legitimate reason
> why
> > gtar would be touching /proc at all?
>
> Just a guess, really but:
>
> /proc is a file on /.  /proc/* are files on /proc.  The former is still
> on
> the root filesystem (if only as a directory stub to be used as a
> mountpoint), so reading it isn't leaving that filesystem.  Reading
> anything *in* it would be.
>
> Just a thought.
>

However, the file /proc on fs / should not be changing since a filesystem /proc 
is mounted over it. The message "./proc: file changed as we read it" indicates 
whatever /proc it is trying to read did change...

--
Regards,
T. Koeman, MTh/BSc/BPsy; Technical Monk

MediaMonks B.V. (www.mediamonks.com)
Please quote relevant replies in correspondence.



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Shouldn't GNU tar be ignoring /proc with --one-file-system?

2011-11-18 Thread perryh
Kirk Strauser  wrote:

> On Nov 18, 2011, at 11:27 AM, Robert Bonomi wrote:
>
> > See the output of 'mount(8)' for the names of all the mounted 
> > filesystems on your machine.
>
> $ mount | grep proc
> procfs on /proc (procfs, local)
>
> > *NOTE*WELL* that '/proc' is *not* a separate filesystem.  It 
> > is merely a _directory_ with a bunch of 'special' files in it.
>
> I'm confused here. In what way isn't /proc a separate filesystem? 
> It's even called "procfs".
 
It's Bonomi who is confused.  I suspect he doesn't have procfs 
configured -- so of course its mountpoint is just a directory --
*on his system*.  The OP _does_ have procfs configured, or the
question wouldn't have arisen.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Shouldn't GNU tar be ignoring /proc with --one-file-system?

2011-11-18 Thread Daniel Feenberg



On Fri, 18 Nov 2011, Kirk Strauser wrote:


On Nov 18, 2011, at 11:27 AM, Robert Bonomi wrote:


See the output of 'mount(8)' for the names of all the mounted filesystems on
your machine.


$ mount | grep proc
procfs on /proc (procfs, local)



*NOTE*WELL* that '/proc' is *not* a separate filesystem.  It is merely a
_directory_ with a bunch of 'special' files in it.


I'm confused here. In what way isn't /proc a separate filesystem? It's 
even called "procfs".


I just went to an 8.1 system as root and did:

   umount /proc

and /proc dismounted leaving an empty directory in route. I then went

   mount /proc

and /proc was mounted again, using the parameters in /etc/fstab. Surely
that means that going from / to /proc is "crossing a filesystem boundary".
To me that suggests it is a separate filesystem, and typically /proc is
filled with stuff that you wouldn't want to recurse through, so I wouldn't
think it a good candidate for special casing as non-mounted.

Daniel Feenberg
NBER



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Shouldn't GNU tar be ignoring /proc with --one-file-system?

2011-11-18 Thread Michael Sierchio
On Fri, Nov 18, 2011 at 9:27 AM, Matthew Seaman
 wrote:

> I find it quite astonishing that /proc would deliberately behave
> differently to *every other* filesystem available.  The mountpoint
> should belong to the filesystem mounted on it.

I have an idea what you mean by "belong to" in this case and - if I'm
right, you're wrong :-)

A mount point has an inode in the parent filesystem, right?  Good,
glad we cleared that up.

Unless you set the 'nodump' flag, and tell tar/gtar/tarsnap/dump to
honor the flag, the archive will have an entry for the mount point.
The 'one-file-system' flags tells gtar not to traverse mount points,
but it will certainly see the mount point and include it in the
archive, along with its modes, flags, atime, mtime, etc. etc.  If
those changed between the time if took a peek at the directory and the
time it attempted to include it in the archive, you'll see those
advisory warnings (which may be ignored in this case).
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Shouldn't GNU tar be ignoring /proc with --one-file-system?

2011-11-18 Thread Kirk Strauser
On Nov 18, 2011, at 11:27 AM, Robert Bonomi wrote:

> See the output of 'mount(8)' for the names of all the mounted filesystems on
> your machine.  

$ mount | grep proc
procfs on /proc (procfs, local)

> 
> *NOTE*WELL* that '/proc' is *not* a separate filesystem.  It is merely a
> _directory_ with a bunch of 'special' files in it.

I'm confused here. In what way isn't /proc a separate filesystem? It's even 
called "procfs".

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Shouldn't GNU tar be ignoring /proc with --one-file-system?

2011-11-18 Thread Matthew Seaman
On 18/11/2011 17:18, Michael Sierchio wrote:
> On Fri, Nov 18, 2011 at 8:59 AM, Daniel Staal  wrote:
> 
>> > /proc is a file on /.  /proc/* are files on /proc.  The former is still on
>> > the root filesystem (if only as a directory stub to be used as a
>> > mountpoint), so reading it isn't leaving that filesystem.  Reading
>> > anything *in* it would be.
>> >
>> > Just a thought.

> And a good one.  Yes, that's it.  It isn't crossing the mount point,
> but the mount point is part of the root filesystem.

I find it quite astonishing that /proc would deliberately behave
differently to *every other* filesystem available.  The mountpoint
should belong to the filesystem mounted on it.

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
JID: matt...@infracaninophile.co.uk   Kent, CT11 9PW



signature.asc
Description: OpenPGP digital signature


Re: Shouldn't GNU tar be ignoring /proc with --one-file-system?

2011-11-18 Thread Robert Bonomi
> From owner-freebsd-questi...@freebsd.org  Fri Nov 18 09:36:09 2011
> From: Kirk Strauser 
> Date: Fri, 18 Nov 2011 09:34:18 -0600
> To: FreeBSD Questions ML 
> Subject: Shouldn't GNU tar be ignoring /proc with --one-file-system?
>
> I use Amanda to make nightly backups of a bunch of servers using GNU tar. Howe
> ver, gtar doesn't seem to respect its --one-file-system flag with /proc. Amand
> a runs a variation of this command:

Don't blame the software.

It is just doing *exactly* what you told it to. :)

>
> # /usr/local/bin/gtar --create --file - --directory / --one-file-system 
> --sparse --ignore-failed-read --totals . > /dev/null
> /usr/local/bin/gtar: ./proc: file changed as we read it
>
> Before I file a bug report, can anyone think of a legitimate reason why gtar 
> would be touching /proc at all?

Yup.  You (or more properly, Amanda) _told_ it to.

See the output of 'mount(8)' for the names of all the mounted filesystems on
your machine.  

*NOTE*WELL* that '/proc' is *not* a separate filesystem.  It is merely a
_directory_ with a bunch of 'special' files in it.

The 'error message' is accurate -- but it is _just_ a 'warning', and -- in 
*this*
circumstance -- _totally_ innocuous.

If you want to suppress generation of that error, simply add an '--exclude' for
/proc to the Amanda run.


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Shouldn't GNU tar be ignoring /proc with --one-file-system?

2011-11-18 Thread Michael Sierchio
On Fri, Nov 18, 2011 at 8:59 AM, Daniel Staal  wrote:

> /proc is a file on /.  /proc/* are files on /proc.  The former is still on
> the root filesystem (if only as a directory stub to be used as a
> mountpoint), so reading it isn't leaving that filesystem.  Reading
> anything *in* it would be.
>
> Just a thought.

And a good one.  Yes, that's it.  It isn't crossing the mount point,
but the mount point is part of the root filesystem.

If you really want it to ignore the mount point itself, set the nodump
flag and tell gtar to honor it:

> chflags nodump /proc
> gtar  --nodump
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Shouldn't GNU tar be ignoring /proc with --one-file-system?

2011-11-18 Thread Daniel Staal

On Fri, November 18, 2011 10:34 am, Kirk Strauser wrote:
> I use Amanda to make nightly backups of a bunch of servers using GNU tar.
> However, gtar doesn't seem to respect its --one-file-system flag with
> /proc. Amanda runs a variation of this command:
>
> # /usr/local/bin/gtar --create --file - --directory /
> --one-file-system --sparse --ignore-failed-read --totals . > /dev/null
> /usr/local/bin/gtar: ./proc: file changed as we read it
>
> Before I file a bug report, can anyone think of a legitimate reason why
> gtar would be touching /proc at all?

Just a guess, really but:

/proc is a file on /.  /proc/* are files on /proc.  The former is still on
the root filesystem (if only as a directory stub to be used as a
mountpoint), so reading it isn't leaving that filesystem.  Reading
anything *in* it would be.

Just a thought.

Daniel T. Staal

---
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Shouldn't GNU tar be ignoring /proc with --one-file-system?

2011-11-18 Thread Kirk Strauser
I use Amanda to make nightly backups of a bunch of servers using GNU tar. 
However, gtar doesn't seem to respect its --one-file-system flag with /proc. 
Amanda runs a variation of this command:

# /usr/local/bin/gtar --create --file - --directory / --one-file-system 
--sparse --ignore-failed-read --totals . > /dev/null
/usr/local/bin/gtar: ./proc: file changed as we read it

Before I file a bug report, can anyone think of a legitimate reason why gtar 
would be touching /proc at all?

Kirk

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"