X-Git-Url: https://code.grnet.gr/git/archipelago/blobdiff_plain/e155e2f9255b38746c7c09827c47b38cf947e7e1..f29c3bebd18166d63d26c8014e7f1ea2bfbbb8f0:/xseg/launch diff --git a/xseg/launch b/xseg/launch index c88ddcc..2fae9b2 100755 --- a/xseg/launch +++ b/xseg/launch @@ -26,26 +26,27 @@ function parse_config { [ -z "${HOSTNAME}" ] && HOSTNAME=`hostname` [ -z "${XSEG_HOME}" ] && XSEG_HOME="/root/archip/xseg" [ -z "${MODULES_DIR}" ] && MODULES_DIR="${XSEG_HOME}/lib/kernel" - [ -z "${SPEC}" ] && SPEC="segdev:xsegbd:16:1024:12" + [ -z "${SPEC}" ] && SPEC="segdev:xsegbd:512:1024:12" [ -z "${REQS}" ] && REQS=512 - [ -z "${PORTS}" ] && PORTS=16 + [ -z "${PORTS}" ] && PORTS=512 [ -z "${IMAGES}" ] && IMAGES="/home/user/archip/xseg/peers/user/foo" - [ -z "${MAPS}" ] && IMAGES="/home/user/archip/xseg/peers/user/foo" + [ -z "${MAPS}" ] && MAPS="/home/user/archip/xseg/peers/user/foo" [ -z "${PITHOS}" ] && PITHOS="/srv/pithos/data/blocks" - [ -z "${PITHOSMAPS}" ] && PITHOS="/srv/pithos/data/maps" - [ -z "${XSEG_LOGS}" ] && XSEG_LOGS="/home/user/archip/logs" + [ -z "${PITHOSMAPS}" ] && PITHOSMAPS="/srv/pithos/data/maps" + [ -z "${XSEG_LOGS}" ] && XSEG_LOGS="/home/philipgian/archip/logs" [ -z "${DEVICE_PREFIX}" ] && DEVICE_PREFIX="/dev/xsegbd" [ -z "${XSEGBD_SYSFS}" ] && XSEGBD_SYSFS="/sys/bus/xsegbd" [ -z "${CHRDEV_NAME}" ] && CHRDEV_NAME="/dev/`cat /proc/devices | grep segdev | awk '{print $2}'`" [ "${CHRDEV_NAME}" = "/dev/" ] && CHRDEV_NAME="/dev/segdev" [ -z "${CHRDEV_MAJOR}" ] && CHRDEV_MAJOR=`cat /proc/devices | grep segdev | awk '{print $1}'` [ -z "${CHRDEV_MAJOR}" ] && CHRDEV_MAJOR=60 - [ -z "${NR_OPS}" ] && NR_OPS=16 + [ -z "${NR_OPS}" ] && NR_OPS=128 [ -z "${BPORT}" ] && BPORT=0 - [ -z "${VPORT}" ] && VPORT=2 + [ -z "${VPORT_START}" ] && VPORT_START=4 + [ -z "${VPORT_END}" ] && VPORT_END=200 [ -z "${MPORT}" ] && MPORT=1 - [ -z "${MBPORT}" ] && MBPORT=3 - [ -z "${VTOOL}" ] && VTOOL=15 + [ -z "${MBPORT}" ] && MBPORT=2 + [ -z "${VTOOL}" ] && VTOOL=3 } @@ -106,26 +107,28 @@ function spawn_filed { } function spawn_pfiled { - pgrep -f "peers/user/pfiled" || \ "${XSEG_HOME}/peers/user/pfiled" -p "$BPORT" -g "${SPEC}" -n \ - ${NR_OPS} "${PITHOS}" "${IMAGES}" &> "${XSEG_LOGS}/pfiled-${HOSTNAME}" & + ${NR_OPS} "${PITHOS}" "${IMAGES}" -v 1 &> "${XSEG_LOGS}/pfiled-${HOSTNAME}" & } + function spawn_pfiledm { - pgrep -f "peers/user/pfiled" || \ "${XSEG_HOME}/peers/user/pfiled" -p "$MBPORT" -g "${SPEC}" -n \ - ${NR_OPS} "${PITHOSMAPS}" "${MAPS}" &> "${XSEG_LOGS}/pfiledm-${HOSTNAME}" & + ${NR_OPS} "${PITHOSMAPS}" "${MAPS}" -v 1 &> "${XSEG_LOGS}/pfiledm-${HOSTNAME}" & +} function spawn_vlmcd { - pgrep -f "peers/user/mt-vlmcd" || \ - "${XSEG_HOME}/peers/user/mt-vlmcd" -t 1 -p "$VPORT" -bp "$BPORT" -mp "$MPORT" -g \ - "${SPEC}" -n ${NR_OPS} &> "${XSEG_LOGS}/vlmcd-${HOSTNAME}" & + pgrep -f "peers/user/st-vlmcd" || \ + "${XSEG_HOME}/peers/user/st-vlmcd" -t 1 -sp "$VPORT_START" \ + -ep "$VPORT_END" -bp "$BPORT" -mp "$MPORT" -g \ + "${SPEC}" -n ${NR_OPS} -v 3 &> "${XSEG_LOGS}/vlmcd-${HOSTNAME}" & # alloc_requests "$VPORT:0" 128 } function spawn_mapperdc { pgrep -f "mt-mapperd" || \ - "${XSEG_HOME}/peers/user/mt-mapperd" -t 1 -p "$MPORT" -bp "$BPORT" -g "${SPEC}"\ - &> "${XSEG_LOGS}/mapperd-${HOSTNAME}" & + "${XSEG_HOME}/peers/user/mt-mapperd" -t 1 -sp "$MPORT" -ep "$MPORT"\ + -bp "$BPORT" -mbp "$MBPORT" -g "${SPEC}"\ + -n ${NR_OPS} -v 3 &> "${XSEG_LOGS}/mapperd-${HOSTNAME}" & # alloc_requests "$MPORT:0" 128 } @@ -287,11 +290,11 @@ doublemap) sleep 0.5 spawn_pfiled spawn_pfiledm - spawn_mapperd + spawn_mapperdc spawn_vlmcd ;; stop) - pkill -f peers/user/mt-vlmcd || true + pkill -f peers/user/st-vlmcd || true # free_requests "$VPORT:0" 128 || true pkill -f peers/user/mt-mapperd || true # free_requests "$MPORT:0" 128 || true @@ -304,6 +307,19 @@ doublemap) ;; esac ;; +mapperd) + case $2 in + start) + spawn_mapperdc + ;; + stop) + pkill -f peers/user/mt-mapperd || true + ;; + *) + help + ;; + esac + ;; *) help ;;