[Glass] Shutdown server with glass environment

Mariano Martinez Peck via Glass glass at lists.gemtalksystems.com
Fri Sep 11 06:50:28 PDT 2015


Hi Dario, some quick answers.

On Fri, Sep 11, 2015 at 5:08 AM, Trussardi Dario Romano via Glass <
glass at lists.gemtalksystems.com> wrote:

> Ciao,
>
>         i have a Gemstone environment 3.1.0.6  running on an Ubuntu system.
>
>         On this system i use the Daemontools to start the Gemstone at the
> system startup  ( https://github.com/Monty/GemStone_daemontools_setup )
>
>         Now my first question is:
>
>                         when i shutdown the system with the linux command
> :             shutdown -h 0
>
>                         the gemstone environment is right stopped ?
>
>
>

GemStone does quite good job at shutting down as cleaner as possible even
when receiving a kill signal. So... i THINK the system *should* shutdown
correctly at system shutdown. However, I have found some issues so I prefer
to do it myself (mostly about existing lock files upon reboot). This is my
init script:


#!/bin/bash
# Gemstone manager
# chkconfig: 345 96 01
# description: This is an init file for starting and stoping all stones.
Monit is 98, so we want to start before.
# processname: Gemstone manager

#PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin

source /etc/environment

case "$1" in

start)
   printf "%-50s" "Starting $NAME..."
find /opt/gemstone/locks/ -type f -not -name 'gemstone.hostid' -delete
/bin/bash /opt/gemstoneAdditions/scripts/startStonesAll.sh
/bin/bash /opt/gemstoneAdditions/scripts/startSeasideGemsAll.sh
#sleep 240
;;
status)
/opt/gemstone/product/bin/gslist -lcv
;;
stop)
        printf "%-50s" "Stopping $NAME"
/bin/bash /opt/gemstoneAdditions/scripts/stopStonesAll.sh
;;

restart)
        $0 stop
        $0 start
;;

*)
        echo "Usage: $0 {status|start|stop|restart}"
        exit 1
esac

exit 0








>         Another question:
>
>                         if the system power is suddenly less, what risk?


>                         What should I do in this case ?
>

Remove lock files as I do at OS start !!!


>
>                         The gemstone environment may become unstable, do
> not start at the next starting ?
>
>                         I can lose some transaction?
>
>
TooManyQuestionsException ;)  Read the admin guide about system crash
recovery and transaction logs. As a general point, you don't loose any
transaction. At reboot, GemStone may realize that it was not a clean
shutdown and may recover from tranlogs (the stone start will take some
time). In some cases you may also need to start stone with -R. Of course if
it was a abrupt shutdown (electricity shutdown for example) I THINK the
tranlog may be corrupted too if you were just writing it at the time of the
crash but it's less likely. So in that case things are a bit more
complicated I imagine.





>
>         Thanks for some considerations,
>
>                 Dario
>
>
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/glass
>



-- 
Mariano
http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20150911/06d52dcb/attachment.html>


More information about the Glass mailing list