Poll

Wath do you think?

This is helping a lot
2 (100%)
I can make it better
0 (0%)
i dont understand this
0 (0%)
i need more options
0 (0%)

Total Members Voted: 2

Voting closed: November 01, 2013, 02:45:53 am

Author Topic: FlexRAID monit restart on failure and monit for truecrypt users with autopool.  (Read 1757 times)

Offline wax7

  • Jr. Member
  • **
  • Posts: 53
  • Karma: +0/-0
    • View Profile
EDIT: DONT USE OLD Option like: start program = "/etc/int.d/FlexRAID start"
its messing around with LOCALE settings!!


Make a new monid conf file:
Code: [Select]
sudo nano /etc/monit/conf.d/FlexRAID.conf
Then Paste this into it
Code: [Select]

check host FlexRAID with address 127.0.0.1
start program "/bin/su --command 'service FlexRAID start'"
stop program "/bin/su --command 'service FlexRAID start'"

if failed port 8080 proto http and with timeout 10 seconds for 6 times within 8 cycles then restart
if 5 restarts within 60 cycles then timeout
now restart monit

Code: [Select]
sudo service monit restart

if you have one ore more Truecrypt mountpoints you are using this:

Code: [Select]
check host FlexRAID with address 127.0.0.1
  start program "/bin/su --command 'service FlexRAID start'"
  stop program "/bin/su --command 'service FlexRAID start'"
if failed port 8080 proto http
   and with timeout 10 seconds for 6 times within 8 cycles
       then restart
   depends on tc1
   depends on tc2
if 5 restarts within 60 cycles then timeout

check file tc1 with path /media/truecrypt1/tc/tc1
   if does not exist then alert
check file tc2 with path /media/truecrypt2/tc/tc2
    if does not exist then alert
you have to create a file on your TC drive with the path /..../tc/ and the file tc1 and tc2 and so on...
repeat for as many tc drives you have.
hint: Don't use directory check for drive mapping point, it does not work.

  ;D
« Last Edit: October 18, 2013, 05:41:53 am by wax7 »

Offline Brahim

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8,547
  • Karma: +204/-16
    • View Profile
Thanks for sharing. :)

Offline Stokkes

  • Newbie
  • *
  • Posts: 48
  • Karma: +0/-0
    • View Profile
I should point out that this won't necessarily always work. I've had times where FlexRAID crashes, but the mount point (in my case /mnt/raid) needs to be forcibly unmounted, sometimes after multiple commands before i can restart it.

The OS usually reports "Transport endpoint is not connected" after FlexRAID takes a nose dive.

Offline wax7

  • Jr. Member
  • **
  • Posts: 53
  • Karma: +0/-0
    • View Profile
the mountpoint is still there. thats true, but after start the pool again, it works again normaly. just check that autopool is on with a time of ~45 second's....
« Last Edit: October 02, 2013, 12:47:11 am by wax7 »

Offline Brahim

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8,547
  • Karma: +204/-16
    • View Profile
To force the pool to unmount, you can use the fusermount command.
Look under the ext folder in the installation directory.

Offline wax7

  • Jr. Member
  • **
  • Posts: 53
  • Karma: +0/-0
    • View Profile
i am not @ my Server atm.

how does that command look like?
maybe i can i use it with a monit command, too.

Offline Brahim

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8,547
  • Karma: +204/-16
    • View Profile
@wax7
Code: [Select]
cd <FlexRAID Install Dir/ext>
fusermount -u -z <path of pool mount point>