LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-15-2015, 11:48 PM   #1
unclesamcrazy
Member
 
Registered: May 2013
Posts: 189

Rep: Reputation: 1
Reduce root partition space on ec2 AWS


I have 64Gb root partition space on ec2 AWS. The instance is centOS 6.7.
Here is output of df -h
Code:
Filesystem      Size  Used Avail Use% Mounted on
/dev/xvda1      64G    12G  52G  19%  /
none            1.9G     0  1.9G   0% /dev/shm
Here is the output of lsblk
Code:
NAME    MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvda    202:0    0  64G  0 disk 
└─xvda1 202:1    0  64G  0 part /
I will never use this much space, I want to reduce it up to 30 GB.
Please help me to achieve this.

Note : I can not take help from AWS support
 
Old 12-16-2015, 02:31 AM   #2
Keruskerfuerst
Senior Member
 
Registered: Oct 2005
Distribution: SLES 12
Posts: 1,649

Rep: Reputation: 111Reputation: 111
1. Make a backup of the data contained of /(root)
2. Use Gparted: http://sourceforge.net/projects/gpar...d-live-stable/
 
Old 12-16-2015, 04:20 AM   #3
unclesamcrazy
Member
 
Registered: May 2013
Posts: 189

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by Keruskerfuerst View Post
1. Make a backup of the data contained of /(root)
where should I keep backup?
Quote:
Originally Posted by Keruskerfuerst View Post
I am not facing problem on my local system which can be solved by gparted, I am facing this on ec2 AWS
Can you please help to tell me, how can I use gparted on ec2-AWS?

Last edited by unclesamcrazy; 12-16-2015 at 06:24 AM.
 
Old 12-16-2015, 04:44 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,155

Rep: Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943
More than 100 views - they're all probably like me thinking "why can't s?he talk to AWS support ?".
Hmmm.

Cutting 30 Gig out ain't any use unless you can use it elsewhere. You gunna give us some info, or are you just going to accept you are likely not to get any (more) help ?.
What filesystem is that partition ?.
 
Old 12-16-2015, 05:34 AM   #5
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: Redhat/Centos, Ubuntu, Raspbian, Fedora
Posts: 1,689

Rep: Reputation: 353Reputation: 353Reputation: 353Reputation: 353
Quote:
Originally Posted by unclesamcrazy View Post
where should I keep backup?
I'd create a volume (or whatever that is called in AWS), attach it to the instance, perform the backup, recreate the instance, restore, delete the volume.

This is a cloud, no need to allocate LUNs on disk arrays, pull cables, set up iSCSI targets and the like. Easy!
 
Old 12-16-2015, 06:03 AM   #6
unclesamcrazy
Member
 
Registered: May 2013
Posts: 189

Original Poster
Rep: Reputation: 1
Thanks I have done this. I created a snapshot of 64GB volume > create volume of 30 Gb from this snap shot > stop instance > detach old volume > attach new volume > start instance.
But here is the problem, instance does not start with new created volume, connection time out issue.
Now I revert back to the old volume, it starts successfully.
 
Old 12-16-2015, 06:23 AM   #7
unclesamcrazy
Member
 
Registered: May 2013
Posts: 189

Original Poster
Rep: Reputation: 1
...
 
Old 12-16-2015, 09:46 AM   #8
Habitual
LQ Addict
 
Registered: Jan 2011
Posts: 7,798
Blog Entries: 11

Rep: Reputation: 2103Reputation: 2103Reputation: 2103Reputation: 2103Reputation: 2103Reputation: 2103Reputation: 2103Reputation: 2103Reputation: 2103Reputation: 2103Reputation: 2103
I think you need to create a new instance for the "30 Gb from this snap" volume and mount that as/at 30G / on the new instance.

Reference: http://serverfault.com/questions/565...e-ec2-instance
and as usual,
http://docs.aws.amazon.com/AWSEC2/la...ce-resize.html

Last edited by Habitual; 12-16-2015 at 09:53 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Cannot create AWS EC2 instance kb2tfa Linux - Networking 2 12-07-2015 02:43 PM
Slackware on AWS EC2 - New how to on SlackDocs denydias Slackware 5 01-27-2015 01:59 AM
sign the request query for aws ec2 api sudi267 Linux - Software 3 06-03-2013 01:05 PM
Amazon's AWS/EC2 CentOS instances cannot talk to each other ronbarak Linux - Networking 3 05-05-2013 04:27 AM
Canīt reduce the space on my Windows Partition fedivh Linux - General 2 05-16-2004 11:47 PM


All times are GMT -5. The time now is 09:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration