Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-admin-essentials
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
etersoft-admin-essentials
Commits
edd1be3b
Commit
edd1be3b
authored
Mar 24, 2015
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add small scripts
parent
1010682e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
2 deletions
+34
-2
glruncmd
gluster/glruncmd
+8
-0
grf_
gluster/grf_
+2
-0
grfall
gluster/grfall
+21
-0
removeallzero
gluster/removeallzero
+3
-2
No files found.
gluster/glruncmd
0 → 100755
View file @
edd1be3b
#!/bin/sh
# TODO: use brick hosts
for
i
in
snail multi cellar lav lin-test
;
do
#for i in virtualbox asu nun ; do
echo
echo
"Connect to
$i
..."
ssh
$i
"
$@
"
done
gluster/grf_
0 → 100755
View file @
edd1be3b
./grf --restore "$@"
gluster/grfall
0 → 100755
View file @
edd1be3b
#!/bin/sh
LISTVOLUME
=
"ftp-pub"
get_bricks
()
{
gluster volume info
$GVOLUME
|
grep
Brick
"[0-9]"
|
sed
-e
"s|Brick[0-9]: ||g"
}
for
GVOLUME
in
$LISTVOLUME
;
do
for
host
in
$(
get_bricks |
sed
-e
"s|:.*||g"
|
sort
-u
)
;
do
ssh
$host
cat
/var/log/glusterfs/glustershd.log
&&
ssh
$host
truncate
-c
-s0
/var/log/glusterfs/glustershd.log
done
>
grfall.log
./grflog
$GVOLUME
grfall.log
./grf
--restore
--list
grflog.task
done
for
GVOLUME
in
$LISTVOLUME
;
do
./grflog
$GVOLUME
./grf
--restore
--list
grflog.task
done
gluster/removeallzero
View file @
edd1be3b
ADPATH=$1
for i in pub pvt tmp ; do
./glruncmd "find /var/local/eterglust/pub/$ADPATH -type f -size 0 -perm 1000 | xargs rm -v"
./glruncmd "find /var/local/eterglust2/pub/$ADPATH -type f -size 0 -perm 1000 | xargs rm -v"
# -noleaf
./glruncmd "find /var/local/eterglust/pub/$ADPATH -type f -size 0 -perm 1000 -print0 | xargs -0 rm -v"
./glruncmd "find /var/local/eterglust2/pub/$ADPATH -type f -size 0 -perm 1000 -print0 | xargs -0 rm -v"
done
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment