LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 04-07-2014, 01:27 AM   #1
venkatesh51
LQ Newbie
 
Registered: Oct 2012
Posts: 26

Rep: Reputation: Disabled
How to extend root directory on size wise previously it was 15gb i want to increase


How to extend root directory on size wise previously it was 15gb i want to increase 20GB
IS it possible to increase but how?
I listened we can increase by using lvm
But we need to make root as offline mode
when i am trying it to offline
it showing root is busy it cannot unmount.
 
Old 04-07-2014, 02:11 AM   #2
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
Taken from a previous LQ thread:
Quote:
I figured it all out! I used this document to figure out how to resize ext3 partitions:

http://www.howtoforge.com/linux_resi...xt3_partitions

Highly encouraged reading!
You fail to mention what file system you're using but either the above solution or using parted should work. Check the documentation.
jdk
 
Old 04-07-2014, 02:12 AM   #3
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,837

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
you need to boot another OS, probably from pen drive or DVD.
 
Old 04-07-2014, 02:23 AM   #4
venkatesh51
LQ Newbie
 
Registered: Oct 2012
Posts: 26

Original Poster
Rep: Reputation: Disabled
aken from a previous LQ thread:
Quote:
I figured it all out! I used this document to figure out how to resize ext3 partitions:

http://www.howtoforge.com/linux_resi...xt3_partitions

Highly encouraged reading!
You fail to mention what file system you're using but either the above solution or using parted should work. Check the documentation.
jdk
__________________
THe link is not working
I am using Ext2 and Ext3 file systesm
 
Old 04-07-2014, 03:42 AM   #5
Philip Lacroix
Member
 
Registered: Jun 2012
Distribution: Slackware
Posts: 441

Rep: Reputation: 574Reputation: 574Reputation: 574Reputation: 574Reputation: 574Reputation: 574
Hi. I usually do this:

0) *Backup all data* on the computer (not just on the partition you want to resize).
1) Run fdisk -l > ~/partitions.bak to backup the actual configuration. Print or store the file "partitions.bak" in a safe place.
2) Make sure that you have enough free space *after* the partition you want to resize (the resized partition *must* start from the *same sector*).
3) Reboot the computer from a live CD instead of the HD. SystemRescueCD is an excellent tool, but another live medium based on GNU/Linux will do.
4) Once booted, run e2fsck -f /dev/<partition> (for example "sda2").
5) If all is well with e2fsck, then open fdisk with fdisk /dev/<disk> (for example "sda").
6) Write down the start sector of the partition that must be resized.
7) Delete that partition (this will *not* delete your data). Create the partition again, starting from the *original* start sector! When asked for the end sector, you can type the partition's new size, like "20G" as in your case.
9) Save and exit from fdisk.
10) Run e2fsck -f /dev/<partition> again.
11) If all is well with e2fsck, run resize2fs <partition>. This will expand the filesystem to match the new partition's size.
12) Done.

If the start sector cannot be the same, i.e. you have to resize the partition "backwards", then you cannot use resize2fs: you will have to delete the partition, create a new one AND create a new filesystem with mkfs. Then restore your data. I assume that you are familar with the command line, fdisk, backups, and booting from live media. If you are not, then I would suggest that you read the relevant documentation and try the suggestions above on a test system, just in case something goes wrong.

Last edited by Philip Lacroix; 04-07-2014 at 03:45 AM.
 
Old 04-08-2014, 07:06 AM   #6
JeremyBoden
Senior Member
 
Registered: Nov 2011
Location: London, UK
Distribution: Debian
Posts: 1,947

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
gparted does all the file system checks for you.
It can even move the start and end positions of filesystems (in place) - but at a hugely sluggishly pace.
Can literally take several hours to run.
But no data restores are necessary.

Generally, if you want to increase one partion, you'll need to decrease another.

You would still need to boot from a live disk, though.

Last edited by JeremyBoden; 04-08-2014 at 07:08 AM.
 
  


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
How to increase size of my root directory (/) bashprog Linux - Software 7 10-28-2010 03:16 AM
how to increase /home directory size vin08rag Linux - Newbie 7 03-02-2010 03:19 AM
How can I increase size of /tmp directory smartgupta Solaris / OpenSolaris 4 11-10-2009 03:25 AM
Extend The Size of /root mmehta Linux - Newbie 2 09-20-2007 05:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:51 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