Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- GNU nano 2.5.3 Файл: cock.py
- import subprocess
- import os
- import time
- def main():
- #create_extent()
- create_raid_dmsetup()
- #create_raid()
- def create_raid():
- i = 0
- f=open('logi.txt','w')
- while(i<200):
- ch=str(i)
- ch_p=str(i+1)
- os.system("mdadm --create --metadata=1.2 --force /dev/md"+ch+" --level=1 --raid-devices=2 /dev/dm-"+ch+" /dev/dm-"+ch_p+"<<EOF")
- time.sleep(0.25)
- os.system(">yes")
- f.write(ch)
- i=i+2
- def create_extent():
- i = 0
- f = open('logi.txt','w')
- while(i<1000):
- os.system("dmsetup create disk2_extent"+str(i)+" --table '0 2000 linear /dev/vdc " + str(i)+"'")
- f.write(str(i))
- i=i+1
- time.sleep(0.2)
- def create_raid_dmsetup():
- i= 0
- f = open('logi.txt','w')
- while(i<1000):
- ch=str(i)
- ch_p=str(i+1)
- os.system("dmsetup create test_raid"+str(i)+" --table '0 2000 raid raid1 1 128 2 - /dev/mapper/disk2_extent" +ch+" - /dev/mapper/disk2_extent"+ch_p+"'")
- time.sleep(0.25)
- f.write(str(i))
- i=i+2
- if __name__ == '__main__':
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement