<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>服务器安全维护工作室 &#187; AWS EBS</title>
	<atom:link href="https://www.fuwuqiok.com/tag/aws-ebs/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.fuwuqiok.com</link>
	<description></description>
	<lastBuildDate>Sun, 01 Mar 2020 07:28:40 +0000</lastBuildDate>
	<language>zh-CN</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.2.26</generator>
	<item>
		<title>AWS EBS创建快照和通过快照复旧的方法</title>
		<link>https://www.fuwuqiok.com/aws-ebs%e5%88%9b%e5%bb%ba%e5%bf%ab%e7%85%a7%e5%92%8c%e9%80%9a%e8%bf%87%e5%bf%ab%e7%85%a7%e5%a4%8d%e6%97%a7%e7%9a%84%e6%96%b9%e6%b3%95/</link>
		<comments>https://www.fuwuqiok.com/aws-ebs%e5%88%9b%e5%bb%ba%e5%bf%ab%e7%85%a7%e5%92%8c%e9%80%9a%e8%bf%87%e5%bf%ab%e7%85%a7%e5%a4%8d%e6%97%a7%e7%9a%84%e6%96%b9%e6%b3%95/#comments</comments>
		<pubDate>Sat, 01 Aug 2015 00:55:33 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[Amazon AWS]]></category>
		<category><![CDATA[服务器迁移]]></category>
		<category><![CDATA[AWS EBS]]></category>
		<category><![CDATA[AWS EBS创建快照和通过快照复旧的方法]]></category>
		<category><![CDATA[aws服务器代维]]></category>
		<category><![CDATA[服务器基础环境搭建]]></category>

		<guid isPermaLink="false">https://www.fuwuqiok.com/?p=2357</guid>
		<description><![CDATA[<p>WS EC2实例，是使用Elastic Block Store（EBS）作为存储的，必要时可以通过EBS快照， [&#8230;]</p>
<p><a rel="nofollow" href="https://www.fuwuqiok.com/aws-ebs%e5%88%9b%e5%bb%ba%e5%bf%ab%e7%85%a7%e5%92%8c%e9%80%9a%e8%bf%87%e5%bf%ab%e7%85%a7%e5%a4%8d%e6%97%a7%e7%9a%84%e6%96%b9%e6%b3%95/">AWS EBS创建快照和通过快照复旧的方法</a>，首发于<a rel="nofollow" href="https://www.fuwuqiok.com">服务器安全维护工作室</a>。</p>
]]></description>
				<content:encoded><![CDATA[<p>WS EC2实例，是使用Elastic Block Store（EBS）作为存储的，必要时可以通过EBS快照，进行数据的恢复。创建EBS快照和通过快照复旧的方法如下。</p>
<h2>1. 创建快照（Snapshot）</h2>
<p>创建快照的话，从EBS的「Volumes」或EBS的「Snapshots」画面进行操作。本文主要介绍通过EBS的「Volumes」画面来创建快照。</p>
<p>选择创建快照的Volume（本文Volume ID为vol-acc03d89），点击右键，选择「Create Snapshot」。</p>
<p><a href="https://www.fuwuqiok.com/wp-content/uploads/2015/08/Create-Snapshot.png"><img class="attachment-medium" src="https://www.fuwuqiok.com/wp-content/uploads/2015/08/Create-Snapshot.png" alt="Create-Snapshot" width="530" height="232" /></a></p>
<p>「Name」填写为容易区别的快照名。然后点击「Yes,Create」创建快照。</p>
<h2>2.通过创建的快照，进行EBS复旧。</h2>
<p>通过快照恢复数据时，要按照一下步骤进行：</p>
<ol>
<li>利用之前创建的快照作成EBS卷</li>
<li>停止EC2实例</li>
<li>分离连接到EC2实例的卷</li>
<li>把作成的卷连接到EC2实例</li>
<li>起动EC2实例</li>
</ol>
<p><strong>2.1利用之前创建的快照作成EBS 卷。</strong></p>
<p>从EBS的「Snapshots」画面选择该快照，点击右键，选择「Create Volume from Snapshot」</p>
<p><a href="https://www.fuwuqiok.com/wp-content/uploads/2015/08/Create-Volume.png"><img class="attachment-medium" src="https://www.fuwuqiok.com/wp-content/uploads/2015/08/Create-Volume.png" alt="Create-Volume" width="521" height="310" /></a></p>
<p>创建与EC2实例相同可用区域 (AZ)的Volume。</p>
<p>确认Volumes画面，可利用的（available）卷被创建成功。</p>
<p><a href="https://www.fuwuqiok.com/wp-content/uploads/2015/08/Volumes.png"><img class="attachment-medium" src="https://www.fuwuqiok.com/wp-content/uploads/2015/08/Volumes.png" alt="Volumes" width="524" height="78" /></a></p>
<p><strong>2.2停止EC2实例。</strong></p>
<p>下面为了更换Volume，需要停止EC2实例。</p>
<p><a href="https://www.fuwuqiok.com/wp-content/uploads/2015/08/EC2-Instance-.png"><img class="attachment-medium" src="https://www.fuwuqiok.com/wp-content/uploads/2015/08/EC2-Instance-.png" alt="EC2-Instance-" width="523" height="76" /></a></p>
<p>但是，使用竞价型实例的话，实例是不能停止的（参考竞价型实例特性的话就能明白）<br />
<strong> 2.3分离连接到EC2实例的卷。</strong><br />
分离与已停止的实例连接的卷。</p>
<p>通过Volumes画面，选择连接的卷，点击右键，选择「Detach Volume」。</p>
<p>如下，点击「Yes, Detach」。</p>
<p><a href="https://www.fuwuqiok.com/wp-content/uploads/2015/08/Detach-Volume.png"><img class="attachment-medium" src="https://www.fuwuqiok.com/wp-content/uploads/2015/08/Detach-Volume.png" alt="Detach-Volume" width="526" height="181" /></a></p>
<p>这样，连接EC2实例的Volume就分开了。</p>
<p><strong>2.4把作成的Volume连接到EC2实例。</strong></p>
<p>然后，把刚才通过快照作成的卷连接到EC2实例。</p>
<p>从Volume画面，选择该Volume点击右键，选择「Attach Volume」，如下：</p>
<p><a href="https://www.fuwuqiok.com/wp-content/uploads/2015/08/Attach-Volume.png"><img class="attachment-medium" src="https://www.fuwuqiok.com/wp-content/uploads/2015/08/Attach-Volume.png" alt="Attach-Volume" width="521" height="269" /></a></p>
<p>从「Instances」选择停止的该EC2实例。</p>
<p>「Device」输入指定的Linux启动硬盘「/dev/sda1」。</p>
<p>点击「Yes, Attach」，卷立即就被连接上了。</p>
<p><a href="https://www.fuwuqiok.com/wp-content/uploads/2015/08/Attach-Instance.png"><img class="attachment-medium" src="https://www.fuwuqiok.com/wp-content/uploads/2015/08/Attach-Instance.png" alt="Attach-Instance" width="525" height="75" /></a></p>
<p><strong>2.5起动EC2实例。</strong></p>
<p>最后，启动EC2的话，连接EBS卷的EC2实例也就正常启动了。</p>
<p><a rel="nofollow" href="https://www.fuwuqiok.com/aws-ebs%e5%88%9b%e5%bb%ba%e5%bf%ab%e7%85%a7%e5%92%8c%e9%80%9a%e8%bf%87%e5%bf%ab%e7%85%a7%e5%a4%8d%e6%97%a7%e7%9a%84%e6%96%b9%e6%b3%95/">AWS EBS创建快照和通过快照复旧的方法</a>，首发于<a rel="nofollow" href="https://www.fuwuqiok.com">服务器安全维护工作室</a>。</p>
]]></content:encoded>
			<wfw:commentRss>https://www.fuwuqiok.com/aws-ebs%e5%88%9b%e5%bb%ba%e5%bf%ab%e7%85%a7%e5%92%8c%e9%80%9a%e8%bf%87%e5%bf%ab%e7%85%a7%e5%a4%8d%e6%97%a7%e7%9a%84%e6%96%b9%e6%b3%95/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOS下挂载EBS</title>
		<link>https://www.fuwuqiok.com/centos%e4%b8%8b%e6%8c%82%e8%bd%bdebs/</link>
		<comments>https://www.fuwuqiok.com/centos%e4%b8%8b%e6%8c%82%e8%bd%bdebs/#comments</comments>
		<pubDate>Sat, 01 Aug 2015 00:45:51 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[aliyun服务器代维]]></category>
		<category><![CDATA[Amazon AWS]]></category>
		<category><![CDATA[服务器迁移]]></category>
		<category><![CDATA[系统安全代维]]></category>
		<category><![CDATA[网站代维]]></category>
		<category><![CDATA[网站防挂马]]></category>
		<category><![CDATA[AWS EBS]]></category>
		<category><![CDATA[aws服务器代维]]></category>
		<category><![CDATA[CentOS下挂载EBS]]></category>
		<category><![CDATA[小说站代维]]></category>
		<category><![CDATA[挂载EBS]]></category>
		<category><![CDATA[服务器基础环境搭建]]></category>

		<guid isPermaLink="false">https://www.fuwuqiok.com/?p=2344</guid>
		<description><![CDATA[<p>EBS(Elastic Block Store)是Amazon EC2实例的持久性数据块级存储卷。 在简单介绍 [&#8230;]</p>
<p><a rel="nofollow" href="https://www.fuwuqiok.com/centos%e4%b8%8b%e6%8c%82%e8%bd%bdebs/">CentOS下挂载EBS</a>，首发于<a rel="nofollow" href="https://www.fuwuqiok.com">服务器安全维护工作室</a>。</p>
]]></description>
				<content:encoded><![CDATA[<p>EBS(Elastic Block Store)是Amazon EC2实例的持久性数据块级存储卷。</p>
<p>在简单介绍一下，购买EBS以后如何挂载到EC2。</p>
<p>环境：CentOS6.5</p>
<p>EBS：300GB</p>
<h2>CentOS6.5下挂载EBS</h2>
<h3>1. 先用fdisk命令查看Device名。</h3>
<pre># fdisk -l

Disk /dev/xvdg: 40.3 GB, 40256929792 bytes
255 heads, 63 sectors/track, 4894 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/xvde: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/xvdf: 322.1 GB, 322122547200 bytes
255 heads, 63 sectors/track, 39162 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
</pre>
<p>根据容量判断，/dev/xvdf是购买的EBS。</p>
<h3>2. 创建ext4文件系统</h3>
<pre># mkfs -t ext4 /dev/xvdf</pre>
<h3>3. 创建目录及挂载</h3>
<div class="custom"><code># mkdir /data<br />
# mount /dev/xvdf /data</code></div>
<h3>4. 确认</h3>
<pre># df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/xvde       7.9G  650M  6.9G   9% /
tmpfs           7.4G     0  7.4G   0% /dev/shm
/dev/xvdf       296G  191M  281G   1% /data
</pre>
<h3>5. 修改/etc/fstab</h3>
<p>在/etc/fstab文件的最后进行添加。</p>
<pre># vi /etc/fstab
/dev/xvdf  /data     ext4    defaults         0 0
</pre>
<h3>6. 重启系统进行确认</h3>
<pre># shutdown -r now
# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/xvde       7.9G  651M  6.9G   9% /
tmpfs           7.4G     0  7.4G   0% /dev/shm
/dev/xvdf       296G  191M  281G   1% /data
</pre>
<p><a rel="nofollow" href="https://www.fuwuqiok.com/centos%e4%b8%8b%e6%8c%82%e8%bd%bdebs/">CentOS下挂载EBS</a>，首发于<a rel="nofollow" href="https://www.fuwuqiok.com">服务器安全维护工作室</a>。</p>
]]></content:encoded>
			<wfw:commentRss>https://www.fuwuqiok.com/centos%e4%b8%8b%e6%8c%82%e8%bd%bdebs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>创建Amazon EBS卷（给实例追加EBS卷）</title>
		<link>https://www.fuwuqiok.com/%e5%88%9b%e5%bb%baamazon-ebs%e5%8d%b7%ef%bc%88%e7%bb%99%e5%ae%9e%e4%be%8b%e8%bf%bd%e5%8a%a0ebs%e5%8d%b7%ef%bc%89/</link>
		<comments>https://www.fuwuqiok.com/%e5%88%9b%e5%bb%baamazon-ebs%e5%8d%b7%ef%bc%88%e7%bb%99%e5%ae%9e%e4%be%8b%e8%bf%bd%e5%8a%a0ebs%e5%8d%b7%ef%bc%89/#comments</comments>
		<pubDate>Fri, 31 Jul 2015 13:18:42 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
				<category><![CDATA[AWS EBS]]></category>
		<category><![CDATA[aws服务器代维]]></category>
		<category><![CDATA[EBS Volumes]]></category>
		<category><![CDATA[EC2 EBS]]></category>
		<category><![CDATA[创建Amazon EBS卷（给实例追加EBS卷）]]></category>

		<guid isPermaLink="false">https://www.fuwuqiok.com/?p=2215</guid>
		<description><![CDATA[<p>创建EBS卷，连接到EC2实例，有两种方法。本文旨在说明，给已知的EC2实例追加(Elastic Block  [&#8230;]</p>
<p><a rel="nofollow" href="https://www.fuwuqiok.com/%e5%88%9b%e5%bb%baamazon-ebs%e5%8d%b7%ef%bc%88%e7%bb%99%e5%ae%9e%e4%be%8b%e8%bf%bd%e5%8a%a0ebs%e5%8d%b7%ef%bc%89/">创建Amazon EBS卷（给实例追加EBS卷）</a>，首发于<a rel="nofollow" href="https://www.fuwuqiok.com">服务器安全维护工作室</a>。</p>
]]></description>
				<content:encoded><![CDATA[<p>创建EBS卷，连接到EC2实例，有两种方法。本文旨在说明，给已知的EC2实例追加(Elastic Block Store)卷。 新建EC2实例时EBS添加方法，请参考本博客文章「创建Amazon EBS卷(创建新的实例)」 作业概要图： <a href="https://www.fuwuqiok.com/wp-content/uploads/2015/07/EBS-Volumes.png"><img class="attachment-medium" src="https://www.fuwuqiok.com/wp-content/uploads/2015/07/EBS-Volumes.png" alt="EBS-Volumes" width="550" height="184" /></a></p>
<h2>1.创建EBS卷</h2>
<p><strong>已知的EC2实例，链接EBS的话，按照一下方法。</strong></p>
<h4>1-1.首先，从EC2管理页面左侧的菜单栏打开「Volumes」,点击「Create Volumes」输入必要的项目。</h4>
<p>・「Size」是选定硬盘的大小。（下图为10G）<br />
・「Availablity Zone」是创建卷时，指定的区域<br />
・「Snapshot」是Volume创建时，可以参照的快照。以后EBS卷容量大小变更时也可以使用，现在选择「No Snapshot」</p>
<h4>1-2.然后，卷创建完成。</h4>
<p><a href="https://www.fuwuqiok.com/wp-content/uploads/2015/07/Volumes.png"><img class="attachment-medium" src="https://www.fuwuqiok.com/wp-content/uploads/2015/07/Volumes.png" alt="Volumes" width="1070" height="683" /></a></p>
<h4>1-3.但是，这个状态还没有连接到EC2实例上，点击「Actions」,选择「Attach Volume」，输入相关项目。</h4>
<p>・「Instances」是选择链接实例的对象<br />
・「Device」是指定设备名。这里指定为/dev/sdf <a href="https://www.fuwuqiok.com/wp-content/uploads/2015/07/Attach-Volumes.png"><img class="attachment-medium" src="https://www.fuwuqiok.com/wp-content/uploads/2015/07/Attach-Volumes.png" alt="Attach-Volumes" width="1071" height="715" /></a></p>
<h4>1-4.这样卷的「State」变为in-use。是与实例连接的状态。</h4>
<p><a href="https://www.fuwuqiok.com/wp-content/uploads/2015/07/Volumes-State.png"><img class="attachment-medium" src="https://www.fuwuqiok.com/wp-content/uploads/2015/07/Volumes-State.png" alt="Volumes-State" width="597" height="462" /></a></p>
<h2>2.EBS卷的挂载</h2>
<p><strong>接着，从EC2实例，把EBS卷挂载上。（一般情况下和硬盘挂载方法一样）</strong></p>
<h4>2-1.首先登陆实例，按照以下方法，确认创建的卷(/dev/sdf)没有被挂载。</h4>
<pre># df -h
Filesystem Size Used Avail Use% Mounted on
/dev/xvda1 7.9G 836M 7.0G 11% /
tmpfs 298M 0 298M 0% /dev/shm</pre>
<h3>2-2.按照以下步骤，把卷格式化，再进行挂载。现在做成的卷，被作为/data2挂载了。</h3>
<pre># mkfs -t ext3 /dev/sdf
# mkdir /data2
# mount /dev/sdf /data2
# exit</pre>
<h4>2-3.执行以下命令，确认10GB的卷被挂载在/data下。</h4>
<pre># df -h
Filesystem Size Used Avail Use% Mounted on
/dev/xvda1 7.9G 836M 7.0G 11% /
tmpfs 298M 0 298M 0% /dev/shm
/dev/xvdf 9.9G 151M 9.2G 2% /data2</pre>
<p><strong>另外，/dev/sdf设备就是以上/dev/xvdf,这是在新的Linux在使用AWS上的表示。</strong></p>
<h4>2-4.如下，用ls命令确认，在内部已经被连接了。</h4>
<pre># ll /dev/s*
lrwxrwxrwx 1 root root 5 12月 30 09:01 2012 /dev/sda1 -&gt; xvda1
lrwxrwxrwx 1 root root 4 12月 30 09:01 2012 /dev/sdf -&gt; xvdf
crw------- 1 root root 10, 231 12月 30 09:01 2012 /dev/snapshot
lrwxrwxrwx 1 root root 15 12月 30 09:01 2012 /dev/stderr -&gt; /proc/self/fd/2
lrwxrwxrwx 1 root root 15 12月 30 09:01 2012 /dev/stdin -&gt; /proc/self/fd/0
lrwxrwxrwx 1 root root 15 12月 30 09:01 2012 /dev/stdout -&gt; /proc/self/fd/1</pre>
<p><strong>如上，挂载完成，最后给卷进行写入测试。</strong></p>
<pre># mkdir -p /data2/test/dir/to/file/
# echo "this is test2" &gt; /data2/test/dir/to/file/testdata.txt
# cd /data2/test/dir/to/file/
# cat testdata.txt
this is test2</pre>
<p><a rel="nofollow" href="https://www.fuwuqiok.com/%e5%88%9b%e5%bb%baamazon-ebs%e5%8d%b7%ef%bc%88%e7%bb%99%e5%ae%9e%e4%be%8b%e8%bf%bd%e5%8a%a0ebs%e5%8d%b7%ef%bc%89/">创建Amazon EBS卷（给实例追加EBS卷）</a>，首发于<a rel="nofollow" href="https://www.fuwuqiok.com">服务器安全维护工作室</a>。</p>
]]></content:encoded>
			<wfw:commentRss>https://www.fuwuqiok.com/%e5%88%9b%e5%bb%baamazon-ebs%e5%8d%b7%ef%bc%88%e7%bb%99%e5%ae%9e%e4%be%8b%e8%bf%bd%e5%8a%a0ebs%e5%8d%b7%ef%bc%89/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
