Koozali.org: home of the SME Server

Affa Fails on already mounted nfs share and won't umount it.

Offline iltasu

  • **
  • 28
  • +0/-0
Affa Fails on already mounted nfs share and won't umount it.
« on: March 09, 2008, 03:07:22 PM »
Hello, I'm using affa version 0.9.0-5.el4.sme, I have an NFS NAS in the same subnet as the affa backup server, I setup the affa job to AutoMount the NFS Share when needed, and according to the wiki, I found an interesting AutoUnmount feature, not present in the pl job file, I added this value to the hash, here is the configuration from the command db affa show soalsv02:

Code: [Select]
    AutoUnmount=yes
    AutomountDevice=10.0.123.15:/nas/NASDisk-00003/public
    AutomountOptions=-t nfs
    AutomountPoint=/mnt/soalns01
    ConnectionCheckTimeout=120
    Debug=no
    Description=Backup della macchina soalsv02
    DiskSpaceWarn=strict
    EmailAddresses=gabrieletassoni@softwarealchemy.local
    Exclude[0]=
    Include[0]=
    RPMCheck=no
    RootDir=/mnt/soalns01
    SMEServer=yes
    TimeSchedule=2230
    Watchdog=yes
    chattyOnSuccess=1
    dailyKeep=28
    doneDaily=
    doneMonthly=
    doneWeekly=
    doneYearly=
    localNice=0
    monthlyKeep=12
    postJobCommand=
    preJobCommand=
    remoteHostName=localhost
    remoteNice=0
    rsync--inplace=yes
    rsync--modify-window=0
    rsyncCompress=yes
    rsyncTimeout=900
    scheduledKeep=3
    sshPort=22
    status=enabled
    weeklyKeep=5
    yearlyKeep=1

I'm facing some problems, but don't know if they are bugs, or simple misinterpretations I made reading the wiki:

1) If the nfs share is already mounted, affa wil just send me an email telling me about an error and don't perform the backup at all (expected behavior: affa recognizes it's already mounted, and use it for backup, without complains), here is the relevant part:
Code: [Select]
Sun_Mar__9_14:54:21[22973]:_Affa_0.9.0-5:_Starting_job_soalsv02_scheduled_(localhost)
Sun_Mar__9_14:54:21[22973]:_Description:_Backup_della_macchina_soalsv02
Sun_Mar__9_14:54:21[22973]:_Mounting_10.0.123.15:/nas/NASDisk-00003/public_to_/mnt/soalns01
Exec_Out:_mount:_10.0.123.15:/nas/NASDisk-00003/public_already_mounted_or_/mnt/soalns01_busy
Exec_Out:_mount:_according_to_mtab,_10.0.123.15:/nas/NASDisk-00003/public_is_already_mounted_on_/mnt/soalns01
Exec_Out:_exitstatus=32
Sun_Mar__9_14:54:21[22973]:_Error_130:_Couldn't_mount_10.0.123.15:/nas/NASDisk-00003/public_/mnt/soalns01

2) If I manually umount the share, affa correctly tries to mount it before starting the backup, the nfs mounting takes about 2-3 minutes (never understood why, but all the nfs shres I had to use in my life, were really slow to be mounted). Then Affa manages to successfully backup the server to the nfs share, I can see it by issuing affa --list-archives soalsv02, but I still recieve 5 (five, one for yearly, one for monthly, one for weekly and one for daily, plus one for scheduled!) error emails which tells me the same error as above and never recieve a success email (as you can see I set chattyOnSuccess=1).

3) The AutoUnmount=yes directive seems not to be taken in consideration, the nfs share is still mounted after the job, being unable to umount it leads again to the problem number 1).

Thank you for this great contrib, and for the answers to these problems.
« Last Edit: March 09, 2008, 03:30:51 PM by iltasu »

Offline iltasu

  • **
  • 28
  • +0/-0
Re: Affa Fails on already mounted nfs share and won't umount it.
« Reply #1 on: March 09, 2008, 03:57:39 PM »
A workaround for this problem is to use a pre Job Command and a post job command to mount and unmount the share (disabling the directives reguarding the AutoMount feature). This way i managed to not have all those errors email and the backup is ok!

Offline the-heck

  • ***
  • 63
  • +0/-0
  • Chance favors the prepared mind.
Re: Affa Fails on already mounted nfs share and won't umount it.
« Reply #2 on: March 09, 2008, 06:07:44 PM »
Thanks for the tip.  I will try to do it on my affa server.  It sometimes do not send me notifications.  But its doing the backup.
***************
·¨­­­°÷»the-heck«÷°¨·
***************

Offline m

  • *****
  • 276
  • +0/-0
  • Peet
Re: Affa Fails on already mounted nfs share and won't umount it.
« Reply #3 on: March 10, 2008, 12:13:12 AM »
iltasu,

even if you've found a workaround please report your problems to the bug tracker. It appears that you've found bugs that should be investigated and fixed. Please open one ticket for each of your problems. Run Affa with 'Debug=yes' and attach the relevant part of the log file. Thanks.

http://bugs.contribs.org/enter_bug.cgi?product=SME%20Contribs&component=smeserver-affa
 

Offline iltasu

  • **
  • 28
  • +0/-0
Re: Affa Fails on already mounted nfs share and won't umount it.
« Reply #4 on: March 10, 2008, 02:09:19 AM »
Reported some bugs:
http://bugs.contribs.org/show_bug.cgi?id=4035
http://bugs.contribs.org/show_bug.cgi?id=4036

The behaviour is the same if I have to backup a remote non-SME server, didn't posted a bug report for this variant because it behaves exaclty the same, the only difference is the fact that I don't backup localhost, but a remote machine (creating the trust copying the certificates generated by sme).

Thanks for the answer, I hope I've been of some help!

Offline m

  • *****
  • 276
  • +0/-0
  • Peet
Re: Affa Fails on already mounted nfs share and won't umount it.
« Reply #5 on: March 10, 2008, 11:26:02 AM »
the nfs mounting takes about 2-3 minutes
Start the portmapper:
Code: [Select]
/etc/rc.d/init.d/portmap start

Offline iltasu

  • **
  • 28
  • +0/-0
Re: Affa Fails on already mounted nfs share and won't umount it.
« Reply #6 on: March 10, 2008, 01:06:10 PM »
Start the portmapper:
Code: [Select]
/etc/rc.d/init.d/portmap start

^_^ Many thanks, I'll try it, I didn't know about portmapper!

Offline m

  • *****
  • 276
  • +0/-0
  • Peet
Re: Affa Fails on already mounted nfs share and won't umount it.
« Reply #7 on: March 10, 2008, 07:22:41 PM »
I have updated the relevant section in the Affa documentation
http://wiki.contribs.org/Affa#Setup_NAS

Offline iltasu

  • **
  • 28
  • +0/-0
Re: Affa Fails on already mounted nfs share and won't umount it.
« Reply #8 on: March 11, 2008, 01:04:43 AM »
Great! thank you.. the updated documentation is really clear! And the -10 version is really good, no more bugs on mount/unmount! Thanks! ^_^