my local disk is very small,just can store one day index files.So i wanted 
to move my index file to another fs path.
This is my sh.It excute everyday.
#!/bin/bash
#copy the index files form elasticsearch to clusterFS now
ddate=`date -d "1 days ago" +%Y.%m.%d`
clustername="mams_online_log"
indexdir="/data/soft/logmonitor/elasticsearch-1.1.0/data"
ipip=$(hostname)
dstdir=/mnt/lego-log/$ipip
echo "Start time: $(date "+%Y.%m.%d %H:%M:%S")"
echo "$dstdir"
# copy the old index file;
mkdir $dstdir
cp -r $indexdir/$clustername/nodes/0/indices/logstash-$ddate $dstdir/
mv $indexdir/$clustername/nodes/0/indices/logstash-$ddate 
$indexdir/$clustername/nodes/0/indices/tmp
ln -s $dstdir/logstash-$ddate 
$indexdir/$clustername/nodes/0/indices/logstash-$ddate
rm -rf $indexdir/$clustername/nodes/0/indices/tmp
echo "ok"
echo "End time: $(date "+%Y.%m.%d %H:%M:%S")"


But when i "lsof" this is always so many files used by the es pid.
So how i can do for this ?

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/ca99a71c-3524-4d8d-9c68-a21337aba62c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to