LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-02-2014, 09:02 AM   #1
Linish
LQ Newbie
 
Registered: Jan 2012
Location: kerala,Thrissur
Posts: 1

Rep: Reputation: Disabled
Unhappy how to reduce the size of "/ "partition


hi,
i was looking to reduce the size of "/ " partition. Currently root partition (" / ") have 20GB. i have searched many sites no answer..

the partition which i want to resize is /dev/xvda1 pointed to "/ ".
its a live server . i'm remotely accessing it so i want to resize the partition as live.

Hope anyone will help me...
Thanks
Linish
 
Old 05-02-2014, 09:59 AM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,340

Rep: Reputation: Disabled
Before you can reduce the size of the partition, you'll have to shrink the file system on that partition.

Very few file systems support hot-resizing, especially when it comes to shrinking. Which file system do you use?
 
Old 05-02-2014, 10:27 AM   #3
mdooligan
Member
 
Registered: Feb 2009
Location: Vancouver BC
Distribution: Mandrake10/ArchHackery/Gentoo
Posts: 179

Rep: Reputation: 22
Farm out /usr, /var, /home, /opt, and /tmp to other partitions. It sounds like you have everything on one big partition.
Code:
[root@timberwolf miven]# df
Filesystem            Size  Used Avail Use% Mounted on
/dev/ide/host0/bus0/target0/lun0/part5
                      780M  263M  479M  36% /
/dev/ide/host0/bus0/target0/lun0/part9
                      5.4G  4.0G  1.4G  76% /home
/dev/ide/host0/bus0/target0/lun0/part10
                      981M   17M  915M   2% /tmp
/dev/ide/host0/bus0/target0/lun0/part7
                      3.9G  2.8G  894M  77% /usr
/dev/ide/host0/bus0/target0/lun0/part8
                      5.4G  4.4G  739M  86% /var
/dev/ide/host0/bus0/target0/lun0/part2
                       17G   13G  3.0G  82% /usr/local
/dev/scsi/host1/bus0/target0/lun0/part1
That's the 40G HD on my 2005 Acer laptop. The / partition is only 780M and I've never had an issue. The /usr/local partition used to be the WinXP primary, now converted to something useful.

Last edited by mdooligan; 05-02-2014 at 10:37 AM.
 
Old 05-05-2014, 09:18 PM   #4
wstewart90
Member
 
Registered: May 2013
Distribution: Arch Linux
Posts: 86

Rep: Reputation: Disabled
On most file systems such as ext3 and ext4, you can't shrink the root partition on-line. Ask your hosting provider to shrink the partition for you. The web hosting company I used to work for couldn't shrink a disk at all because their cloud platform was running on hyper-v and it was a limitation in the version of hyper-v that was being used.

Last edited by wstewart90; 05-05-2014 at 09:24 PM.
 
1 members found this post helpful.
Old 05-06-2014, 12:00 AM   #5
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
# du -h --max-depth=1 /

figure out what's hogging up space first. Certain things are expendable.

~/.mozilla
~/.java
~/.adobe

And probably a few other hogs. The /usr/share/doc/ can get quite girthy depending on distro. And various package updates that may still be lingering (/var/cache/apt/archives/) for the .deb files of debian updates. Failed edits to media can linger in /tmp. And other quirks.
 
Old 05-08-2014, 06:39 AM   #6
voleg
Member
 
Registered: Oct 2013
Distribution: RedHat CentOS Fedora SuSE
Posts: 354

Rep: Reputation: 51
Start rescue disk, do not mount OS.
reduce FS, then resize partition (probably gparted will work, but just remove and create smaller will work too).

MAKE BACKUP BEFORE !!!!

Another option: assign smaller disk, create new (smaller) FS on it and "rsync" content.
Then put old disk aside and use "new" one.
 
Old 05-08-2014, 11:41 AM   #7
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by mdooligan View Post
Farm out /usr, /var, /home, /opt, and /tmp to other partitions. It sounds like you have everything on one big partition.
Although I've been putting /usr on its own partition for years I've decided not to do so any more.
 
Old 05-08-2014, 11:48 AM   #8
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
Originally Posted by Shadow_7 View Post
figure out what's hogging up space first. Certain things are expendable.
e.g. this may remove unnecessary package data
Code:
yum clean all
http://www.linuxcommand.org/man_pages/yum8.html
 
  


Reply



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
What are the options "Nosuid" "mode" "size" in /etc/fstab? tuxfiles.org does not help pstein Linux - Newbie 1 11-16-2012 12:58 AM
How to set the font-size for "xterm" terminal-emulator (running "bash" shell) ajaygarg Linux - Desktop 1 03-09-2012 12:38 PM
Big size for "/" partition dYz SUSE / openSUSE 4 09-10-2007 08:06 PM
Need help changing size of "/" Partition wardialer Mandriva 1 04-22-2005 12:55 AM
The command "df -h" no show me the size of partition true! sandrobr Linux - Enterprise 7 01-03-2005 03:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:55 AM.

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
Open Source Consulting | Domain Registration