[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

[SOLUTION] – Linux – SSH Connection Refused due to non-existence of /dev/urandom


Amazon Web Services logo

Today one of our production machine (in Amazon EC2) was down and I couldn’t bring-up the instance due to unavailability of SSH in PORT 22, connection was refused and I had no clue what to do, after sometime I was able to bring-up the instance – (ok short and sweet).

Though I got it working after some work-around, I wanted to make sure what I did was correct, hence I asked experts in stackoverflow.com – got good advice/suggestion and I hope all set for a fix. BTW, the answer on the question also helped in learning a new stuff called auditd on the disk – a must have tool for system admin.

Okay, the reason why I wanted to pin-down this blog is to show what I did to fix /dev/urandom and how did I get the server up and running. Let me go straight to there.

HOW!!!?

Continue reading “[SOLUTION] – Linux – SSH Connection Refused due to non-existence of /dev/urandom”

[SOLUTION] – Linux – SSH Connection Refused due to non-existence of /dev/urandom

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]