Re: Running amcheck during amdump

2012-10-11 Thread Toomas Aas

On Thu, 11 Oct 2012 Toomas Aas wrote:


On Wed, 10 Oct 2012, Charles Curley wrote:



I believe running amcheck during an amdump run is a harmless error.



It doesn't probably do any harm, but it turns out that in this case  
the mail report is still sent, containing these warnings:


WARNING: skipping tape test because amdump or amflush seem to be running
WARNING: if they are not, you must run amcleanup


Which leads me to next question - what is the best way to detect, in a  
script, that amdump or amflush is running? Off the top of my head I  
can only think of something like 'ps | grep amdump', but that doesn't  
seem very elegant. I tried to read amcheck.c to find out how Amanda  
herself does it, but IANAP...


--
Toomas Aas



Re: Running amcheck during amdump

2012-10-11 Thread Jon LaBadie
On Thu, Oct 11, 2012 at 08:15:15PM +0300, Toomas Aas wrote:
 On Thu, 11 Oct 2012 Toomas Aas wrote:
 
 On Wed, 10 Oct 2012, Charles Curley wrote:
 
 
 I believe running amcheck during an amdump run is a harmless error.
 
 
 It doesn't probably do any harm, but it turns out that in this
 case the mail report is still sent, containing these warnings:
 
 WARNING: skipping tape test because amdump or amflush seem to be running
 WARNING: if they are not, you must run amcleanup
 
 Which leads me to next question - what is the best way to detect, in
 a script, that amdump or amflush is running? Off the top of my head
 I can only think of something like 'ps | grep amdump', but that
 doesn't seem very elegant.

Well, if you are going to do that you might as well use the command
intended for it, pgrep.  Assuming your system has it that is.

Jon
-- 
Jon H. LaBadie j...@jgcomp.com
 11226 South Shore Rd.  (703) 787-0688 (H)
 Reston, VA  20190  (609) 477-8330 (C)


Re: Running amcheck during amdump

2012-10-11 Thread Nathan Stratton Treadway
On Thu, Oct 11, 2012 at 20:15:15 +0300, Toomas Aas wrote:
 Which leads me to next question - what is the best way to detect, in
 a script, that amdump or amflush is running? Off the top of my head
 I can only think of something like 'ps | grep amdump', but that
 doesn't seem very elegant. I tried to read amcheck.c to find out how
 Amanda herself does it, but IANAP...

I haven't looked at the code, but as far as I understand Amanda
basically looks in the directory returned by
  amgetconf CONFIG logdir
for a file called either amdump or amflush.

Those are created when the given program starts up, and then are renamed
to amdump.1 or amflush.1 when the program finishes.. so if the
unnumbered file exists, Amanda assumes the associated program is still
running.

Nathan


Nathan Stratton Treadway  -  natha...@ontko.com  -  Mid-Atlantic region
Ray Ontko  Co.  -  Software consulting services  -   http://www.ontko.com/
 GPG Key: http://www.ontko.com/~nathanst/gpg_key.txt   ID: 1023D/ECFB6239
 Key fingerprint = 6AD8 485E 20B9 5C71 231C  0C32 15F3 ADCD ECFB 6239


Re: Running amcheck during amdump

2012-10-10 Thread Toomas Aas

On Wed, 10 Oct 2012, Charles Curley wrote:



I believe running amcheck during an amdump run is a harmless error.



It doesn't probably do any harm, but it turns out that in this case  
the mail report is still sent, containing these warnings:


WARNING: skipping tape test because amdump or amflush seem to be running
WARNING: if they are not, you must run amcleanup

--
Toomas Aas



Re: Running amcheck during amdump

2012-10-09 Thread Toomas Aas

On Wed, 10 Oct 2012 Charles Curley wrote:


However, I suspect that swapping out the vtape drive will cause
problems for amanda. For example, if you try a restore but the file to
be restored is on the swapped out disk, amanda will likely get
confused. It will be looking for a vtape that isn't there.


Actually, this setup (except the 'amcheck -m' part) has been in use  
for years and swapping disks has not caused any problems (other than  
remote operators occasionally forgetting to change the disk on time  
and dumps going to holding disk). Restores are rare enough so I don't  
remember if restoring from a vtape that is on the 'other' disk has  
been tried, but I don't see why it would cause any more serious  
problem than Amanda reporting 'tape not found', followed by a facepalm  
from the operator and connecting the right disk. Mounting the disk for  
restore needs to be done manually anyway - we normally mount the disk  
only at the start of amdump run and umount it immediately after amdump.


Dumping to a stationary disk and rsyncing to swappable disks is  
definitely more advanced and makes for smoother operation, but for our  
small setup I think the current system is not that bad. Besides, even  
when rsyncing to swappable disks, someone still has to swap these  
disks, and rsync does not, AFAIK, have a 'rsynccheck' which could yell  
at the operator in a way amcheck does ;)


--
Toomas Aas