1849547 Members
6718 Online
104044 Solutions
New Discussion

ln -s Assistance

 
SOLVED
Go to solution
Nick D'Angelo
Super Advisor

ln -s Assistance

I can not get my head around this one.

I need to expand the /usr and the /var but I do not have enough space on the my root drive.
I have copied off some of the /usr/lib/X11 items (but not all of them) to another directory for the time being that I need to bring back.

So I have a MountPoint called /misc.

Does this look right?

cd /
ln -s /misc/lib ** THis is where I have a prob. I do not know if I should do it as X11 or lib or whatever. Remembering that some of my /usr/lib/X11* stuff is somewhere else right now.

Ideas/directions/suggestions other than I need to take a holiday ?
Always learning
4 REPLIES 4
Rodney Hills
Honored Contributor
Solution

Re: ln -s Assistance

Generally if I need to shuffle files over to another file system, I will do it at the directory level. For example in your case-

cd /usr/lib
mkdir /otherfs/X11
cp -R X11/* /otherfs/X11
mv X11 X11.tempsave
ln -s /otherfs/X11 X11

If all the files got copied over ok, then I would remove X11.tempsave.

HTH

-- Rod Hills
There be dragons...
Armin Feller
Honored Contributor

Re: ln -s Assistance

Create new lvols in a volume group you have free space available and mount this lvols to /usr and /var
John Dvorchak
Honored Contributor

Re: ln -s Assistance

Are you saying that /usr and /var are part of the / (root) filesystem? Never a good idea as you are finding out. I don't quite understand why the /misc filesystem then cd to / to creat the link.

Wherever you put the files must be the destination of the link. For example if you took the files from /usr/lib/X11/Xserver and coppied/moved them to another location like /misc then you would cd to /usr/lib/X11 and create the link there after removing the now unused directory /usr/lib/X11/Xserver:

ln -s /misc Xserver

That would create a link in the directory tree /usr/lib/X11/Xserver pointing to /misc.

Good luck,
John
If it has wheels or a skirt, you can't afford it.
John Collier
Esteemed Contributor

Re: ln -s Assistance

John,

I guess I have been rather fortunate in my limited experience with HP-UX in reference to having to set links to different things. I have always enherited a system from someone else and all of the links have already been in place and haven't needed to change. This system that I'm on is different in one or two aspects and I have found more than one reference to a link that is outdated and should be changed.

I was following your logic in the way that you were describing the link process for this situation and I wanted to clarify something with you if I may.

When you were suggesting where the link should go, you went to the parent of the directory to be moved. If I understand that correctly, then all you would have to do to get to the linked directory (provided you wanted to use that link instead of the absolute path name) would to be to type in the old directory path since the system would then look through that and find the link to the new directory instead of the actual directory in the old parent and use that instead.

Does my understanding of that logic sound correct to you or am I seeing this the wrong way?
"I expect to pass through this world but once. Any good, therefore, that I can do, or any kindness that I can show to any human being, let me do it now. Let me not defer or neglect it, for I shall not pass this way again." Stephen Krebbet, 1793-1855