⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
rbd
All Projects
Ceph
»
rbd
Overview
Activity
Roadmap
Issues
Spent time
Download (486 Bytes)
Bug #16077
» resie.py
Resize Script -
Tanay Ganguly
, 05/31/2016 05:18 AM
#!/bin/python
import
os
import
random
import
time
size
=
11000
i
=
0
new_size
=
0
sh_size
=
0
while
i
<
100
:
x
=
random
.
randint
(
1
,
500
)
new_size
=
size
+
x
cmd1
=
'
rbd resize cephfs_data/NEW_CLone --size %s
'
%
new_size
print
'
cmd is %s
'
%
cmd1
os
.
system
(
cmd1
)
time
.
sleep
(
5
)
x
=
random
.
randint
(
1
,
100
)
sh_size
=
new_size
-
x
cmd2
=
'
rbd resize cephfs_data/NEW_CLone --size %s --allow-shrink
'
%
sh_size
print
'
cmd2 is %s
'
%
cmd2
os
.
system
(
cmd2
)
i
=
i
+
1
« Previous
1
2
Next »
(2-2/2)
Loading...