Posts

Showing posts from March, 2017
Image
Swap space are useful for systems having less memory (RAM). If your system facing problem of lack of memory continuously and you don’t want to increase memory on server, Then it can be helpful to enable swap in your system. Swap is comparatively much slower than physical memory but operating system uses swap space in case system goes out of memory. To know more about working of swap visit here. This article will help you to enable swap filesystem in your running instance. There are two methods to add swap in Amazon ec2 linux instances. This article has been tested with CentOS 6.5 only, but it can work on most of Linux distributions Method 1: By Creating File in Current File System This option is helpful if we don’t want to add extra disks in our systems, In this we simply create a file in our current file system and make it type swap, which can be used as swap in our system. Use following commands to create and enable swap on our system. # dd if=/dev/zero of=/var/myswap bs=1M ...

Resize Drive Problem in Centos6 on AWS EC2

To Resize the root partition in Centos 6 machine run the below mentioned Commands: 1. Install EPEL6 Repo ~]# wget http://download.fedoraproject. org/pub/epel/6/x86_64/epel-rel ease-6-8.noarch.rpm or ~]# wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm ~]# rpm -ivh epel-release-6-8.noarch.rpm 2. Install the dracut & cloud-utils growpart modules-growroot ~]# yum install -y dracut-modules-growroot cloud-utils-growpart or ~]# yum -y --quiet install dracut-modules-growroot ~]# dracut -v --force --add growroot /boot/initramfs-$(uname -r).img ~]# reboot 3. The initrd needs to be rebuilt after installing the dracut-modules-growroot. Create a backup copy of the current initramfs: ~]# cp -p /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).img.bak 4. Create the initramfs for the current kernel: ~]# dracut -f 5. Result after reboot ~]# reboot