<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to AttachingEBS</title><link>https://sourceforge.net/p/kluster/wiki/AttachingEBS/</link><description>Recent changes to AttachingEBS</description><atom:link href="https://sourceforge.net/p/kluster/wiki/AttachingEBS/feed" rel="self"/><language>en</language><lastBuildDate>Sat, 14 Dec 2013 03:59:53 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/kluster/wiki/AttachingEBS/feed" rel="self" type="application/rss+xml"/><item><title>AttachingEBS modified by Daniel Povey</title><link>https://sourceforge.net/p/kluster/wiki/AttachingEBS/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v4
+++ v5
@@ -10,7 +10,7 @@

 We will be making these disks available by attaching each one to a particular machine-- not necessarily the master-- and exporting them to the other machines via NFS.  Be careful what you use these EBS volumes for though-- Amazon will not give you fast access to "vanilla" EBS volumes except in short-term bursts.  If you want faster there are two options: either

-  * use use the "iops-provisioned" EBS volumes which are a bit more expensive (add e.g. `-t io1 -i 1000` to the command above), or
+  * Use the "iops-provisioned" EBS volumes which are a bit more expensive (add e.g. `-t io1 -i 1000` to the command above), or
   * Use the "ephemeral storage" of the nodes, which our setup makes available by default as /export/.

 If you use the second option, be careful as it will be lost when you stop or terminate the node, or if it crashes.  You will have to copy it to somewhere else before you shut the node down, if you want to keep it permanently.
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Daniel Povey</dc:creator><pubDate>Sat, 14 Dec 2013 03:59:53 -0000</pubDate><guid>https://sourceforge.neta7cd6095799358f8c377cd6a2ab5b04ada965f51</guid></item><item><title>WikiPage AttachingEBS modified by Daniel Povey</title><link>https://sourceforge.net/p/kluster/wiki/AttachingEBS/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v3
+++ v4
@@ -8,37 +8,52 @@
     # ec2tag vol-995797ea  --tag Name=mycluster_home1
     TAG volume  vol-995797ea    Name    mycluster_home1

-We will be making these disks available by attaching each one to a particular machine-- not necessarily the master-- and exporting them to the other machines via NFS.  Be careful what you use these EBS volumes for though-- Amazon will not give you fast access to "vanilla" EBS volumes except in short-term bursts.  If you want faster access you should either use use the "iops-provisioned" EBS volumes which are a bit more expensive, or use the "ephemeral storage" of the nodes, which our setup makes available by default as /export/.
+We will be making these disks available by attaching each one to a particular machine-- not necessarily the master-- and exporting them to the other machines via NFS.  Be careful what you use these EBS volumes for though-- Amazon will not give you fast access to "vanilla" EBS volumes except in short-term bursts.  If you want faster there are two options: either

+  * use use the "iops-provisioned" EBS volumes which are a bit more expensive (add e.g. `-t io1 -i 1000` to the command above), or
+  * Use the "ephemeral storage" of the nodes, which our setup makes available by default as /export/.

-It can be attached to a machine-- not necessarily the master, in fact it is not a good idea to have all volumes attached to the same machine, and I prefer to leave the master without NFS volumes so its network does not get overloaded.  We'll attach this one to the master, just for demonstration: from your local machine,
+If you use the second option, be careful as it will be lost when you stop or terminate the node, or if it crashes.  You will have to copy it to somewhere else before you shut the node down, if you want to keep it permanently.
+
+It can be attached to a machine-- not necessarily the master, in fact it is not a good idea to have all volumes attached to the same machine, and I prefer to leave the master without NFS volumes so its network does not get overloaded.  We'll attach this one to the node `m1-01`.  From your local machine, do:

     :::text
-    ec2-attach-volume vol-995797ea -i i-41401821 -d /dev/xvdba
+    ec2-attach-volume vol-995797ea -i i-7705cd17 -d /dev/xvdz

