LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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, 02: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, 03:11 AM   #2
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

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, 03:12 AM   #3
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,133

Rep: Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273
you need to boot another OS, probably from pen drive or DVD.
 
Old 04-07-2014, 03: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, 04:42 AM   #5
Philip Lacroix
Member
 
Registered: Jun 2012
Distribution: Slackware{,-current}, OpenBSD
Posts: 361

Rep: Reputation: 377Reputation: 377Reputation: 377Reputation: 377
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 04:45 AM.
 
Old 04-08-2014, 08:06 AM   #6
JeremyBoden
Member
 
Registered: Nov 2011
Posts: 939

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


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