LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Space low on root partition, /usr/lib (http://www.linuxquestions.org/questions/linux-general-1/space-low-on-root-partition-usr-lib-901026/)

agostonbejo 09-04-2011 09:42 AM

Space low on root partition, /usr/lib
 
Hi!

I have the following problem: my root partition (/) starts to fill up completely. I checked it out and what takes up most of the space on it is the /usr folder, and inside of that the biggest one is /usr/lib (~2Gig). I've been wondering how I could solve the situation:

a)
By using some partition editor to increase the size of the / partition -- but there are always these warnings that data loss is possible etc. that I'm not really sure how reliable this would be. Also, then I'd have to create/download and boot some rescue CD I suppose in order not to have the partitions on the hard drive mounted... lots of hassle, great risk.

b)
I had an idea that I'd move over some folders from /usr/lib to some other partition where there was enough space and created soft links to them in /usr/lib. (I wouldn't dare move the whole /usr/lib folder because I'm not sure whether there is something in there that's actually needed to mount the partition I would move it to -- which would be pretty much of an own goal.)
The problem here is that if I only move individual folders (e.g., "Adobe"), then they will have relative references to other files like ../../../../../liblber-2.4.so.2 which are only present in the original /usr/lib, of course.

Any ideas how this could be solved relatively simply?

Thanks,
Agoston

lydiaXr 09-04-2011 09:52 AM

You could create a symlink to /usr/lib/ on a partition that has more space.

You could do something like:
mkdir -p /path/to/partition/with/more/room/
cd /usr/
mv lib/ /path/to/partition/with/more/room/lib/
ln -s /path/to/partition/with/more/room/lib/ lib

agostonbejo 09-04-2011 05:46 PM

By "soft links" I meant exactly what you write - symlink. Are you absolutely sure then that the problem I've been worrying about won't come up, namely:

"I wouldn't dare move the whole /usr/lib folder because I'm not sure whether there is something in there that's actually needed to mount the partition I would move it to."


All times are GMT -5. The time now is 08:19 PM.