-You can tell whether it attached correctly by doing `ec2dvol vol-995797ea`; it should say `attached`.  Since the volume is newly created, you will have to format it.  **Caution: only do this if the volume contains no data.  Double-check the device name to avoid formatting an existing volume.**  From the instance, do:
+You can tell whether it attached correctly by doing `ec2dvol vol-995797ea`; it should say `attached`.  Since the volume is newly created, you will have to format it as a file system.  From m1-01, do:

     :::text
-    mkfs -t ext3 /dev/xvdba
+    device=/dev/xvdz
+    cmp &lt;(head -c 1000 $device)  &lt;(head -c 1000 /dev/zero) &amp;&amp; mkfs -t ext3 $device

-You can choose a name where you will mount the volume in /mnt, and mount it:
+This command is the same as `mkfs -t ext3 /dev/xvdz`; the part with `cmp` is intended to make it harder for you to accidentally format an already formatted disk.  If you attach more than one EBS volume to the same machine, you will have to use a different device name: choose `/dev/xvdy`, for example.
+
+You can now mount the volume in `/mnt`: from m1-01, do:

     :::text
     mkdir /mnt/home1
-    mount /dev/xvdba /mnt/home1
+    mount /dev/xvdz /mnt/home1
     chmod a+rwx /mnt/home1

-We'll want to export this via NFS, so do as follows:
+You can check that it worked as follows: `df` should tell you it is device `/dev/xvdz`.
+
+    :::text
+    root@m1-01:~# df /mnt/home1
+    Filesystem           1K-blocks      Used Available Use% Mounted on
+    /dev/xvdz             10321208    154232   9642688   2% /mnt/home1
+
+
+We'll want to export this via NFS, so do as follows on m1-01, do:

     :::text
     echo '/mnt/home1      *(rw,sync,no_root_squash)' &gt;&gt; /etc/exports
     service nfs-kernel-server reload

-The command `service nfs-kernel-server reload` will print some harmless warnings about `'subtree_check'`.  If we wanted this directory to be automounted as /exports/home1, we could so as follows:
+The command `service nfs-kernel-server reload` will print some harmless warnings about `'subtree_check'`.  If we wanted this directory to be automounted as /exports/home1, we could so as follows: on `master`,

     :::text
     cd /var/yp
-    echo "home1 master:/mnt/home1" &gt;&gt; ypfiles/auto.export
+    echo "home1 m1-01:/mnt/home1" &gt;&gt; ypfiles/auto.export
     make

 If you did this, to verify that it worked you can do `ls /export/home1`:
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Daniel Povey</dc:creator><pubDate>Mon, 25 Mar 2013 18:40:06 -0000</pubDate><guid>https://sourceforge.netd022f41bc1031c1e1820b1837979e2e0cd5f0112</guid></item><item><title>WikiPage AttachingEBS modified by Daniel Povey</title><link>https://sourceforge.net/p/kluster/wiki/AttachingEBS/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v2
+++ v3
@@ -2,6 +2,7 @@

 In order to have relatively permanent storage attached to our cluster, we will use Amazon's "Elastic Block Store"-- these are basically virtual disks that you can attach to nodes.  You can create these disks in any size you specify.  Our experience for speech recognition applications is that the cost of CPU is orders of magnitude more than the cost of storage, so don't obsess too much over the size.  I usually allocate them with a size of 100GB.  We can give them an arbitrary name but try to make it unique:

+    :::text
     # ec2addvol -s 100 -z us-east-1c
     VOLUME  vol-995797ea    100     us-east-1c  creating    2013-03-23T06:10:10+0000    standard
     # ec2tag vol-995797ea  --tag Name=mycluster_home1
@@ -12,36 +13,42 @@

 It can be attached to a machine-- not necessarily the master, in fact it is not a good idea to have all volumes attached to the same machine, and I prefer to leave the master without NFS volumes so its network does not get overloaded.  We'll attach this one to the master, just for demonstration: from your local machine,

+    :::text
     ec2-attach-volume vol-995797ea -i i-41401821 -d /dev/xvdba

 You can tell whether it attached correctly by doing `ec2dvol vol-995797ea`; it should say `attached`.  Since the volume is newly created, you will have to format it.  **Caution: only do this if the volume contains no data.  Double-check the device name to avoid formatting an existing volume.**  From the instance, do:

