<div dir="ltr">Here's what I use as a user data script. It will take all the ephemeral storage drives and create 1 large logical volume.<div><br><div><br></div><div><div>#!/bin/bash</div><div><br></div><div>VOLUMES=""</div><div>for device in `curl -s <a href="http://169.254.169.254/latest/meta-data/block-device-mapping/`">169.254.169.254/latest/meta-data/block-device-mapping/`</a></div><div>do</div><div> if [[ $device == "ephemeral"* ]]</div><div> then</div><div> block=`curl -s <a href="http://169.254.169.254/latest/meta-data/block-device-mapping/$device">169.254.169.254/latest/meta-data/block-device-mapping/$device</a> | awk -F/ '{print $NF}'`;</div><div> if [[ -e /dev/$block ]]</div><div> then</div><div><span class="" style="white-space:pre">                        </span>#if [ ! -e /mnt/$device ]</div><div><span class="" style="white-space:pre">                        </span>#then</div><div><span class="" style="white-space:pre">        </span> # mkfs.ext3 /dev/$block</div><div><span class="" style="white-space:pre">        </span> # mkdir /mnt/$device</div><div><span class="" style="white-space:pre">        </span> # mount /dev/$block /mnt/$device</div><div><span class="" style="white-space:pre">                        </span>#<span class="" style="white-space:pre">        </span>chmod 1777 /mnt/$device</div><div><span class="" style="white-space:pre">                        </span>#fi</div><div><span class="" style="white-space:pre">                        </span>pvcreate /dev/$block</div><div><span class="" style="white-space:pre">                        </span>VOLUMES="${VOLUMES} /dev/$block"</div><div> fi</div><div> fi</div><div>done</div><div><br></div><div>vgcreate vg_ephemeral $VOLUMES</div><div>SIZE=`vgdisplay vg_ephemeral | grep "Total PE" | awk '{print $3}'`</div><div>lvcreate -l $SIZE vg_ephemeral -n ephemerallv</div><div>mkfs.ext3 /dev/mapper/vg_ephemeral-ephemerallv</div><div>mkdir /scratch</div><div>mount /dev/mapper/vg_ephemeral-ephemerallv /scratch</div><div>chmod 1777 /scratch</div></div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 17, 2016 at 1:53 PM, Alex Lee <span dir="ltr"><<a href="mailto:simplitia@gmail.com" target="_blank">simplitia@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:"courier new",monospace">Dear all, </div><div class="gmail_default" style="font-family:"courier new",monospace">I notice that the AMI image I'm using is only 8G, however I'm wondering if there is an option to add instance storage during the launch say to 100G? </div><div class="gmail_default" style="font-family:"courier new",monospace">I do have an ebs volume that I can try to remount /tmp too but I'm sure if that will be properly nfs shared across the nodes, also I get a feeling that it will much slower. </div><div class="gmail_default" style="font-family:"courier new",monospace"><br></div><div class="gmail_default" style="font-family:"courier new",monospace">here are what my devices look like at the moment. </div><div class="gmail_default" style="font-family:"courier new",monospace"><br></div><div class="gmail_default" style="font-family:"courier new",monospace"><div class="gmail_default">NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT</div><div class="gmail_default">xvda 202:0 0 8G 0 disk</div><div class="gmail_default">└─xvda1 202:1 0 8G 0 part /</div><div class="gmail_default">xvdz 202:6400 0 1.5T 0 disk /data<br></div><div class="gmail_default">xvdaa 202:6656 0 300G 0 disk</div><div><br></div><div><br></div><div>by the way what is xvdaa? Can I use it as a /tmp space? </div><div><br></div><div>thanks in advance! </div><span class="HOEnZb"><font color="#888888"><div>Alex</div></font></span></div>
</div>
<br>_______________________________________________<br>
StarCluster mailing list<br>
<a href="mailto:StarCluster@mit.edu">StarCluster@mit.edu</a><br>
<a href="http://mailman.mit.edu/mailman/listinfo/starcluster" rel="noreferrer" target="_blank">http://mailman.mit.edu/mailman/listinfo/starcluster</a><br>
<br></blockquote></div><br></div>