LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Root partition is full, what now? (https://www.linuxquestions.org/questions/linux-newbie-8/root-partition-is-full-what-now-306889/)

Joe Soap 03-29-2005 12:42 AM

Hey Guys, thanks for the help. It's much appreciated.

I've checked the /usr/usr possibility but that's not the case. The actual path is /usr/X11R6/lib. I used find to find the file and I navigated there. It is present, no doubt.

The fstab entry is very basic. I just changed the mount point from /mnt/hda6 to /usr. I left the rest unchanged. I'm at work at the moment, so I can't post the exact entry, but it's a reiserfs file system and is mounted at boot time. The entry is something like:

/dev/hda6 /usr reiserfs auto,users,exec 0 0

I've also checked /etc/ld.so.conf. There are about 6 entries in it and the 3rd or 4th one is /usr/X11R6/lib

I also noticed that there is a symlink to libX11.so.6. Could that be of any significance?

Any other suggestions? Will it help to copy /usr back to /? (Which I'd rather not do, of course.)

Thanks
Joe

Joe Soap 03-29-2005 01:57 AM

[oops, sorry, didn't mean to double post...]

Orkie 03-29-2005 02:03 AM

Where is the symlink to the library located?

Joe Soap 03-29-2005 07:54 AM

Orkie, in /usr/X11R6/lib I have the following:

lrwxrwxrwx 1 root root ... libX11.so -> libX11.so.6
lrwxrwxrwx 1 root root ... libX11.so.6 -> libX11.so.6.2
-rw-r--r--r 1 root root ... libX11.so.6.2

Hope that helps...

Cheers
Joe

Joe Soap 03-29-2005 11:01 PM

[kebump]

Seems like a simple symlink is not going to be the answer :(

I see two other possibilities (from a layman's view, that is):

1. Reinstall kdm. I suppose this will work, but it implies that everything else that is broken because of the /usr move will have to be installed. As far as possible, I'd like to avoid that.

2. Move /usr back to its original position. In the absence of a proper solution, I guess this one could work. And then I'd have to retry the move with varying parameters until it works.

I'd appreciate ideas and comments on the above, as well as proposals that will enable me to fix the problem.

Thanks
Joe

Itzac 03-30-2005 12:30 AM

At this point any damage done probably can't just be undone. If for some reason a file got deleted or its permissions were changed during the copy, simply copying them back won't fix that. You'll have to fix permission problems and such as you find them. Has anything else broken? If not, then it shouldn't take long to correct.

Also, the line in my fstab looks like:

/dev/hda4 /usr reiserfs defaults 1 2

You'd don't want it user because that means a regular user can mount and unmount it, which is redundant since it gets auto-mounted and only root can then unmount it. You also just don't want a regular user to be able to mount or unmount it.

Joe Soap 03-30-2005 12:44 AM

Thanks for the bad news Itzac ;)

Do you think it's a permissions problem? Or (and I'm just blue-skying here) could it be a problem with PATH?

What would you recommend as a next step? It looks more and more like I'll have to reinstall some packages - starting with kdm.

tormented_one 03-30-2005 01:30 AM

Just a thought how about ldconfig? Since you moved it to a diff partition would that screw this all up? I mean it's worth a shot run ldconfig

Orkie 03-30-2005 01:49 AM

What distro are are you running? If you can, it may be worth uninstalling X completely and re-installing it through their interface.

Before you do that though, chmod libX11.so.6.2 to 755. That could possibly fix it (that is what mine is set to).

Joe Soap 03-30-2005 02:10 AM

I haven't tried ldconfig - will do so when I get home. Ditto for changing libmod's permissions.

I'm running Knoppix 3.7 (kernel 2.4.26 (I think)), but I have no idea how to un- and reinstall X. Knoppix has a knoppix-install (or something like that) script which is used to install from the live cd onto a hard disk, but that does a complete install.

Anyway, I'll try the advice you guys have given above and report my success or failure.

Thanks for the help.

Cheers
Joe

Joe Soap 03-30-2005 10:54 AM

Gents, I'm mildly freaked out here. I followed your good advice - rebooting between each application and it didn't work. So I started thinking about reinstalling. But, because I really don't want to reinstall, I decided to try and copy /usr back to / - y'know, the last-ditch, clutching-at-straws action.

And it worked.

And that's what's freaking me out. Why is it working? Please, can anybody shed some light or point me in the direction of an answer? Because I still want to move /usr away from / to it's own partition.

Thanks for all the help and effort thus far.

Cheers
Joe

Itzac 03-30-2005 11:34 AM

Well, I must say, that is the strangest behaviour I've ever heard of. Now, when I copied mine I used cp -pR. It was only when I was looking at the man page that I thought to myself I should also have used -P. Maybe I was wrong. The most important thing after making sure all files and links get copied correctly is making sure all the permissions and owners and such stay the same. So whether you use tar or cp, you still need to preserve permissions. The one thing I can think of is that the -P argument caused something funny to happen with symlinks.

If you try this again, I would suggest comparing the directories before deleting anything. Maybe pipe the output of ls -lr for /usr and /mnt/hda6 to files, then diff the files. You may need to run cut on the contents of each file because the modification times will differ and you don't care about that.

Also, did you try the change I suggested to your fstab? I know that with a vfat partition putting user as an option sets the owner of all the files in the partition to whichever user mounted it. It might goof things up with reiserfs too.

[Edit:]
In fact, reading over your last post again, I'm fairly certain it's the fstab entry that's the culprit. If copying everything back fixed all the problems you were having, then obviously everything was correctly copied both times. Unless you did change your fstab and remount the partition as root with the new options. In that case I'm just full of *&$@. :scratch:

Joe Soap 03-30-2005 12:05 PM

Hi Iztac

I'm pretty sure that I made the fstab change that you suggested and that it didn't make any difference. But I wouldn't swear to it in a court of law...

As for differences between before-cp and after-cp, here's what I have:
---- after-cp
saltheart@andelain:~$ ls -al /usr/X11R6/lib/libX11*
-rw-r--r-- 1 root root 1389904 Sep 28 2004 /usr/X11R6/lib/libX11.a
lrwxrwxrwx 1 root root 11 Mar 30 18:04 /usr/X11R6/lib/libX11.so -> libX11.so.6
lrwxrwxrwx 1 root root 13 Mar 30 18:04 /usr/X11R6/lib/libX11.so.6 -> libX11.so.6.2
-rwxr-xr-x 1 root root 813680 Sep 28 2004 /usr/X11R6/lib/libX11.so.6.2
---- before-cp
saltheart@andelain:~$ ls -al /mnt/hda6/X11R6/lib/libX11*
-rw-r--r-- 1 root root 1389904 Sep 28 2004 /mnt/hda6/X11R6/lib/libX11.a
lrwxrwxrwx 1 root root 11 Mar 28 18:22 /mnt/hda6/X11R6/lib/libX11.so -> libX11.so.6
lrwxrwxrwx 1 root root 13 Mar 28 18:22 /mnt/hda6/X11R6/lib/libX11.so.6 -> libX11.so.6.2
-rwxr-xr-x 1 root root 813680 Sep 28 2004 /mnt/hda6/X11R6/lib/libX11.so.6.2
--------

They look pretty identical, eh?

What I'm gonna try next is to do the cp without the -P, like you suggested and see what happens. Stay tuned :)

Cheers
Joe

prj 03-30-2005 12:13 PM

Your last effort sounds closer to my own, but it has worked so far for me :cool:

Basic method:

Temporarily mount new partition.
Copy contents of directory (/home, /usr, /var etc or even lower in hiarachy) over to new partition, normally in my case using drag and drop in Konqueror.
Unmount new partition.
Change fstab to mount new partition wherever.
Reboot.

Check everything works.
If it doesn't work I know I can lose the new mount and revert to as before because I've not deleted anything.
Also if worst happens, I look in lost and found where the unattached data now resides.

As I said this has worked for me on many occasions, whether technically correct procedure or not.

Joe Soap 03-30-2005 12:43 PM

Thanks for the tip, prj. Like most great ideas it is very obvious - in hindsight...

I think I'll attempt the new change & move tomorrow, after a good night's sleep :)

Cheers
Joe


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