LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   need help resizing an ext3 partition with an underlying partition... (https://www.linuxquestions.org/questions/linux-software-2/need-help-resizing-an-ext3-partition-with-an-underlying-partition-211279/)

spiroth10 07-29-2004 09:59 PM

need help resizing an ext3 partition with an underlying partition...
 
this is a serious problem. I have redhat installed with the main partition having an underlying partition for swap space. problem is I ran totally out of space, and nothing is working properly now. I cant start up X or anything! I can make it smaller, but I cant make it any larger, and I have 2 gigs free on my hard drive.

please, how can I add this space to my partition? am I going to have to do a fresh install, because I dont want to lose everything. :(

thanks in advance.

shubb 07-30-2004 12:21 PM

Unless you use some partitioning software, you can't really resize an existing partition. You can, however, add the extra 2G as a new partition and mount it somewhere on your linux filesystem (presuming the space is unused, and not part of an existing partition).

I'm guessing you installed everything into one Linux partition under /, and that is the one that is full?

You'll need to boot from a Linux CD that will allow you to get to a command prompt. You can use a Local Area Security LiveCD to boot from if you need one (http://www.localareasecurity.com). Find which partitions are full with the command "df -h", and then within those partitions, find which directories might fit into the 2G partition with the command "du -h --max-depth=1". It will probably be a directory like /var or /usr that is taking up the most space. If any of those directories will fit into the extra partition space, then you can copy (or move) all the data from the main partition to the new partition. Then edit your /etc/fstab and tell it to mount the new partition into /var, or /usr, whichever you are doing.

DISCLAIMER: I have not done this myself, but it should work this way. Of course, make sure you back up your files in case something does happen during this process.

A second option, is while in the LiveCD, use the df and dh commands and see if you can delete enough files to make it bootable.


All times are GMT -5. The time now is 03:46 AM.