1 | #!/bin/bash |
---|
2 | |
---|
3 | clear |
---|
4 | echo "" |
---|
5 | echo "[34;1m#########################################" |
---|
6 | echo "# #" |
---|
7 | echo "# DEMO 1 : Run GPFS in DRBL environment #" |
---|
8 | echo "# #" |
---|
9 | echo "#########################################" |
---|
10 | echo "-----------------------------------------" |
---|
11 | read |
---|
12 | |
---|
13 | echo "" |
---|
14 | echo "##################################" |
---|
15 | echo "# 1. Edit GPFS nodes information #" |
---|
16 | echo "##################################[m" |
---|
17 | echo "[32;1mcat gpfs.nodes[m" |
---|
18 | read |
---|
19 | cat gpfs.nodes |
---|
20 | read |
---|
21 | |
---|
22 | echo "" |
---|
23 | echo "[34;1m##############################" |
---|
24 | echo "# 2. Config GPFS Environment #" |
---|
25 | echo "##############################[0m" |
---|
26 | echo "[32;1mmmcrcluster -N gpfs.nodes -s gpfs00 -p gpfs01 -r /usr/bin/ssh -R /usr/bin/scp[0m" |
---|
27 | read |
---|
28 | mmcrcluster -N gpfs.nodes -s gpfs00 -p gpfs01 -r /usr/bin/ssh -R /usr/bin/scp |
---|
29 | read |
---|
30 | clear |
---|
31 | |
---|
32 | echo "" |
---|
33 | echo "[34;1m#################################" |
---|
34 | echo "# 3. Check mmcrcluster command #" |
---|
35 | echo "#################################[0m" |
---|
36 | echo "[32;1mmmlscluster[0m" |
---|
37 | read |
---|
38 | mmlscluster |
---|
39 | read |
---|
40 | clear |
---|
41 | |
---|
42 | echo "" |
---|
43 | echo "[34;1m####################################" |
---|
44 | echo "# 4. Edit GPFS disks information #" |
---|
45 | echo "####################################[0m" |
---|
46 | echo "[32;1mcat gpfs.disks[0m" |
---|
47 | read |
---|
48 | cp gpfs.disks.backup gpfs.disks |
---|
49 | cat gpfs.disks |
---|
50 | read |
---|
51 | |
---|
52 | echo "" |
---|
53 | echo "[34;1m##############################" |
---|
54 | echo "# 5. Create GPFS NSD #" |
---|
55 | echo "##############################[0m" |
---|
56 | echo "[32;1mmmcrnsd -F gpfs.disks -v no[0m" |
---|
57 | read |
---|
58 | mmcrnsd -F gpfs.disks -v no |
---|
59 | read |
---|
60 | clear |
---|
61 | |
---|
62 | echo "" |
---|
63 | echo "[34;1m###########################" |
---|
64 | echo "# 6. Check GPFS NSD #" |
---|
65 | echo "###########################[0m" |
---|
66 | echo "[32;1mmmlsnsd[0m" |
---|
67 | read |
---|
68 | mmlsnsd |
---|
69 | read |
---|
70 | clear |
---|
71 | |
---|
72 | echo "" |
---|
73 | echo "[34;1m###########################" |
---|
74 | echo "# 7. Startup GPFS daemon #" |
---|
75 | echo "###########################[0m" |
---|
76 | echo "[32;1mmmstartup -a[0m" |
---|
77 | read |
---|
78 | mmstartup -a |
---|
79 | echo "GPFS Daemon is runnung" |
---|
80 | read |
---|
81 | clear |
---|
82 | |
---|
83 | echo "" |
---|
84 | echo "[34;1m###########################" |
---|
85 | echo "# 8. Check GPFS daemon #" |
---|
86 | echo "###########################[0m" |
---|
87 | echo "[32;1mps aux | grep mm[0m" |
---|
88 | read |
---|
89 | ps aux | grep mm |
---|
90 | read |
---|
91 | echo "[32;1mmmgetstate -a[0m" |
---|
92 | read |
---|
93 | mmgetstate -a |
---|
94 | read |
---|
95 | clear |
---|
96 | |
---|
97 | echo "" |
---|
98 | echo "[34;1m##############################" |
---|
99 | echo "# 9. Create GPFS File System #" |
---|
100 | echo "##############################[0m" |
---|
101 | echo "[32;1mmmcrfs /home/gpfs_mount /dev/gpfs0 -F gpfs.disks -B 1M -m 2 -r 2 -v no[0m" |
---|
102 | read |
---|
103 | mkdir /home/gpfs_mount |
---|
104 | mmcrfs /home/gpfs_mount /dev/gpfs0 -F gpfs.disks -B 1M -m 2 -r 2 -v no |
---|
105 | read |
---|
106 | clear |
---|
107 | |
---|
108 | echo "" |
---|
109 | echo "[34;1m###############################" |
---|
110 | echo "# 10. Mount GPFS File System #" |
---|
111 | echo "###############################[0m" |
---|
112 | echo "[32;1mmmmount gpfs0 /home/gpfs_mount -a[0m" |
---|
113 | read |
---|
114 | mmmount gpfs0 /home/gpfs_mount -a |
---|
115 | echo "Mounting OK" |
---|
116 | read |
---|
117 | clear |
---|
118 | |
---|
119 | echo "[34;1m###############################" |
---|
120 | echo "# 11. Check GPFS File System #" |
---|
121 | echo "###############################[0m" |
---|
122 | echo "[32;1mmmdf gpfs0[0m" |
---|
123 | read |
---|
124 | mmdf gpfs0 |
---|
125 | read |
---|
126 | |
---|
127 | echo "" |
---|
128 | echo "[34;1m###############################" |
---|
129 | echo "# 12. Check GPFS File System #" |
---|
130 | echo "###############################[0m" |
---|
131 | echo "[32;1mdf -h[0m" |
---|
132 | read |
---|
133 | df -h |
---|
134 | read |
---|
135 | |
---|
136 | |
---|
137 | |
---|