LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to extend root directory on size wise previously it was 15gb i want to increase (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-extend-root-directory-on-size-wise-previously-it-was-15gb-i-want-to-increase-4175500816/)

venkatesh51 04-07-2014 01:27 AM

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.

jdkaye 04-07-2014 02:11 AM

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

pan64 04-07-2014 02:12 AM

you need to boot another OS, probably from pen drive or DVD.

venkatesh51 04-07-2014 02:23 AM

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

Philip Lacroix 04-07-2014 03:42 AM

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. :)

JeremyBoden 04-08-2014 07:06 AM

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.


All times are GMT -5. The time now is 01:24 AM.