1 | #!/bin/bash |
---|
2 | clear |
---|
3 | echo "" |
---|
4 | echo "[34;1m#####################################" |
---|
5 | echo "# #" |
---|
6 | echo "# DEMO 2 : Dynamic add 3 disks #" |
---|
7 | echo "# #" |
---|
8 | echo "#####################################" |
---|
9 | echo "-------------------------------------" |
---|
10 | read |
---|
11 | |
---|
12 | echo "" |
---|
13 | echo "#################################" |
---|
14 | echo "# 1. Edit new disks information #" |
---|
15 | echo "#################################[0m" |
---|
16 | echo "[32;1mcat gpfs.add_disks[0m" |
---|
17 | read |
---|
18 | cp gpfs.add_disks.backup gpfs.add_disks |
---|
19 | cat gpfs.add_disks |
---|
20 | read |
---|
21 | |
---|
22 | echo "" |
---|
23 | echo "[34;1m##############################" |
---|
24 | echo "# 2. Creat new GPFS NSD #" |
---|
25 | echo "##############################[0m" |
---|
26 | echo "[32;1mmmcrnsd -F gpfs.add_disks -v no[0m" |
---|
27 | read |
---|
28 | mmcrnsd -F gpfs.add_disks -v no |
---|
29 | read |
---|
30 | clear |
---|
31 | |
---|
32 | echo "" |
---|
33 | echo "[34;1m##############################" |
---|
34 | echo "# 3. Check GPFS NSD #" |
---|
35 | echo "##############################[0m" |
---|
36 | echo "[32;1mmmlsnsd[0m" |
---|
37 | read |
---|
38 | mmlsnsd |
---|
39 | read |
---|
40 | clear |
---|
41 | |
---|
42 | echo "" |
---|
43 | echo "[34;1m##############################################" |
---|
44 | echo "# 4. Merge new and old disks into one disk #" |
---|
45 | echo "##############################################[0m" |
---|
46 | echo "[32;1mmmadddisk gpfs0 -F gpfs.add_disks -r -v no[0m" |
---|
47 | read |
---|
48 | mmadddisk gpfs0 -F gpfs.add_disks -r -v no |
---|
49 | read |
---|
50 | clear |
---|
51 | |
---|
52 | echo "" |
---|
53 | echo "[34;1m#################################" |
---|
54 | echo "# 5. Check disk spaces #" |
---|
55 | echo "#################################[0m" |
---|
56 | echo "[32;1mmmdf gpfs0[0m" |
---|
57 | read |
---|
58 | mmdf gpfs0 |
---|
59 | read |
---|
60 | |
---|
61 | echo "" |
---|
62 | echo "[34;1m#################################" |
---|
63 | echo "# 6. Check disk spaces #" |
---|
64 | echo "#################################[0m" |
---|
65 | echo "" |
---|
66 | |
---|
67 | echo "[32;1mdf -h[0m" |
---|
68 | read |
---|
69 | df -h |
---|
70 | read |
---|
71 | |
---|