rock_pragma: demo3.sh

File demo3.sh, 2.1 KB (added by rock, 16 years ago)

Test DRBL command and GPFS faul-tolerance

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