[resize2fs] – Amazon AWS EBS Volume Size Mismatch


Storage !
Image by trodrigues via Flickr

Few days (a month) back I had faced a strange (amateur) problem in Linux with Amazon EBS volume. For some reason I had to increase the volume size say double the size of current volume attached to an instance.

As a normal (not an “advance” user of Linux) I did the following steps:

  • Dismounted the device (EBS Volume) by “umount /dev/sdf“.
  • Logged into AWS console and detached the attached volume from the instance.
  • Took a snapshot of that EBS volume.
  • Created another volume from above created snapshot with double the size of the current volume.
  • Attached the above newly created volume back to the instance.
  • SSH to the instance and mounted the volume (a handy – “mount /dev/sdf/mnt/ebs“).
  • Just curious (being a naive Linuxian), I tried to see the size of the volume by running “df -h”.
  • <<<<<<PANIC>>>>>>
  • It shows the size of the volume as the old one.
  • I confirmed it in the AWS console the size of the new EBS volume is double the size of the original.
  • What the HECK is happening???

Continue reading “[resize2fs] – Amazon AWS EBS Volume Size Mismatch”

Advertisements
[resize2fs] – Amazon AWS EBS Volume Size Mismatch

(My)SQL Joins – JOIN, CROSS, INNER, OUTER (LEFT, RIGHT, FULL)


The official logo of the database query MySQL
Image via Wikipedia

It’s been quite some-time since I wrote a blog – sorry guys didn’t get any time to write. But today I got a good one, a place where you find info about sqljoins in a simple/neat explanation.

Today I am going to talk about SQL Joins yes, there are quite a bit of types: Join, Inner JoinCross Join, Outer Join (OUTER Join further divides into Left Join, Right Join and Full Join). Continue reading “(My)SQL Joins – JOIN, CROSS, INNER, OUTER (LEFT, RIGHT, FULL)”

(My)SQL Joins – JOIN, CROSS, INNER, OUTER (LEFT, RIGHT, FULL)

ECHO or PRINT or ANYTHING – Can you tell me which is FASTER in PHP?


The PHP logo displaying the Handel Gothic font.
Image via Wikipedia

ECHO or PRINT which is faster? – You can see this kind of questions a lot in every PHP blog-space and most of the interview questions ;-). Most of us must be known the answer, Google it, you will ;-).

Yes you can say “ECHO” but how sure are you? We blindly believe on our experts, I agree I do a lot. But it feels something different when you see it on your naked eyes, don’t you? I do.

Recently while surfing (reading obviously) over the internet on various topics, I came across a nice tool which will exactly tell us WHO (language construct or pre-defined function) is GOOD in PHP.

Continue reading “ECHO or PRINT or ANYTHING – Can you tell me which is FASTER in PHP?”

ECHO or PRINT or ANYTHING – Can you tell me which is FASTER in PHP?

[TIPS] – How To Open a PORT NUMBER in IPTABLES – LINUX


An illustration of how a firewall works.
Image via Wikipedia

In my good old days with LINUX I struggle quite a bit to understand what is a port number & how it works, what is firewall & why the hell it is blocking, etc. You have to understand port number when you work with tomcat server (remember server.xml 🙂 – man it sucks), it works in 8080 but not in 8090 or you name it, it just doesn’t work at all :-).

Today I think I should publish this tip, because if you are asking me about IPTABLES I will say it is a nightmare :-), any small mistake you do with it’s conf file then you are gone. Continue reading “[TIPS] – How To Open a PORT NUMBER in IPTABLES – LINUX”

[TIPS] – How To Open a PORT NUMBER in IPTABLES – LINUX

[TIPS] – Upload BIG (very large) file in PHP using HTACCESS


 

Logo of the Apache Software Foundation
Image via Wikipedia

 

This blog should have been the first one, but somehow slipped through :-). In my early days of coding I found a nice tip to upload a large (really big) files to server with the help of .HTACCESS.

By default, PHP.INI configuration is configured to upload a max size of 2MB (security concern?), I know you can say it just mater of modifying the value in PHP.INI file and restart the server. Yes I agree, but you can do this when you own the server machine, think of a shared hosting server. Continue reading “[TIPS] – Upload BIG (very large) file in PHP using HTACCESS”

[TIPS] – Upload BIG (very large) file in PHP using HTACCESS

Amazon EBS VOLUME – Attach/Detach – Mount/UMount – device is busy [SOLUTION]


Unix filesystem
Image via Wikipedia

I always want to share some of the quick-tip like the one below.

Recently when I was working with Amazon Cloud for one of our client I faced a problem when umount (dismount) a volume (EBSElastic Block Storage) (OR) detaching from an EC2 instance. I could not dismount the volume, whenever I try to dismount, it throws “umount: … device is busy“. I was like not sure what is going on, why the device is not dismounting from the machine ???.

Dismounting a particular device forcefully, especially a storage volume can cause a serious damage you will end-up losing some important data. I was not sure what should I do, on the other end, the PRESSURE, I have to dismount the volume and re-create another machine.

Continue reading “Amazon EBS VOLUME – Attach/Detach – Mount/UMount – device is busy [SOLUTION]”

Amazon EBS VOLUME – Attach/Detach – Mount/UMount – device is busy [SOLUTION]

[TIPS] ECLIPSE – Associate an Editor to any File Type or File Extension


Eclipse (software)
Image via Wikipedia

Today one of my colleague asked me to write about (a lot) a tip on Eclipse on linking appropriate editor to a particular file extension. My colleague told me he had tried to find this solution in my blog but he couldn’t – I feel sorry for that.

From now on, I will be posting quite a few of tips which I come across in my day to day life.

Today I am going to write a tip on Eclipse‘ – associating a file with any extension to any editor.

Continue reading “[TIPS] ECLIPSE – Associate an Editor to any File Type or File Extension”

[TIPS] ECLIPSE – Associate an Editor to any File Type or File Extension