1 | #!/bin/bash |
---|
2 | clear |
---|
3 | echo "[34;1m##################################################" |
---|
4 | echo "# #" |
---|
5 | echo "# DEMO 3 : Test DRBL cmd and GPFS data-replicate #" |
---|
6 | echo "# #" |
---|
7 | echo "##################################################" |
---|
8 | echo "--------------------------------------------------" |
---|
9 | echo "" |
---|
10 | read |
---|
11 | |
---|
12 | echo "" |
---|
13 | echo "###############################" |
---|
14 | echo "# 1. Creat file in GPFS disk #" |
---|
15 | echo "###############################[0m" |
---|
16 | echo "[32;1mdd if=/dev/zero of=/home/gpfs_mount/test.img bs=1024K count=500[0m" |
---|
17 | dd if=/dev/zero of=/home/gpfs_mount/test.img bs=1024K count=500 |
---|
18 | read |
---|
19 | |
---|
20 | echo "" |
---|
21 | echo "[34;1m######################################" |
---|
22 | echo "# 2. Check this file test.img (500M) #" |
---|
23 | echo "######################################[0m" |
---|
24 | echo "[32;1mls -lh /home/gpfs_moun[0m" |
---|
25 | read |
---|
26 | ls -lh /home/gpfs_mount |
---|
27 | read |
---|
28 | clear |
---|
29 | |
---|
30 | echo "" |
---|
31 | echo "[34;1m###################################" |
---|
32 | echo "# 3. Use DRBL command to shutdown #" |
---|
33 | echo "# (For GPFS -> gpfs07 is crash) #" |
---|
34 | echo "###################################[0m" |
---|
35 | read |
---|
36 | echo "[32;1m/opt/drbl/sbin/dcs[0m" |
---|
37 | read |
---|
38 | /opt/drbl/sbin/dcs |
---|
39 | read |
---|
40 | clear |
---|
41 | |
---|
42 | echo "" |
---|
43 | echo "[34;1m###############################" |
---|
44 | echo "# 4. Check GPFS disk state #" |
---|
45 | echo "###############################[0m" |
---|
46 | echo "[32;1mmmegtstate -a[0m" |
---|
47 | read |
---|
48 | mmgetstate -a |
---|
49 | read |
---|
50 | |
---|
51 | |
---|
52 | echo "" |
---|
53 | echo "[34;1m##################################" |
---|
54 | echo "# 5. If enable data-replicate, #" |
---|
55 | echo "# you still can use this disk #" |
---|
56 | echo "##################################[0m" |
---|
57 | read |
---|
58 | echo "[32;1mls -al /home/gpfs_mount/[0m" |
---|
59 | ls -lh /home/gpfs_mount/ |
---|
60 | read |
---|
61 | clear |
---|
62 | |
---|
63 | echo "" |
---|
64 | echo "[34;1m##################################" |
---|
65 | echo "# 6. Test this GPFS disk #" |
---|
66 | echo "##################################[0m" |
---|
67 | echo "[32;1mdd if=/dev/zero of=/home/gpfs_mount/test2.img bs=1024K count=500[0m" |
---|
68 | dd if=/dev/zero of=/home/gpfs_mount/test2.img bs=1024K count=500 |
---|
69 | read |
---|
70 | echo "" |
---|
71 | |
---|
72 | echo "[34;1m###########################################" |
---|
73 | echo "# 7. Check this new file test2.img (500M) #" |
---|
74 | echo "###########################################[0m" |
---|
75 | echo "[32;1mls -lh /home/gpfs_mount[0m" |
---|
76 | read |
---|
77 | ls -lh /home/gpfs_mount |
---|
78 | read |
---|