LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 03-28-2005, 01:52 AM   #1
Joe Soap
Member
 
Registered: Sep 2001
Location: Switzerland
Distribution: Debian, Sidux
Posts: 225

Rep: Reputation: 30
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
 
Old 03-28-2005, 02:05 AM   #2
z9_87
Member
 
Registered: Dec 2004
Location: Urbana, IL
Distribution: Ubuntu 6.10
Posts: 118

Rep: Reputation: 15
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?
 
Old 03-28-2005, 02:35 AM   #3
scuzzman
Senior Member
 
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851

Rep: Reputation: 47
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.
 
Old 03-28-2005, 02:40 AM   #4
Psycho(Clan)
Member
 
Registered: Mar 2005
Posts: 35

Rep: Reputation: 15
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????
 
Old 03-28-2005, 02:42 AM   #5
scuzzman
Senior Member
 
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851

Rep: Reputation: 47
Re: Server

Quote:
Originally posted by Psycho(Clan)
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????
Please do not hijack threads. Your issue is being looked at in this thread and that's where it shall remain. It will be answered when someone comes along that is capable of answering it. Please, until then, remain patient.
 
Old 03-28-2005, 02:45 AM   #6
Psycho(Clan)
Member
 
Registered: Mar 2005
Posts: 35

Rep: Reputation: 15
Re: Re: Server

Quote:
Originally posted by scuzzman
Please do not hijack threads. Your issue is being looked at in this thread and that's where it shall remain. It will be answered when someone comes along that is capable of answering it. Please, until then, remain patient.
Ok if you say so but my server will not work untill then but ty for your info!
 
Old 03-28-2005, 03:09 AM   #7
Itzac
Member
 
Registered: Feb 2003
Distribution: VectorLinux 5.1
Posts: 116

Rep: Reputation: 15
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/
as an example to copy the contents of /usr to the partition mounted at /mnt/new_usr. You'll need to run this as root. The -p flag tells cp to preserve permissions. The -R flag tells cp to copy directories recursively, and to do 'the right thing' with links and FIFOs and stuff. If you use -r instead of -R, there's no guarantee that links and such will be properly copied. The -R in theory asserts -P, but repetition never hurt anyone.

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.
 
Old 03-28-2005, 03:46 AM   #8
Joe Soap
Member
 
Registered: Sep 2001
Location: Switzerland
Distribution: Debian, Sidux
Posts: 225

Original Poster
Rep: Reputation: 30
Thanks Itzac, scuzzman. I'll try your advice.

Thanks
Joe

PS: Damn fast replies
 
Old 03-28-2005, 05:46 AM   #9
Joe Soap
Member
 
Registered: Sep 2001
Location: Switzerland
Distribution: Debian, Sidux
Posts: 225

Original Poster
Rep: Reputation: 30
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
 
Old 03-28-2005, 06:06 AM   #10
scuzzman
Senior Member
 
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851

Rep: Reputation: 47
What you'll want to do is this:
Mount it as /mnt/hda5
copy the data:
Code:
cp -pRP /var/* /mnt/hda5/
Now, delete /var/*
Code:
rm -rf /var/*
And just to be sure:
Code:
ls -aR /var
(should return nothing)
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)

Last edited by scuzzman; 03-28-2005 at 06:07 AM.
 
Old 03-28-2005, 06:31 AM   #11
Orkie
Member
 
Registered: Mar 2005
Distribution: Breezy Badger
Posts: 248

Rep: Reputation: 30
I'm sure you already worked it out but just in case you didn't those commands should be run as root.
 
Old 03-28-2005, 09:53 AM   #12
Joe Soap
Member
 
Registered: Sep 2001
Location: Switzerland
Distribution: Debian, Sidux
Posts: 225

Original Poster
Rep: Reputation: 30
Thanks scuzzman, much appreciated. /var has been successfully transferred to the new partition
 
Old 03-28-2005, 12:19 PM   #13
Joe Soap
Member
 
Registered: Sep 2001
Location: Switzerland
Distribution: Debian, Sidux
Posts: 225

Original Poster
Rep: Reputation: 30
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
 
Old 03-28-2005, 01:13 PM   #14
Itzac
Member
 
Registered: Feb 2003
Distribution: VectorLinux 5.1
Posts: 116

Rep: Reputation: 15
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.
 
Old 03-28-2005, 01:13 PM   #15
Orkie
Member
 
Registered: Mar 2005
Distribution: Breezy Badger
Posts: 248

Rep: Reputation: 30
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.

Last edited by Orkie; 03-28-2005 at 01:15 PM.
 
  


Reply



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
root partition full laan97ac Mandriva 6 07-23-2007 01:09 PM
root partition full, not sure how; where are my files? lefty.crupps MEPIS 10 01-31-2006 05:21 PM
root ('/') partition is FULL inon^ Linux - Hardware 2 08-08-2005 01:19 PM
root partition shows 100% full in RH 7.2 dmcmurray5 Red Hat 2 05-18-2004 03:24 PM
Root partition dangerously full HomeBrewer Linux - Newbie 2 04-27-2004 05:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:20 AM.

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
Open Source Consulting | Domain Registration