Amanda-Users

Re: [Fwd: RE: VMware Support Request SR# 1104697711]

2008-03-26 18:23:34
Subject: Re: [Fwd: RE: VMware Support Request SR# 1104697711]
From: Mister Olli <mister.olli AT googlemail DOT com>
To: "Dustin J. Mitchell" <dustin AT zmanda DOT com>
Date: Wed, 26 Mar 2008 23:16:02 +0100
hi....


> > gtar --create --file - --directory /boot --one-file-system
> > --listed-incremental /root/gtar_test/gnutar-lists/172.31.3.9_boot_0.new
> > --sparse --ignore-failed-read --totals --exclude-from
> > /root/gtar_test/sendbackup._boot.20080320110639.exclude . | cat
> > /dev/null
> 
> This doesn't make any sense -- if you give 'cat' a filename, it won't
> read from stdin.  What happens here is that cat opens /dev/null for
> reading, gets an EOF immediately, and quits.  When cat quits, tar's
> stdout is closed, so it gets a SIGPIPE and quits, too, with an error
> condition.  Are you sure this worked?  What are your criteria for
> "worked"?
sorry, I think a missed a > before the '/dev/null'. So 'cat' takes the
stdout from gtar and pipes that into a file.

This was a suggestion by heiko to test. from my understanding it should
show if there are any problems with piping the stdout from gtar. He told
me also, that gtar recognizes if I just redirect the output of gtar to
'/dev/null', so the 'cat' needs to be done to use a full featured
pipe...

by the way, the command works, and I get the same results from 'gtar' as
with letting gtar write into the file.

> What you don't see from 'ps aux' is that Amanda redirects its output
> to a pipe.  If you run the above command on your console, it will fill
> your console with junk characters.  Consoles are pretty slow, so it
> will definitely take a long time, and will consume a lot of your VM's
> CPU cycles.
yeah, I saw that in a test.... *HORRIBLE* ;-)


> Please try the following *verbatim* and post the results by simply
> copying from your shell session.  Assuming /boot is somewhere under
> 500M, let any "hung" command run for at least a half-hour before
> killing it with control-C.
ok... Is it ok, if I execute these jobs as root?

I had to modify the paths for the 'gnutar-lists' and 'exclude-from'
parameter, cause the paths in your commands are the one of the vmware
guy on his test system, not on my productive machine.


> df -h /boot
# df -h /boot
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              99M   31M   63M  33% /boot
# 

> gtar --create --file - --directory /boot --one-file-system \
>   --listed-incremental /root/gtar_test/gnutar-lists/172.31.3.9_boot_0.new \
>   --sparse --ignore-failed-read --totals --exclude-from \
>   /root/gtar_test/sendbackup._boot.20080320110639.exclude . \
>   | wc -c
# gtar --create --file - --directory /boot --one-file-system \
> --listed-incremental /var/amanda/gnutar-lists/172.31.3.9_boot_0.new \
> --sparse --ignore-failed-read --totals --exclude-from \
> /tmp/amanda/sendbackup._boot.20080320110639.exclude . \
> | wc -c
27832320
Total bytes written: 27832320 (26MB, 26MB/s)
#


> gtar --create --file - --directory /boot --one-file-system \
>   --sparse --ignore-failed-read --totals --exclude-from \
>   /root/gtar_test/sendbackup._boot.20080320110639.exclude . \
>   | wc -c
# gtar --create --file - --directory /boot --one-file-system \
> --sparse --ignore-failed-read --totals --exclude-from \
> /tmp/amanda/sendbackup._boot.20080320110639.exclude . \
> | wc -c
Total bytes written: 27832320 (26MB, ?B/s)
27832320
#


> gtar --create --file - --directory /boot --one-file-system \
>   --listed-incremental /root/gtar_test/gnutar-lists/172.31.3.9_boot_0.new \
>   --sparse --ignore-failed-read --totals . \
>   | wc -c
# gtar --create --file - --directory /boot --one-file-system \
> -listed-incremental /var/amanda/gnutar-lists/172.31.3.9_boot_0.new \
> --sparse --ignore-failed-read --totals . \
> | wc -c
27832320
Total bytes written: 27832320 (26MB, ?B/s)
#


> gtar --create --file - --directory /boot --one-file-system \
>   --sparse --ignore-failed-read --totals . \
>   | wc -c
# gtar --create --file - --directory /boot --one-file-system \
> --sparse --ignore-failed-read --totals . \
> | wc -c
Total bytes written: 27832320 (26MB, ?B/s)
27832320
#


> gtar --create --file - --directory /boot --one-file-system . \
>   | wc -c
# gtar --create --file - --directory /boot --one-file-system . \
> | wc -c
27832320
#

all tests went fine, none hang, not even a delay in the amount of time
the needed. They all finished within 1 or 2 seconds.


regards,

olli