FAQ
I've been able to get MogileFS up and running. Now I need to put these
services into system startup scripts so that they run when the system is
started. Are there such startup scripts or do I just put them in
/etc/rc.d/rc.local?

The only item I'm having trouble with is the tracker. Right now I start it
by doing a "su mogile", then running "mogilefsd -c
/etc/mogilefs/mogilefsd.conf --daemon". How would I put that into the
/etc/rc.d/rc.local?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.danga.com/pipermail/mogilefs/attachments/20070820/f1d2df0b/attachment.html

Search Discussions

  • Brandon Ooi at Aug 20, 2007 at 6:10 pm
    try
    su -u mogile mogilefsd -c /etc/mogilefs/mogilefsd.conf --daemon
    b

    drpr0ctologist@gmail.com wrote:
    I've been able to get MogileFS up and running. Now I need to put these
    services into system startup scripts so that they run when the system
    is started. Are there such startup scripts or do I just put them in
    /etc/rc.d/rc.local?

    The only item I'm having trouble with is the tracker. Right now I
    start it by doing a "su mogile", then running "mogilefsd -c
    /etc/mogilefs/mogilefsd.conf --daemon". How would I put that into the
    /etc/rc.d/rc.local?
  • Brandon Ooi at Aug 20, 2007 at 6:18 pm
    sorry sudo not su

    b

    Brandon Ooi wrote:
    try
    su -u mogile mogilefsd -c /etc/mogilefs/mogilefsd.conf --daemon
    b

    drpr0ctologist@gmail.com wrote:
    I've been able to get MogileFS up and running. Now I need to put
    these services into system startup scripts so that they run when the
    system is started. Are there such startup scripts or do I just put
    them in /etc/rc.d/rc.local?

    The only item I'm having trouble with is the tracker. Right now I
    start it by doing a "su mogile", then running "mogilefsd -c
    /etc/mogilefs/mogilefsd.conf --daemon". How would I put that into
    the /etc/rc.d/rc.local?
  • Arthur Bebak at Aug 20, 2007 at 6:40 pm

    Brandon Ooi wrote:
    try
    su -u mogile mogilefsd -c /etc/mogilefs/mogilefsd.conf --daemon
    b

    drpr0ctologist@gmail.com wrote:
    I've been able to get MogileFS up and running. Now I need to put these
    services into system startup scripts so that they run when the system
    is started. Are there such startup scripts or do I just put them in
    /etc/rc.d/rc.local?

    The only item I'm having trouble with is the tracker. Right now I
    start it by doing a "su mogile", then running "mogilefsd -c
    /etc/mogilefs/mogilefsd.conf --daemon". How would I put that into the
    /etc/rc.d/rc.local?
    Here are a couple of startup scripts for RedHat, first for a tracker
    mogilefsd, second for mogstored.
    -------------------- snip -----------------------
    #!/bin/bash
    #
    # mogilefsd Startup script for the MogileFS tracker
    #
    # chkconfig: - 85 15
    # description: MogileFS tracker
    # processname: mogilefsd
    # config: /etc/mogilefs/mogilefsd.conf
    # pidfile: /var/run/mogilefsd.pid

    # Source function library.
    . /etc/rc.d/init.d/functions

    # Path to the apachectl script, server binary, and short-form for messages.
    lockfile=${LOCKFILE-/var/lock/mogilefsd}
    RETVAL=0

    start() {
    echo -n $"Starting mogilefsd: "
    sudo -u mogile /usr/bin/mogilefsd -c /etc/mogilefs/mogilefsd.conf --daemon
    RETVAL=$?
    echo
    [ $RETVAL = 0 ] && touch ${lockfile}
    return $RETVAL
    }
    stop() {
    echo -n $"Stopping $prog: "
    killproc mogilefsd
    RETVAL=$?
    echo
    [ $RETVAL = 0 ] && rm -f ${lockfile}
    }
    reload() {
    echo -n $"Reloading mogilefsd: "
    killproc mogilefsd -HUP
    RETVAL=$?
    echo
    }

    # See how we were called.
    case "$1" in
    start)
    start
    ;;
    stop)
    stop
    ;;
    status)
    status mogilefsd
    RETVAL=$?
    ;;
    restart)
    stop
    start
    ;;
    reload)
    reload
    ;;
    *)
    echo $"Usage: mogilefsd {start|stop|restart|reload|status}"
    exit 1
    esac

    exit $RETVAL

    ------------------ snip ------------------

    ------------------ snip ------------------

    #!/bin/bash
    #
    # mogstored - Startup script for the MogileFS storage node
    #
    # chkconfig: - 85 15
    # description: MogileFS storage node
    # processname: mogstored
    # config: /etc/mogilefs/mogstored.conf
    # pidfile: /var/run/mogstored.pid

    # Source function library.
    . /etc/rc.d/init.d/functions

    # Path to the apachectl script, server binary, and short-form for messages.
    lockfile=${LOCKFILE-/var/lock/mogstored}
    RETVAL=0

    start() {
    echo -n $"Starting mogstored: "
    /usr/bin/mogstored --config /etc/mogilefs/mogstored.conf --daemonize > /dev/null
    RETVAL=$?
    echo
    [ $RETVAL = 0 ] && touch ${lockfile}
    return $RETVAL
    }
    stop() {
    echo -n $"Stopping $prog: "
    killproc mogstored
    RETVAL=$?
    echo
    [ $RETVAL = 0 ] && rm -f ${lockfile}
    }
    reload() {
    echo -n $"Reloading mogstored: "
    killproc mogstored -HUP
    RETVAL=$?
    echo
    }

    # See how we were called.
    case "$1" in
    start)
    start
    ;;
    stop)
    stop
    ;;
    status)
    status mogstored
    RETVAL=$?
    ;;
    restart)
    stop
    start
    ;;
    reload)
    reload
    ;;
    *)
    echo $"Usage: mogstored {start|stop|restart|reload|status}"
    exit 1
    esac

    exit $RETVAL

    ------------------------------ snip ------------------------

    --
    Arthur Bebak
    abebak@fabrikinc.com
  • Drpr0ctologist at Aug 21, 2007 at 6:26 am
    Awesome thanks!
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://lists.danga.com/pipermail/mogilefs/attachments/20070821/6454884d/attachment.html
Discussion Navigation
viewthread | post
Discussion Overview
groupmogilefs @
postedAug 20, '07 at 2:27p
activeAug 21, '07 at 6:26a
posts5
users3
websitedanga.com...

People

Translate

site design / logo © 2019 Grokbase