Starting with FlexRAID 2.0 beta build 15, users can execute custom scripts before and after the pool is started or stopped.
Users will need to create one or more of the following 4 scripts in the FlexRAID install ROOT (create only the scripts you need):
- pool-before-start(.cmd|.sh): called before the pool is started
- pool-after-start(.cmd|.sh): called after the pool is started
- pool-before-stop(.cmd|.sh): called before the pool is stopped
- pool-after-stop(.cmd|.sh): called after the pool is stopped
The extension for the scripts need to be .cmd for Windows users and .sh for Linux users.
FlexRAID will pass in two parameters to the call of each script:
The first parameter is the class and instance of id of the pool (unique identifier for the pool – Ex: class1_0).
The second parameter is whether the execution prior to the callback was successful.
This parameter is only useful for the “pool-after” callbacks and tells you whether the pool started or stopped successfully.