Root partition is full, what now?
G'day Folks,
My root partition (6 G) is full. I'm in the process of deleting unnecessary files, but I would also like to move /usr, /home, /var, etc. to other disks in my machine. However, I do not know how to do this without potentially screwing up my set-up. Can somebody tell me how to move these directories without losing any links, configuration or data? Can I just do a straightforward mv or not? Thanks Joe |
lol, wow I was just asking myself, what happens when my root partition becomes full? It's got 600MB left and while it may last a while I will need to make it bigger or move stuff sonner or later. On top of the same quesiont as of what to do when it's full as asked above, but why isn't it made bigger in the first place?
|
No - what you'll need to do is install another disk and partition it. then, using a LiveCD, tar up your /usr, and untar it to that partition that was created. Delete the /usr directory, then recreate it on your disk and in your /etc/fstab (so it's mounted on boot) and point it to the proper mount point.
If you need more help doing this, reply. |
Server
Do you know what i must do when my server says Attempted to kill init at startup i can't login nothing works it will stop during the startup some1 help me????
|
Re: Server
Quote:
|
Re: Re: Server
Quote:
|
You don't actually need to tar anything up.
Just create and format the partitions you want to move stuff to. Next mount these. Now you have to copy the necessary files over. This is the tricky bit. You need to use the following copy command or stuff will screw up. Code:
%cp -pRP /usr/* /mnt/new_usr/ Finally, modify your fstab to mount the partition at boot, delete everything inside of /usr or whichever directory you're doing this with, and remount the new partition to the appropriate directory. I just used this very procedure to move /usr to a different partition and It seems to have work perfectly. |
Thanks Itzac, scuzzman. I'll try your advice.
Thanks Joe PS: Damn fast replies :) |
Guys, a little more help here, please.
I've formatted a partition (/mnt/hda5) and I want to use this as my new /var partition. Itzac, according to your instructions, I should mount this as /mnt/hda5 and copy /var to it with the copy command you showed above, etc. But how do I then address the new partition as /var? Some clarification would be much appreciated. Thanks Joe |
What you'll want to do is this:
Mount it as /mnt/hda5 copy the data: Code:
cp -pRP /var/* /mnt/hda5/ Code:
rm -rf /var/* Code:
ls -aR /var Now, unmount /mnt/hda5, and remount it on /var then, change /etc/fstab to show the new drive mounted on /var Note: be careful, but not paranoid, as as long as the data stays in place, it can be fixed with a Live CD (ie: if something doesnt get mounted right) |
I'm sure you already worked it out but just in case you didn't those commands should be run as root.
|
Thanks scuzzman, much appreciated. /var has been successfully transferred to the new partition :)
|
Dang, ran into a little snag...
I moved /usr and /home in the manner described above, changed fstab and rebooted. Now kdm won't start because it cannot find a shared library - libX11.so.6. However, this lib is in /usr/X11R6/lib/ I'm guessing that it won't be too difficult to fix - maybe just a symlink? Problem is, I don't know where to point the symlink to... Any help will be appreciated. Thanks joe |
Is it possible the cp command copied the /usr part of the original paths to the new partition? That would make the path of any file in /usr look like /usr/usr/include/... The other possibility is that there's something wrong with your fstab, so that /usr isn't being properly mounted. Post it if you're not sure.
Also, did you navigate to the file in question or did you use locate to find it. The locate program keeps an index of the files in your filesystem, so the results it returns might not reflect the current state of the disk. Run updatedb as root to be sure. |
Check to make sure that /usr/X11R6/lib/ appears in /etc/ld.so.conf. This file is where the dynamic linker looks where it should find shared libraries such as this.
|
All times are GMT -5. The time now is 11:30 PM. |