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
bf86cec2
Commit
bf86cec2
authored
Feb 07, 2022
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update gluster utils
parent
a684053f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
17 deletions
+12
-17
grf
gluster/grf
+8
-5
config.sh
gluster/update/config.sh
+4
-12
No files found.
gluster/grf
View file @
bf86cec2
...
...
@@ -63,7 +63,7 @@ get_volume()
get_bricks
()
{
local
GVOLUME
=
"
$1
"
gluster volume info
$GVOLUME
|
grep
Brick
"[0-9]"
|
sed
-e
"s|Brick[0-9]: ||g"
|
sed
-e
"s|.(.*||g"
|
grep
-v
"arbiter"
ssh hektor gluster volume info
$GVOLUME
|
grep
Brick
"[0-9]"
|
sed
-e
"s|Brick[0-9]: ||g"
|
sed
-e
"s|.(.*||g"
#
| grep -v "arbiter"
}
set_host_path
()
...
...
@@ -110,7 +110,7 @@ opbrick()
fastssh
()
{
ssh
-o
"ControlMaster auto"
-o
"ControlPath ~/tmp/ssh_mux_%h_%p_%r"
-o
"ControlPersist 4h"
"
$@
"
ssh
-
x
-
o
"ControlMaster auto"
-o
"ControlPath ~/tmp/ssh_mux_%h_%p_%r"
-o
"ControlPersist 4h"
"
$@
"
}
sshopbrick
()
...
...
@@ -264,9 +264,10 @@ get_gfid()
[
-n
"
$host
"
]
||
return
#trusted.gfid=0x9dd12f564daa42ff94e103a4b0fb0899
# /var/local/eterglust/pub/.glusterfs/9d/d1/9dd12f56-4daa-42ff-94e1-03a4b0fb0899
gfid
=
$(
sshopbrick
"getfattr -h -d -m . -e hex"
"
$file
"
|
grep
^trusted.gfid
=
0x
|
sed
-e
"s|trusted.gfid=0x||g"
)
gfid
=
$(
sshopbrick
"getfattr -h -d -m . -e hex"
"
$file
"
|
grep
"^trusted
\.
gfid=0x"
|
sed
-e
"s|trusted.gfid=0x||g"
)
# if file exists, really
if
[
-n
"
$gfid
"
]
;
then
echo
"gfid='
$gfid
'"
>
&2
python
-c
"import uuid; x=uuid.UUID(hex='
$gfid
'); print x;"
fi
}
...
...
@@ -288,6 +289,7 @@ fi
echo
echo
"mounted info for
$sfile
:"
if
[
-z
"
$restore
"
]
;
then
echo
"md5sum
$sfile
"
md5sum
"
$sfile
"
fi
...
...
@@ -308,12 +310,13 @@ fi
# hack: translate to a path on volume
file
=
"
$(
echo
"
$sfile
"
|
sed
-e
"s|
$FTPROOT
/||g"
)
"
echo
"Volume path:
$file
, LISTBRICKS:
$LISTBRICKS
"
# hack
FLAGSYMLINK
=
[
-L
"
$sfile
"
]
&&
FLAGSYMLINK
=
1
stat
"
$sfile
"
#
stat "$sfile"
if
[
-z
"
$restore$remove
"
]
;
then
for
brick
in
$LISTBRICKS
;
do
...
...
@@ -331,7 +334,7 @@ for brick in $LISTBRICKS ; do
#trusted.gfid=0x9dd12f564daa42ff94e103a4b0fb0899
# /var/local/eterglust/pub/.glusterfs/9d/d1/9dd12f56-4daa-42ff-94e1-03a4b0fb0899
gfid
=
$(
cat
$WORKDIR
/getfattr |
grep
^trusted.gfid
|
sed
-e
"s|trusted.gfid=0x||g"
)
gfid
=
$(
cat
$WORKDIR
/getfattr |
grep
"^trusted
\.
gfid=0x"
|
sed
-e
"s|trusted.gfid=0x||g"
)
# if file exists, really
if
[
-n
"
$gfid
"
]
;
then
gfid
=
`
python
-c
"import uuid; x=uuid.UUID(hex='
$gfid
'); print x;"
`
...
...
gluster/update/config.sh
View file @
bf86cec2
#!/bin/bash
#
TODO
#
деление должно происходить не по пользователям компьютеров, а по тому, есть ли на них gluster-сервер
#
hosts - машины в пуле glusterd (используется glusterfsX-server)
#
clients - машины НЕ в пуле (не используется glusterfsX-server)
personal
=
"snail lin-test nun lav asu multi"
servers
=
"server arbiter cellar windsor space1 vbox"
#No 32-bit:
#personal="snail lin-test lav"
#servers="windsor vbox space1"
hosts
=
"
$personal
$servers
"
clients
=
"ant builder64 download"
# builder builder64"
hosts
=
"arbiter space1 virtualbox lin-test snail lav nun download cellar windsor"
clients
=
"ant builder64 localhost statos"
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