Amazon Elastic Block Store Operations: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
=Internal=
=Internal=


* [[Amazon Elastic Block Storage#Subjects|Amazon Elastic Block Storage]]
* [[Amazon Elastic Block Store#Subjects|Amazon Elastic Block Store]]


=Operations=
=Operations=
==Create an ESB Volume==
aws ec2 create-volume --availability-zone=eu-west-1a --size=10 --volume-type=gp2


==Making an EBS Volume Available for Use==
==Making an EBS Volume Available for Use==
Line 10: Line 14:
:http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-using-volumes.html<br>
:http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-using-volumes.html<br>
</blockquote>
</blockquote>


I need to do that to use the storage and not fill up the root partition.
I need to do that to use the storage and not fill up the root partition.
Line 16: Line 19:
Code to apply the procedure automatically is available in [[em]].
Code to apply the procedure automatically is available in [[em]].


==Attaching an ESB  Volume==


<blockquote style="background-color: AliceBlue; border: solid thin LightSteelBlue;">
:http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-attaching-volume.html<br>
</blockquote>


!!!Attaching an ESB  Volume
==Extending a Volume==


|[http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-attaching-volume.html]
<blockquote style="background-color: AliceBlue; border: solid thin LightSteelBlue;">
:http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html<br>
</blockquote>


!!!Extending a Volume
==Expanding a Linux Partition==


|[http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html]
<blockquote style="background-color: AliceBlue; border: solid thin LightSteelBlue;">
 
:http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/storage_expand_partition.html<br>
!!!Expanding a Linux Partition
</blockquote>
 
|[http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/storage_expand_partition.html]


!!!Organizatorium
=Organizatorium=


Even if the dedicated disk has 800GB, the default partitions are undersized. I need to understand this better, but this is what I did:
Even if the dedicated disk has 800GB, the default partitions are undersized. I need to understand this better, but this is what I did:


 
<pre>
{{{
lsblk
lsblk
NAME    MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
NAME    MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
Line 41: Line 47:
├─xvda1 202:1    0    1M  0 part  
├─xvda1 202:1    0    1M  0 part  
├─xvda2 202:2    0    6G  0 part /
├─xvda2 202:2    0    6G  0 part /
}}}
</pre>


There's a lot of space (790+GB) that is not allocated to any partition.
There's a lot of space (790+GB) that is not allocated to any partition.


 
<pre>
{{{
gdisk /dev/xvda
gdisk /dev/xvda


Line 56: Line 61:


First sector .. etc
First sector .. etc
 
</pre>
}}}


Allocate all, then 'w' and then ''reboot'' - otherwise /dev/xvda3 won't be visible.
Allocate all, then 'w' and then ''reboot'' - otherwise /dev/xvda3 won't be visible.
__Referenced by:__\\
[{INSERT com.ecyrd.jspwiki.plugin.ReferringPagesPlugin WHERE max=20, maxwidth=50}]

Latest revision as of 22:46, 11 December 2019

Internal

Operations

Create an ESB Volume

aws ec2 create-volume --availability-zone=eu-west-1a --size=10 --volume-type=gp2

Making an EBS Volume Available for Use

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-using-volumes.html

I need to do that to use the storage and not fill up the root partition.

Code to apply the procedure automatically is available in em.

Attaching an ESB Volume

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-attaching-volume.html

Extending a Volume

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html

Expanding a Linux Partition

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/storage_expand_partition.html

Organizatorium

Even if the dedicated disk has 800GB, the default partitions are undersized. I need to understand this better, but this is what I did:

lsblk
NAME    MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
xvda    202:0    0  800G  0 disk 
├─xvda1 202:1    0    1M  0 part 
├─xvda2 202:2    0    6G  0 part /

There's a lot of space (790+GB) that is not allocated to any partition.

gdisk /dev/xvda

p (print partions)

n (create new partion)

Partition Number: 3

First sector .. etc

Allocate all, then 'w' and then reboot - otherwise /dev/xvda3 won't be visible.