Skip to content

Commit

Permalink
leofs: Fix mv_avs_dir.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
yosukehara committed Mar 29, 2017
1 parent 9bc5a54 commit 0977529
Showing 1 changed file with 19 additions and 15 deletions.
34 changes: 19 additions & 15 deletions mv_avs_dir.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@
##
## ======================================================================
## 'mv_avs_dir' which can be used to change the data directory.
##
## You just specify the current directory and the destination directory,
## and you need to modify the leo_storage configuration, 'obj_containers.path '.
## and you need to modify the leo_storage configuration, 'obj_containers.path '
## before re-launching the LeoStorage node.
##
## Note: You need to stop a target LeoStorage node before executing 'mv_avs_dir'.
## ======================================================================

bold=`tput bold`
Expand All @@ -35,9 +39,6 @@ SCRIPT=`basename $0`
DIR_LOG="log"
DIR_OBJ="object"
DIR_METADATA="metadata"
QSTR_LOG="leo_object_storage_*"
QSTR_OBJ="*.avs"
QSTR_METADATA="*"


## ------------------------------------
Expand Down Expand Up @@ -131,24 +132,27 @@ fi


## ------------------------------------
## Processing For Source Dir
## Processing For Destination Dir
## ------------------------------------
## @TODO
## mv $src/* $dest/
cp -r $src/* $dest/

##
## Remove simlink files
##
## leo_storage/avs/log
rm_simlink "$src/$DIR_LOG"
rm_simlink "$dest/$DIR_LOG"

## leo_storage/avs/object
rm_simlink "$src/$DIR_OBJ"
rm_simlink "$dest/$DIR_OBJ"

## leo_storage/avs/metadata
rm_simlink "$src/$DIR_METADATA"


## ------------------------------------
## Processing For Destination Dir
## ------------------------------------
## mv $src/* $dest/
cp -r $src/* $dest/
rm_simlink "$dest/$DIR_METADATA"

##
## Make simlink files
##
## leo_storage/avs/log
create_simlink "$dest/$DIR_LOG" "."

Expand Down

0 comments on commit 0977529

Please sign in to comment.