Acceleration selon suggestion de DAY lors de la réunion chez ARCHESYS du 1/7/10

Creation des lieux de stokage froid

cd /home/toto
mkdir .thumbnails_day
mkdir .gconf_day

diverses précautions..
Mkdir .gconf_sauv
cd .gconf
cp -R -v * ~/gconf_sauv

Ajout dans fstab

tmpfs /home/toto/.thumbnails tmpfs rw
tmpfs /home/toto/.gconf tmpfs rw
tmpfs /var/run tmpfs rw

root:machine# cd /etc/init.d
edition de skeleton ou bien #vi ram_rsync
#! /bin/sh
### BEGIN INIT INFO
# Provides: ram
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Example initscript
# Description: This file should be used to construct scripts to be
# placed in /etc/init.d.
### END INIT INFO
# Author: Foo Bar GCR at manchix org
#
# PATH should only include /usr/* if it runs after the mountnfs.sh script PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="ram_rsync_"
case "$1" in
start)
rsync -r -t -p -o -g -v --progress /home/toto/.gconf_day/ /home/toto/.gconf/
rsync -r -t -p -o -g -v --progress /home/toto/.thumbnails_day/ /home/toto/.thumbnails/
echo "start" >&2
;;
stop)
rsync -r -t -p -o -g -v -del --progress /home/toto/.thumbnails/ /home/toto/.thumbnails_day/
rsync -r -t -p -o -g -v --progress /home/toto/.gconf/ /home/toto/.gconf_day/
echo "stop" >&2
;;
#reload|force-reload)
#
# If do_reload() is not implemented then leave this commented out
#;;
restart|force-reload)
#
# If the "reload" option is implemented then remove the
# 'force-reload' alias
;;

esac
:


Sauvegarde :wq

root:machine# chmod u+x ram_rsync
root:machine# man update-rc.d
root:machine# update-rc.d ram_rsync defaults
reboot

resultat: df
Sys. de fich. 1K-blocs Occupé Disponible Capacité Monté sur
/dev/hda1 1935132 439748 1396988 24% /
tmpfs 513596 0 513596 0% /lib/init/rw
udev 10240 888 9352 9% /dev
tmpfs 513596 0 513596 0% /dev/shm
/dev/hdc5 186663 27545 149481 16% /var/tmp
/dev/hdc8 932880 17612 867880 2% /tmp
..
tmpfs 513596 9172 504424 2% /home/toto/.thumbnails
tmpfs 513596 948 512648 1% /home/toto/.gconf
tmpfs 513596 68 513528 1% /var/run