Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Change to loops for some MegaCli commands

  • Loading branch information...
commit e40c4c70442799738cc8c132584470803dd259f2 1 parent b962f62
@igable igable authored
Showing with 32 additions and 33 deletions.
  1. +32 −33 make-multi-disk.sh
View
65 make-multi-disk.sh
@@ -1,22 +1,17 @@
#!/bin/bash
-MegaCli -CfgLdDel -L1 -a0
+#MegaCli -CfgLdDel -L1 -a0
-MegaCli -CfgLdAdd -r0 [252:1] WT NORA DIRECT -strpsz 1024 -a0
-MegaCli -CfgLdAdd -r0 [252:2] WT NORA DIRECT -strpsz 1024 -a0
-MegaCli -CfgLdAdd -r0 [252:3] WT NORA DIRECT -strpsz 1024 -a0
-MegaCli -CfgLdAdd -r0 [252:4] WT NORA DIRECT -strpsz 1024 -a0
-MegaCli -CfgLdAdd -r0 [252:5] WT NORA DIRECT -strpsz 1024 -a0
-MegaCli -CfgLdAdd -r0 [252:6] WT NORA DIRECT -strpsz 1024 -a0
-MegaCli -CfgLdAdd -r0 [252:7] WT NORA DIRECT -strpsz 1024 -a0
+#MegaCli -CfgLdAdd -r0 [252:1] WT NORA DIRECT -strpsz 1024 -a0
+for i in `seq 1 7`;
+do
+ MegaCli -CfgLdAdd -r0 [252:$i] WT NORA DIRECT -strpsz 1024 -a0;
+done
-MegaCli -CfgLdAdd -r0 [62:0] WT NORA DIRECT -strpsz 64 -a1
-MegaCli -CfgLdAdd -r0 [62:1] WT NORA DIRECT -strpsz 64 -a1
-MegaCli -CfgLdAdd -r0 [62:2] WT NORA DIRECT -strpsz 64 -a1
-MegaCli -CfgLdAdd -r0 [62:3] WT NORA DIRECT -strpsz 64 -a1
-MegaCli -CfgLdAdd -r0 [62:4] WT NORA DIRECT -strpsz 64 -a1
-MegaCli -CfgLdAdd -r0 [62:5] WT NORA DIRECT -strpsz 64 -a1
-MegaCli -CfgLdAdd -r0 [62:6] WT NORA DIRECT -strpsz 64 -a1
-MegaCli -CfgLdAdd -r0 [62:7] WT NORA DIRECT -strpsz 64 -a1
+#MegaCli -CfgLdAdd -r0 [62:0] WT NORA DIRECT -strpsz 64 -a1
+for i in `seq 0 7`;
+do
+ MegaCli -CfgLdAdd -r0 [62:$i] WT NORA DIRECT -strpsz 64 -a1;
+done
@@ -38,20 +33,24 @@ mkfs.xfs -f -L slot14 -d sunit=128,swidth=128 /dev/sdo
mkfs.xfs -f -L slot15 -d sunit=128,swidth=128 /dev/sdp
-
-mount -t xfs -L slot1 /bulk/ssd1
-mount -t xfs -L slot2 /bulk/ssd2
-mount -t xfs -L slot3 /bulk/ssd3
-mount -t xfs -L slot4 /bulk/ssd4
-mount -t xfs -L slot5 /bulk/ssd5
-mount -t xfs -L slot6 /bulk/ssd6
-mount -t xfs -L slot7 /bulk/ssd7
-
-mount -t xfs -L slot8 /bulk/ssd8
-mount -t xfs -L slot9 /bulk/ssd9
-mount -t xfs -L slot10 /bulk/ssd10
-mount -t xfs -L slot11 /bulk/ssd11
-mount -t xfs -L slot12 /bulk/ssd12
-mount -t xfs -L slot13 /bulk/ssd13
-mount -t xfs -L slot14 /bulk/ssd14
-mount -t xfs -L slot15 /bulk/ssd15
+for i in `seq 1 15`;
+do
+ mount -t xfs -L slot$i /bulk/ssd$i;
+done
+
+#mount -t xfs -L slot1 /bulk/ssd1
+#mount -t xfs -L slot2 /bulk/ssd2
+#mount -t xfs -L slot3 /bulk/ssd3
+#mount -t xfs -L slot4 /bulk/ssd4
+#mount -t xfs -L slot5 /bulk/ssd5
+#mount -t xfs -L slot6 /bulk/ssd6
+#mount -t xfs -L slot7 /bulk/ssd7
+
+#mount -t xfs -L slot8 /bulk/ssd8
+#mount -t xfs -L slot9 /bulk/ssd9
+#mount -t xfs -L slot10 /bulk/ssd10
+#mount -t xfs -L slot11 /bulk/ssd11
+#mount -t xfs -L slot12 /bulk/ssd12
+#mount -t xfs -L slot13 /bulk/ssd13
+#mount -t xfs -L slot14 /bulk/ssd14
+#mount -t xfs -L slot15 /bulk/ssd15
Please sign in to comment.
Something went wrong with that request. Please try again.