+    :::text
     mkfs -t ext3 /dev/xvdba

 You can choose a name where you will mount the volume in /mnt, and mount it:

+    :::text
     mkdir /mnt/home1
     mount /dev/xvdba /mnt/home1
     chmod a+rwx /mnt/home1

 We'll want to export this via NFS, so do as follows:

+    :::text
     echo '/mnt/home1      *(rw,sync,no_root_squash)' &gt;&gt; /etc/exports
     service nfs-kernel-server reload

 The command `service nfs-kernel-server reload` will print some harmless warnings about `'subtree_check'`.  If we wanted this directory to be automounted as /exports/home1, we could so as follows:

+    :::text
     cd /var/yp
     echo "home1 master:/mnt/home1" &gt;&gt; ypfiles/auto.export
     make

 If you did this, to verify that it worked you can do `ls /export/home1`:

+    :::text
     # ls /export/home1
     lost+found

 Later we'll show you an easier way to do this using a kluster script.

+Previous: [Adding Nodes](AddingNodes)
 Next: [Adding a user](AddingUser)
 Up: [Kluster Wiki](Home)
-
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Daniel Povey</dc:creator><pubDate>Mon, 25 Mar 2013 05:08:00 -0000</pubDate><guid>https://sourceforge.net24512824a03b816448ed968d400202c26d6e44fb</guid></item><item><title>WikiPage AttachingEBS modified by Daniel Povey</title><link>https://sourceforge.net/p/kluster/wiki/AttachingEBS/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -1,4 +1,4 @@
-# Attaching EBS storage to nodes.
+## Attaching EBS storage to nodes

 In order to have relatively permanent storage attached to our cluster, we will use Amazon's "Elastic Block Store"-- these are basically virtual disks that you can attach to nodes.  You can create these disks in any size you specify.  Our experience for speech recognition applications is that the cost of CPU is orders of magnitude more than the cost of storage, so don't obsess too much over the size.  I usually allocate them with a size of 100GB.  We can give them an arbitrary name but try to make it unique:

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Daniel Povey</dc:creator><pubDate>Sun, 24 Mar 2013 00:16:26 -0000</pubDate><guid>https://sourceforge.nete5f0af55b508f6c0a40c3a570042706622340a73</guid></item><item><title>WikiPage AttachingEBS modified by Daniel Povey</title><link>https://sourceforge.net/p/kluster/wiki/AttachingEBS/</link><description>&lt;div class="markdown_content"&gt;&lt;h1 id="attaching-ebs-storage-to-nodes"&gt;Attaching EBS storage to nodes.&lt;/h1&gt;
&lt;p&gt;In order to have relatively permanent storage attached to our cluster, we will use Amazon's "Elastic Block Store"-- these are basically virtual disks that you can attach to nodes.  You can create these disks in any size you specify.  Our experience for speech recognition applications is that the cost of CPU is orders of magnitude more than the cost of storage, so don't obsess too much over the size.  I usually allocate them with a size of 100GB.  We can give them an arbitrary name but try to make it unique:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="c"&gt;# ec2addvol -s 100 -z us-east-1c&lt;/span&gt;
&lt;span class="n"&gt;VOLUME&lt;/span&gt;  &lt;span class="n"&gt;vol&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;995797&lt;span class="n"&gt;ea&lt;/span&gt;    100     &lt;span class="n"&gt;us&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;east&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;1&lt;span class="n"&gt;c&lt;/span&gt;  &lt;span class="n"&gt;creating&lt;/span&gt;    2013&lt;span class="o"&gt;-&lt;/span&gt;03&lt;span class="o"&gt;-&lt;/span&gt;23&lt;span class="n"&gt;T06&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;10&lt;span class="p"&gt;:&lt;/span&gt;10&lt;span class="o"&gt;+&lt;/span&gt;0000    &lt;span class="n"&gt;standard&lt;/span&gt;
&lt;span class="c"&gt;# ec2tag vol-995797ea  --tag Name=mycluster_home1&lt;/span&gt;
&lt;span class="n"&gt;TAG&lt;/span&gt; &lt;span class="n"&gt;volume&lt;/span&gt;  &lt;span class="n"&gt;vol&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;995797&lt;span class="n"&gt;ea&lt;/span&gt;    &lt;span class="n"&gt;Name&lt;/span&gt;    &lt;span class="n"&gt;mycluster_home1&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;We will be making these disks available by attaching each one to a particular machine-- not necessarily the master-- and exporting them to the other machines via NFS.  Be careful what you use these EBS volumes for though-- Amazon will not give you fast access to "vanilla" EBS volumes except in short-term bursts.  If you want faster access you should either use use the "iops-provisioned" EBS volumes which are a bit more expensive, or use the "ephemeral storage" of the nodes, which our setup makes available by default as /export/.&lt;/p&gt;
&lt;p&gt;It can be attached to a machine-- not necessarily the master, in fact it is not a good idea to have all volumes attached to the same machine, and I prefer to leave the master without NFS volumes so its network does not get overloaded.  We'll attach this one to the master, just for demonstration: from your local machine,&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;ec2&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;attach&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;volume&lt;/span&gt; &lt;span class="n"&gt;vol&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;995797&lt;span class="n"&gt;ea&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nb"&gt;i&lt;/span&gt; &lt;span class="nb"&gt;i&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;41401821 &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;d&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;dev&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;xvdba&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;You can tell whether it attached correctly by doing &lt;code&gt;ec2dvol vol-995797ea&lt;/code&gt;; it should say &lt;code&gt;attached&lt;/code&gt;.  Since the volume is newly created, you will have to format it.  &lt;strong&gt;Caution: only do this if the volume contains no data.  Double-check the device name to avoid formatting an existing volume.&lt;/strong&gt;  From the instance, do:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;mkfs&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;t&lt;/span&gt; &lt;span class="n"&gt;ext3&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;dev&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;xvdba&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;You can choose a name where you will mount the volume in /mnt, and mount it:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;mkdir&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;mnt&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;home1&lt;/span&gt;
&lt;span class="n"&gt;mount&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;dev&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;xvdba&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;mnt&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;home1&lt;/span&gt;
&lt;span class="n"&gt;chmod&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="n"&gt;rwx&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;mnt&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;home1&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;We'll want to export this via NFS, so do as follows:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;echo&lt;/span&gt; &lt;span class="s"&gt;'/mnt/home1      *(rw,sync,no_root_squash)'&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;etc&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;exports&lt;/span&gt;
&lt;span class="n"&gt;service&lt;/span&gt; &lt;span class="n"&gt;nfs&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;kernel&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;server&lt;/span&gt; &lt;span class="n"&gt;reload&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The command &lt;code&gt;service nfs-kernel-server reload&lt;/code&gt; will print some harmless warnings about &lt;code&gt;'subtree_check'&lt;/code&gt;.  If we wanted this directory to be automounted as /exports/home1, we could so as follows:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;cd&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;yp&lt;/span&gt;
&lt;span class="n"&gt;echo&lt;/span&gt; &amp;quot;&lt;span class="n"&gt;home1&lt;/span&gt; &lt;span class="n"&gt;master&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;mnt&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;home1&lt;/span&gt;&amp;quot; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;ypfiles&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;auto&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;export&lt;/span&gt;
&lt;span class="n"&gt;make&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;If you did this, to verify that it worked you can do &lt;code&gt;ls /export/home1&lt;/code&gt;:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="c"&gt;# ls /export/home1&lt;/span&gt;
&lt;span class="n"&gt;lost&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="n"&gt;found&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Later we'll show you an easier way to do this using a kluster script.&lt;/p&gt;
&lt;p&gt;Next: &lt;a class="" href="AddingUser"&gt;Adding a user&lt;/a&gt;&lt;br /&gt;
Up: &lt;a class="" href="/p/kluster/wiki/Home/"&gt;Kluster Wiki&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Daniel Povey</dc:creator><pubDate>Sat, 23 Mar 2013 19:45:12 -0000</pubDate><guid>https://sourceforge.net3f261a0f95747bf5f0ac7cd3d1c398ddd4116f97</guid></item></channel></rss>