<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
> <channel><title>Comments on: Creating Consistent Snapshots of a Live Instance with XFS on a Boot-from-EBS AMI</title> <atom:link href="http://shlomoswidler.com/2010/01/creating-consistent-snapshots-of-live.html/feed" rel="self" type="application/rss+xml" /><link>http://shlomoswidler.com/2010/01/creating-consistent-snapshots-of-live.html</link> <description>Cloud Developer Tips: Practical tips for developers of cloud computing applications.</description> <lastBuildDate>Mon, 30 Aug 2010 13:09:34 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.0.1</generator> <item><title>By: shlomo</title><link>http://shlomoswidler.com/2010/01/creating-consistent-snapshots-of-live.html/comment-page-1#comment-336</link> <dc:creator>shlomo</dc:creator> <pubDate>Wed, 30 Jun 2010 16:28:17 +0000</pubDate> <guid
isPermaLink="false">http://orchestratus.com/shlomoswidler.com/?p=5#comment-336</guid> <description>@FreeMind,In EC2 the only way to create a bootable EBS volume with Windows on it is by starting with an EBS-based instance and using the API tools to create a new image from that instance - there&#039;s no way to create a snapshot and then register it as a Windows AMI. I&#039;m not familiar with how Eucalyptus does Windows, but I imagine it might have the same limitation.</description> <content:encoded><![CDATA[<p>@FreeMind,</p><p>In EC2 the only way to create a bootable EBS volume with Windows on it is by starting with an EBS-based instance and using the API tools to create a new image from that instance &#8211; there&#8217;s no way to create a snapshot and then register it as a Windows AMI. I&#8217;m not familiar with how Eucalyptus does Windows, but I imagine it might have the same limitation.</p> ]]></content:encoded> </item> <item><title>By: FreeMind</title><link>http://shlomoswidler.com/2010/01/creating-consistent-snapshots-of-live.html/comment-page-1#comment-334</link> <dc:creator>FreeMind</dc:creator> <pubDate>Wed, 30 Jun 2010 14:13:32 +0000</pubDate> <guid
isPermaLink="false">http://orchestratus.com/shlomoswidler.com/?p=5#comment-334</guid> <description>Hi,This was really useful.I am trying to use a bootable windows ebs volume with eucalyptus but I am not able to figure out how to make the boot ami point to the windows ebs volume.Any help is appreciated.Thanks</description> <content:encoded><![CDATA[<p>Hi,</p><p>This was really useful.</p><p>I am trying to use a bootable windows ebs volume with eucalyptus but I am not able to figure out how to make the boot ami point to the windows ebs volume.</p><p>Any help is appreciated.</p><p>Thanks</p> ]]></content:encoded> </item> <item><title>By: Aruna Kulatunga</title><link>http://shlomoswidler.com/2010/01/creating-consistent-snapshots-of-live.html/comment-page-1#comment-332</link> <dc:creator>Aruna Kulatunga</dc:creator> <pubDate>Thu, 24 Jun 2010 17:40:22 +0000</pubDate> <guid
isPermaLink="false">http://orchestratus.com/shlomoswidler.com/?p=5#comment-332</guid> <description>Hi All,Great tutorial. I used the pesky Ubuntu Lucid EBS ami-ab4d67df as a base in eu-west-1 region and had a few issues. The first was the dreaded ssh connection refused when the time came to launch and log into the new instance, even after explicitly adding the ephemeral storage as per comment in &lt;strong&gt;No. 25&lt;/strong&gt;. The second, after figuring out that I stumbled by just copying the directions instead of checking where the ephemeral storage is in m1.large instance (they go to &lt;code&gt;/dev/sdb&lt;/code&gt; and &lt;code&gt;/dev/sdc&lt;/code&gt; - instead of &lt;code&gt;/dev/sda2&lt;/code&gt; and &lt;code&gt;/dev/sda3&lt;/code&gt; ) was when I stopped the new instant and restarted again, to be refused entry, again!What finally worked for me is detailed below. As always YMMW.Before rsynching to /vol (or even after, you need to rsynch again) edit the &lt;strong&gt;etc/fstab&lt;/strong&gt; so that the ephemeral drives are correctly mounted and root is specified as xfs.Example:
&lt;code&gt;
# /etc/fstab: static file system information.
#
proc                                            /proc           proc    nodev,noexec,nosuid 0       0
/dev/sda1                                       /               xfs     defaults        0       0
/dev/sdb                                        /mnt            auto    defaults,comment=cloudconfig    0       0
/dev/sdc                                        /log            auto    defaults,comment=cloudconfig    0       0
&lt;/code&gt;Then, change the &lt;strong&gt;ec2-register&lt;/strong&gt; instructions so that the root device, /dev/sda1, has its DeleteOnTermination flag set to false. This should be automatic given its an EBS volume and also we are not terminating, but simply stopping and restarting, but for some reason it appears that without this flag explicitly set, weird things happen to /etc/fstab and the ephemeral storage devices, which in turn affect services such as ssh.This is the command I used for the Lucid ami-ab4d67df . Replace the XXXXX with your unique information and change the size (30) immediately after the snap-xxxxxxx: again reflect the size of your own snapshot or a number bigger than your snapshot. If you specify a number smaller than the your snapshot, register AMI will fail.&lt;code&gt;
ec2-register  --kernel aki-cb4d67bf --region xx-xxxx-x &#039;--description=Ubuntu 10 Lucid formatted with XFS&#039; --name=ubuntu-10.4-64-bit-ami-ab4d67df-xfs --architecture x86_64 --root-device-name /dev/sda1  -b /dev/sda1=snap-xxxxxxx:30:false --block-device-mapping /dev/sdb=ephemeral0:false --block-device-mapping /dev/sdc=ephemeral1:false
&lt;/code&gt;</description> <content:encoded><![CDATA[<p>Hi All,</p><p>Great tutorial. I used the pesky Ubuntu Lucid EBS ami-ab4d67df as a base in eu-west-1 region and had a few issues. The first was the dreaded ssh connection refused when the time came to launch and log into the new instance, even after explicitly adding the ephemeral storage as per comment in <strong>No. 25</strong>. The second, after figuring out that I stumbled by just copying the directions instead of checking where the ephemeral storage is in m1.large instance (they go to <code>/dev/sdb</code> and <code>/dev/sdc</code> &#8211; instead of <code>/dev/sda2</code> and <code>/dev/sda3</code> ) was when I stopped the new instant and restarted again, to be refused entry, again!</p><p>What finally worked for me is detailed below. As always YMMW.</p><p>Before rsynching to /vol (or even after, you need to rsynch again) edit the <strong>etc/fstab</strong> so that the ephemeral drives are correctly mounted and root is specified as xfs.</p><p>Example:<br
/> <code><br
/> # /etc/fstab: static file system information.<br
/> #<br
/> proc                                            /proc           proc    nodev,noexec,nosuid 0       0<br
/> /dev/sda1                                       /               xfs     defaults        0       0<br
/> /dev/sdb                                        /mnt            auto    defaults,comment=cloudconfig    0       0<br
/> /dev/sdc                                        /log            auto    defaults,comment=cloudconfig    0       0<br
/> </code></p><p>Then, change the <strong>ec2-register</strong> instructions so that the root device, /dev/sda1, has its DeleteOnTermination flag set to false. This should be automatic given its an EBS volume and also we are not terminating, but simply stopping and restarting, but for some reason it appears that without this flag explicitly set, weird things happen to /etc/fstab and the ephemeral storage devices, which in turn affect services such as ssh.</p><p>This is the command I used for the Lucid ami-ab4d67df . Replace the XXXXX with your unique information and change the size (30) immediately after the snap-xxxxxxx: again reflect the size of your own snapshot or a number bigger than your snapshot. If you specify a number smaller than the your snapshot, register AMI will fail.</p><p><code><br
/> ec2-register  --kernel aki-cb4d67bf --region xx-xxxx-x '--description=Ubuntu 10 Lucid formatted with XFS' --name=ubuntu-10.4-64-bit-ami-ab4d67df-xfs --architecture x86_64 --root-device-name /dev/sda1  -b /dev/sda1=snap-xxxxxxx:30:false --block-device-mapping /dev/sdb=ephemeral0:false --block-device-mapping /dev/sdc=ephemeral1:false<br
/> </code></p> ]]></content:encoded> </item> <item><title>By: Aruna Kulatunga</title><link>http://shlomoswidler.com/2010/01/creating-consistent-snapshots-of-live.html/comment-page-1#comment-331</link> <dc:creator>Aruna Kulatunga</dc:creator> <pubDate>Thu, 24 Jun 2010 15:44:10 +0000</pubDate> <guid
isPermaLink="false">http://orchestratus.com/shlomoswidler.com/?p=5#comment-331</guid> <description>A restart of the instance (not terminate - but stop and start ) breaks the above. It appears that etc/fstab is reset to its original values, so my changes to /dev/sda2 and /dev/sda3 does not persist in /etc/fstab. I am investigating more.  I think I might have to add the &lt;code&gt;DeleteOnTermination&lt;/code&gt; flag to &lt;code&gt;false&lt;/code&gt; for both the ephemeral storage devices. Will update once this is working</description> <content:encoded><![CDATA[<p>A restart of the instance (not terminate &#8211; but stop and start ) breaks the above. It appears that etc/fstab is reset to its original values, so my changes to /dev/sda2 and /dev/sda3 does not persist in /etc/fstab. I am investigating more.  I think I might have to add the <code>DeleteOnTermination</code> flag to <code>false</code> for both the ephemeral storage devices. Will update once this is working</p> ]]></content:encoded> </item> <item><title>By: Aruna Kulatunga</title><link>http://shlomoswidler.com/2010/01/creating-consistent-snapshots-of-live.html/comment-page-1#comment-330</link> <dc:creator>Aruna Kulatunga</dc:creator> <pubDate>Wed, 23 Jun 2010 22:21:51 +0000</pubDate> <guid
isPermaLink="false">http://orchestratus.com/shlomoswidler.com/?p=5#comment-330</guid> <description>Please disregard above. The issue was that I did not check the /etc/fstab to determine where the ephemeral storage should be mounted. It appears that on 64 bit ami´s its /dev/sdb mounted in /mnt, whereas I had specified /dev/sda2 and /dev/sda3. May I suggest that you also add some comment to to edit /etc/fstab and include the following two lines after editing out existing references to ephemeral storage.&lt;code&gt;/dev/sda2       /mnt    auto    defaults,comment=cloudconfig    0       0
/dev/sda3       /mnt    auto    defaults,comment=cloudconfig    0       0&lt;/code&gt;With this, the following works very well for EBS booted 64 bit Lucid image ami-ab4d67df.
Please substitute where I have XXXXX.&lt;code&gt;
ec2-register --snapshot snap-XXXXXXXX --kernel aki-cb4d67bf --region XXXXXX &#039;--description=Ubuntu 10 Lucid formatted with XFS&#039; --name=ubuntu-10.4-64-bit-ami-ab4d67df-xfs --architecture x86_64 --root-device-name /dev/sda1 --block-device-mapping /dev/sda2=ephemeral0 --block-device-mapping /dev/sda3=ephemeral1
&lt;/code&gt;Many thanks and much appreciated.</description> <content:encoded><![CDATA[<p>Please disregard above. The issue was that I did not check the /etc/fstab to determine where the ephemeral storage should be mounted. It appears that on 64 bit ami´s its /dev/sdb mounted in /mnt, whereas I had specified /dev/sda2 and /dev/sda3. May I suggest that you also add some comment to to edit /etc/fstab and include the following two lines after editing out existing references to ephemeral storage.</p><p><code></p><p>/dev/sda2       /mnt    auto    defaults,comment=cloudconfig    0       0<br
/> /dev/sda3       /mnt    auto    defaults,comment=cloudconfig    0       0</p><p></code></p><p>With this, the following works very well for EBS booted 64 bit Lucid image ami-ab4d67df.<br
/> Please substitute where I have XXXXX.</p><p><code><br
/> ec2-register --snapshot snap-XXXXXXXX --kernel aki-cb4d67bf --region XXXXXX '--description=Ubuntu 10 Lucid formatted with XFS' --name=ubuntu-10.4-64-bit-ami-ab4d67df-xfs --architecture x86_64 --root-device-name /dev/sda1 --block-device-mapping /dev/sda2=ephemeral0 --block-device-mapping /dev/sda3=ephemeral1<br
/> </code></p><p>Many thanks and much appreciated.</p> ]]></content:encoded> </item> <item><title>By: Aruna Kulatunga</title><link>http://shlomoswidler.com/2010/01/creating-consistent-snapshots-of-live.html/comment-page-1#comment-329</link> <dc:creator>Aruna Kulatunga</dc:creator> <pubDate>Wed, 23 Jun 2010 21:55:20 +0000</pubDate> <guid
isPermaLink="false">http://orchestratus.com/shlomoswidler.com/?p=5#comment-329</guid> <description>Hi Shlomo and Michael,Using the Lucid EBS boot ami-ab4d67df (the latest 64bit from Canonical) and copying Shlomo´s directions exactly, I still get the issue with ssh and connection is refused. As a second step, I added the extra block device sda3 as shown in Michael´s hint.This was my code to register the AMI&lt;code&gt;
ec2-register --snapshot snap-90b07bf9 --kernel aki-cb4d67bf --region eu-west-1 &#039;--description=Ubuntu 10 Lucid formatted with XFS&#039; --name=ubuntu-10.4-64-bit-ami-ab4d67df-xfs --architecture x86_64 --root-device-name /dev/sda1 --block-device-mapping /dev/sda2=ephemeral0 --block-device-mapping /dev/sda3=ephemeral1
&lt;/code&gt;Note that I had to add the region as well as my instances are in eu-west. There was no issue with the AMI (ami-43103a37 - its private, not sure how to make it public!).I attached an Elastic IP to the running instance and attempted to connect.Here is the output from my terminal:&lt;code&gt;
ssh -i /Users/aruna/mykeys/mysecurity ubuntu@79.xxx.xxx.xxx
ssh: connect to host 79.xxx.xxx.xxx port 22: Connection refused
&lt;/code&gt;Here is the final lines from the console&lt;code&gt;
[    1.523075] Filesystem &quot;sda1&quot;: Disabling barriers, trial barrier write failed
[    1.569026] XFS mounting filesystem sda1
[    1.845787] VFS: Mounted root (xfs filesystem) readonly on device 8:1.
[    1.846784] devtmpfs: mounted
[    1.846899] Freeing unused kernel memory: 228k freed
[    1.847008] Write protecting the kernel read-only data: 6416k
init: console-setup main process (81) terminated with status 1
%Ginit: plymouth main process (63) killed by SEGV signal
init: plymouth-splash main process (233) terminated with status 2
Generating locales...
en_GB.UTF-8... up-to-date
Generation complete.
mountall: Disconnected from Plymouth
&lt;/code&gt;These two lines indicate that its mounted on an xfs volume (Hurrah!) but is yet read-only
&lt;code&gt;
1.569026] XFS mounting filesystem sda1
1.845787] VFS: Mounted root (xfs filesystem) readonly on device 8:1.
&lt;/code&gt;I have refreshed the console a few times to see whether it would change status - no luck.  Also rebooted the instance - same status.
What am I doing wrong here...
Grateful for any leads!</description> <content:encoded><![CDATA[<p>Hi Shlomo and Michael,</p><p>Using the Lucid EBS boot ami-ab4d67df (the latest 64bit from Canonical) and copying Shlomo´s directions exactly, I still get the issue with ssh and connection is refused. As a second step, I added the extra block device sda3 as shown in Michael´s hint.</p><p>This was my code to register the AMI</p><p><code><br
/> ec2-register --snapshot snap-90b07bf9 --kernel aki-cb4d67bf --region eu-west-1 '--description=Ubuntu 10 Lucid formatted with XFS' --name=ubuntu-10.4-64-bit-ami-ab4d67df-xfs --architecture x86_64 --root-device-name /dev/sda1 --block-device-mapping /dev/sda2=ephemeral0 --block-device-mapping /dev/sda3=ephemeral1<br
/> </code></p><p>Note that I had to add the region as well as my instances are in eu-west. There was no issue with the AMI (ami-43103a37 &#8211; its private, not sure how to make it public!).</p><p>I attached an Elastic IP to the running instance and attempted to connect.</p><p>Here is the output from my terminal:</p><p><code><br
/> ssh -i /Users/aruna/mykeys/mysecurity <a
href="mailto:ubuntu@79.xxx.xxx.xxx">ubuntu@79.xxx.xxx.xxx</a><br
/> ssh: connect to host 79.xxx.xxx.xxx port 22: Connection refused<br
/> </code></p><p>Here is the final lines from the console</p><p><code><br
/> [    1.523075] Filesystem "sda1": Disabling barriers, trial barrier write failed<br
/> [    1.569026] XFS mounting filesystem sda1<br
/> [    1.845787] VFS: Mounted root (xfs filesystem) readonly on device 8:1.<br
/> [    1.846784] devtmpfs: mounted<br
/> [    1.846899] Freeing unused kernel memory: 228k freed<br
/> [    1.847008] Write protecting the kernel read-only data: 6416k<br
/> init: console-setup main process (81) terminated with status 1<br
/> %Ginit: plymouth main process (63) killed by SEGV signal<br
/> init: plymouth-splash main process (233) terminated with status 2<br
/> Generating locales...<br
/> en_GB.UTF-8... up-to-date<br
/> Generation complete.<br
/> mountall: Disconnected from Plymouth<br
/> </code></p><p>These two lines indicate that its mounted on an xfs volume (Hurrah!) but is yet read-only<br
/> <code><br
/> 1.569026] XFS mounting filesystem sda1<br
/> 1.845787] VFS: Mounted root (xfs filesystem) readonly on device 8:1.<br
/> </code></p><p>I have refreshed the console a few times to see whether it would change status &#8211; no luck.  Also rebooted the instance &#8211; same status.<br
/> What am I doing wrong here&#8230;<br
/> Grateful for any leads!</p> ]]></content:encoded> </item> <item><title>By: RichardSanDiego</title><link>http://shlomoswidler.com/2010/01/creating-consistent-snapshots-of-live.html/comment-page-1#comment-326</link> <dc:creator>RichardSanDiego</dc:creator> <pubDate>Mon, 21 Jun 2010 19:55:26 +0000</pubDate> <guid
isPermaLink="false">http://orchestratus.com/shlomoswidler.com/?p=5#comment-326</guid> <description>Thanks Shlomo for the great blog and MichaelGlass for figuring this out! i wanted to cross link to the amazon forum thread for those folks who might stumble across this blog entry and not realize the gem that&#039;s contained within it. the following thread linked to this blog
http://developer.amazonwebservices.com/connect/thread.jspa?messageID=183587</description> <content:encoded><![CDATA[<p>Thanks Shlomo for the great blog and MichaelGlass for figuring this out! i wanted to cross link to the amazon forum thread for those folks who might stumble across this blog entry and not realize the gem that&#8217;s contained within it. the following thread linked to this blog<br
/> <a
href="http://developer.amazonwebservices.com/connect/thread.jspa?messageID=183587" rel="nofollow">http://developer.amazonwebservices.com/connect/thread.jspa?messageID=183587</a></p> ]]></content:encoded> </item> <item><title>By: shlomo</title><link>http://shlomoswidler.com/2010/01/creating-consistent-snapshots-of-live.html/comment-page-1#comment-322</link> <dc:creator>shlomo</dc:creator> <pubDate>Sun, 20 Jun 2010 20:40:28 +0000</pubDate> <guid
isPermaLink="false">http://orchestratus.com/shlomoswidler.com/?p=5#comment-322</guid> <description>@Hellmut,Unfortunately I haven&#039;t put together all the scripts to make those techniques easy. I will, but I can&#039;t be sure when - unless I find a sponsor for the work.</description> <content:encoded><![CDATA[<p>@Hellmut,</p><p>Unfortunately I haven&#8217;t put together all the scripts to make those techniques easy. I will, but I can&#8217;t be sure when &#8211; unless I find a sponsor for the work.</p> ]]></content:encoded> </item> <item><title>By: Hellmut</title><link>http://shlomoswidler.com/2010/01/creating-consistent-snapshots-of-live.html/comment-page-1#comment-321</link> <dc:creator>Hellmut</dc:creator> <pubDate>Sun, 20 Jun 2010 18:30:28 +0000</pubDate> <guid
isPermaLink="false">http://orchestratus.com/shlomoswidler.com/?p=5#comment-321</guid> <description>Thanks for pointing me to those articles Shlomo that resolves the question I had :)
I have been reading your other posts, I was very interested in your post: How to Keep Your AWS Credentials on an EC2 Instance Securely back in August 2009 which was very comprehensive and educational for me, did you ever got to write a follow up article demonstrating the scripts to automate the procedures? I couldn&#039;t find it in your previous posts, so I was curious.  Thanks for all the great info!cheers,-H</description> <content:encoded><![CDATA[<p>Thanks for pointing me to those articles Shlomo that resolves the question I had <img
src='http://blogstatic.shlomoswidler.com.s3.amazonaws.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br
/> I have been reading your other posts, I was very interested in your post: How to Keep Your AWS Credentials on an EC2 Instance Securely back in August 2009 which was very comprehensive and educational for me, did you ever got to write a follow up article demonstrating the scripts to automate the procedures? I couldn&#8217;t find it in your previous posts, so I was curious.  Thanks for all the great info!</p><p>cheers,</p><p>-H</p> ]]></content:encoded> </item> <item><title>By: shlomo</title><link>http://shlomoswidler.com/2010/01/creating-consistent-snapshots-of-live.html/comment-page-1#comment-315</link> <dc:creator>shlomo</dc:creator> <pubDate>Sun, 20 Jun 2010 07:14:42 +0000</pubDate> <guid
isPermaLink="false">http://orchestratus.com/shlomoswidler.com/?p=5#comment-315</guid> <description>@Hellmut,Thanks for your encouraging words.The good Eric Hammond has you covered. Here&#039;s his article about &lt;a href=&quot;http://alestic.com/2009/12/ec2-ebs-boot-resize&quot; rel=&quot;nofollow&quot;&gt;resizing a root volume before the AMI is launched&lt;/a&gt;, and here&#039;s his article about &lt;a href=&quot;http://alestic.com/2010/02/ec2-resize-running-ebs-root&quot; rel=&quot;nofollow&quot;&gt;resizing the root volume of an already-running instance&lt;/a&gt;.</description> <content:encoded><![CDATA[<p>@Hellmut,</p><p>Thanks for your encouraging words.</p><p>The good Eric Hammond has you covered. Here&#8217;s his article about <a
href="http://alestic.com/2009/12/ec2-ebs-boot-resize" rel="nofollow">resizing a root volume before the AMI is launched</a>, and here&#8217;s his article about <a
href="http://alestic.com/2010/02/ec2-resize-running-ebs-root" rel="nofollow">resizing the root volume of an already-running instance</a>.</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (user agent is rejected)
Database Caching 9/27 queries in 0.007 seconds using disk
Content Delivery Network via Amazon Web Services: S3: blogstatic.shlomoswidler.com.s3.amazonaws.com

Served from: shlomoswidler.com @ 2010-09-07 19:52:58 -->