Um blog sobre nada

Um conjunto de inutilidades que podem vir a ser úteis

Archive for the ‘AWS’ Category

Resizing EBS Volumes on Unix EC2 Instances

Posted by Diego em Fevereiro 21, 2018

Simply resizing a volume on the AWS console (or using any other option to do so) is not enough to increase the space available.
What is shown on the console after the resize is complete, wont be inline with the output of df –h (and the actual space available).

In fact, even though the lsblk command will notice the newly added space, it is still not available as this is what you’d expect to see after issuing the command (in my case from 300Gb –> 500Gb)

image

To fix that, just run:

sudo growpart /dev/xvda 1

and the lsblk command confirms that the partition 1 fills the available space on the volume xvda.  Then run:

sudo resize2fs /dev/xvda1

to resize each file system to the new volume capacity. Now df –h should be outputting the expected value.

Anúncios

Posted in AWS | Leave a Comment »

Installing awscli on Cygwin

Posted by Diego em Junho 21, 2017

The normal way of installing the aws-cli is simply by running pip install awscli
However, If you do that from cygwin, it will install awscli in Window’s Anaconda Python installation, instead of in Cygwin’s Python (which is what we want). Then, when you run aws configure, you will get an error that the aws executable can’t be found. Like the one bellow (I have my python installed at c:\Anaconda2) :

 

can't open file '/cygdrive/c/Anaconda2/Scripts/aws': [Errno 2] No such file or directory

 

If I use the  which command to find out where python is installed, I can see it is looking at my windows installation:

 

 

 

The solution is to try the following from a cygwin shell:

wget rawgit.com/transcode-open/apt-cyg/master/apt-cyg
install apt-cyg /bin
apt-cyg install python
wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py

 

At this point you can verify that python is installed in cygwin

 and then run:

pip install awscli

 


Posted in AWS, I.T., Python | Leave a Comment »