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
002b4ea3
Commit
002b4ea3
authored
Nov 25, 2018
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vz/remount.sh: cleanup spec, add verbose
parent
68135b84
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
remount.sh
vz/remount.sh
+15
-15
No files found.
vz/remount.sh
View file @
002b4ea3
...
...
@@ -4,32 +4,32 @@
#without complete restart of all vz.
#The only parameter is the resource to be mount.
if
[
${#}
-eq
0
]
then
if
[
${#}
-eq
0
]
;
then
echo
'Put the full path of the resource here, i.e.: ./remount.sh /var/ftp/pvt'
exit
1
fi
LIST
=
"
$(
mount
-l
|grep vz/root|grep
"
${
1
}
"
)
"
LISTNUM
=
"
$(
echo
"
${
LIST
}
"
|sed
-e
's%.*\/root\/%%g'
|sed
-e
's/\/.*//g'
)
"
LIST
=
"
$(
mount
-l
|
grep
vz/root |
grep
"
${
1
}
"
)
"
LISTNUM
=
"
$(
echo
"
${
LIST
}
"
|
sed
-e
's%.*\/root\/%%g'
|
sed
-e
's/\/.*//g'
)
"
echo
'The list of vz containers, where the resource had been mounted:'
echo
"
$LISTNUM
"
|
tr
'\n'
' '
echo
"
$LISTNUM
"
|
tr
'\n'
' '
echo
for
i
in
$LISTNUM
do
umount
-fl
"/var/lib/vz/root/
${
i
}${
1
}
"
for
i
in
$LISTNUM
;
do
umount
-flv
"/var/lib/vz/root/
${
i
}${
1
}
"
done
sleep
1
umount
-fl
"
${
1
}
"
umount
-f
v
l
"
${
1
}
"
sleep
1
# mount.glusterfs does not support -v
mount
"
${
1
}
"
sleep
1
for
i
in
$LISTNUM
do
vzctl
exec
${
i
}
mount
-a
sleep
3
[
$(
mount
-l
|grep
-c
"/var/lib/vz/root/
${
i
}${
1
}
"
)
-eq
0
]
&&
mount
-o
bind
"
${
1
}
"
"/var/lib/vz/root/
${
i
}${
1
}
"
for
i
in
$LISTNUM
;
do
vzctl
exec
${
i
}
mount
-a
sleep
3
mount
-l
|
grep
-q
"/var/lib/vz/root/
${
i
}${
1
}
"
&&
continue
mount
-vo
bind
"
${
1
}
"
"/var/lib/vz/root/
${
i
}${
1
}
"
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