# Running out of disk space!  Please help!

## twitch_boy

I spent alot of time installing and seting up my system just the way I want it.  However, I was stupid and only gave myself 1.5 gig for the root directory, and I have a 40 gig hard drive  :Sad:  anyway long story short, I have no space left to install any more programs.  I would appreciate it if anyone could help me with resizing/cleaning up my root partition, I don't want to have to re-install again.  Thanks.

----------

## lk42pro

maybe partition magic pro 7.0 for windows can help?

----------

## twitch_boy

I have an old partition magic bootdisk (version 4 I believe)  I tried and it won't let me resize any of my partitions.  Do you know if a newer version (I do have access to version 7.0) would work any different?  Thanks.

----------

## klieber

 *twitch_boy wrote:*   

>  Do you know if a newer version (I do have access to version 7.0) would work any different?  Thanks.

 

Yes -- I was able to re-partition my hard drive just fine.  However, if you have extra (unpartitioned) disk space now, you can just create a new partition, copy all your root files over there and update fstab and grub to tell them where the new / should be.  (for that matter, you can buy a whole new hard drive and make that your / directory)

--kurt

----------

## twitch_boy

Thanks klieber, making a new partition and copying over the / files sounds like a good idea... however I am not exactly sure how i should go about the actual copying.  can I just cp * the files to my new partition?

----------

## klieber

 *twitch_boy wrote:*   

> can I just cp * the files to my new partition?

 

Use cp -ax.  The -ax tells linux to preserve file attributes.  There's a good article on IBM's site that discusses moving /home -- the same can be applied to moving / or any other partition.

http://www-106.ibm.com/developerworks/library/partplan.html

EDITED:  The IBM doc recommends dropping into single user mode (INIT 1) before copying files.  This is to prevent other folks from connecting to the machine over the network and modifying files on /home while you're doing the copy.  You can safely ignore this step if you're the only one that uses the system.

Also, I'm assuming you've got your boot partition as a separate partition -- otherwise, this might not work.

--kurt

----------

## twitch_boy

Hi Klieber,

I'm trying to follow the instructions from the IBM page that you posted, but I run into a problem when dropping into single user mode... the computer always hangs when shutting down eth0, do you have any suggestions?  thanks again:)

----------

## klieber

 *twitch_boy wrote:*   

> I'm trying to follow the instructions from the IBM page that you posted, but I run into a problem when dropping into single user mode

 

Unless this is a computer that has multiple people connecting to it, you don't have to drop into single user mode.  The only thing single user mode does is prevent others from attaching to it so you can be sure no files get modified when you're copying them.

<obligatory CMA statement>

Also, before you do anything, it's a good idea to have a fresh backup of everything, in case anything goes wrong.

</obligatory CMA statement>

----------

## sunki

 :Cool: 

there're downloaded stuffs in /usr/portage/distfiles and unzipped in /var/tmp/portage.

delete them if u need.

----------

## twitch_boy

I think that I will try moving my home directory to another partition and I'll wait on moving the whole system for now.  Its nice to know that I at least have the knowledge to do it now.  Thanks alot for your help klieber, I appreciate it  :Smile: 

----------

