Skip to content

Commit c8e25ea

Browse files
committed
Support up to 8 EBS volumes.
1 parent adf4f2e commit c8e25ea

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

ec2/spark_ec2.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def parse_args():
109109
"The volumes will be deleted when the instances terminate. " +
110110
"Only possible on EBS-backed AMIs. " +
111111
"EBS volumes are only attached if --ebs-vol-size > 0." +
112-
"Only support up to 5 EBS volumes.")
112+
"Only support up to 8 EBS volumes.")
113113
parser.add_option(
114114
"--swap", metavar="SWAP", type="int", default=1024,
115115
help="Swap space to set up per node, in MB (default: 1024)")
@@ -354,15 +354,15 @@ def launch_cluster(conn, opts, cluster_name):
354354
sys.exit(1)
355355

356356
# Create block device mapping so that we can add EBS volumes if asked to.
357-
# The first drive is attached as /dev/sdv, 2nd as /dev/sdw, ... /dev/sdz
357+
# The first drive is attached as /dev/sds, 2nd as /dev/sdt, ... /dev/sdz
358358
block_map = BlockDeviceMapping()
359359
if opts.ebs_vol_size > 0:
360360
for i in range(opts.ebs_vol_num):
361361
device = EBSBlockDeviceType()
362362
device.size = opts.ebs_vol_size
363363
device.volume_type="gp2"
364364
device.delete_on_termination = True
365-
block_map["/dev/sd" + chr(ord('v') + i)] = device
365+
block_map["/dev/sd" + chr(ord('s') + i)] = device
366366

367367
# AWS ignores the AMI-specified block device mapping for M3 (see SPARK-3342).
368368
if opts.instance_type.startswith('m3.'):
@@ -838,8 +838,8 @@ def real_main():
838838
(opts, action, cluster_name) = parse_args()
839839

840840
# Input parameter validation
841-
if opts.ebs_vol_num > 5:
842-
print >> stderr, "ebs-vol-num cannot be greater than 5"
841+
if opts.ebs_vol_num > 8:
842+
print >> stderr, "ebs-vol-num cannot be greater than 8"
843843
sys.exit(1)
844844

845845
try:

0 commit comments

Comments
 (0)