SunOs

I have a bunch of CAD Sun boxes running SunOS 5.8. One of the computers has an external hard drive that I mounted to a directory called /storage. I mounted the /storage directory to the other Sun machines for file sharing, but also the users .profile file is in the /storage directory. ( We had an old drive that ran out of room and that was were the .profile file was for each person. I don't know if it's a good idea to have the .profile file on a share, I just don't know enough to change it, so I kept .profile on the new, bigger share ). All of the users that mount to the Sun box with the external drive are fine, and they login with no problems because they are setup to look for the .profile file in a /usr3 directory which is mounted from term1:/storage /usr3. I'm not sure how to set the .profile file for the user that has the external hard drive ( lets just call his computer term1 ) On term1 the external hard drive is mounted on /dev/dsk/c1t10d0s2 /storage. So I was hoping there is a way to link /storage to /usr3? Not sure if that would work, sorry to be so wordy, I'm just not sure how to describe this.
LVL 1
JeffBeallAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
robocatConnect With a Mentor Commented:

A symbolic link should do the trick:

ln -s /storage /usr3
0
 
sentnerConnect With a Mentor Commented:
It's generally a bad idea to have a user's home directory (where their .profile is stored) on a network share unless you're doing it for purposes of having a portable home directory (meaning their profile and home directory follow them to different hosts).  If that is your goal, you need to make sure the network share is fairly highly available or else if there are network or storage problems your users will have trouble and your systems will slow down.

As for the user who is on the term1 host, robocat's suggestion is probably your best bet if you want to continue using NFS off of that drive.  
0
 
JeffBeallAuthor Commented:
It must be like you said about the roaming profile thing. The CAD people sometimes use different CAD boxes for some reason. So I tried ln -s /storage /usr3, but when I cd to /usr3 I run ls and get nothing in the directory. A ls on the other Sun boxes lists a bunch of directories?
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Hanno P.S.Connect With a Mentor IT Consultant and Infrastructure ArchitectCommented:
to see files beginning with a dot, you will have to use
   # ls -a
0
 
robocatConnect With a Mentor Commented:

An ls of /storage and /usr3 should give the same output if the link was created correctly.

You can check this with ls -l /

should give something like

usr3 -> /storage
0
 
sentnerConnect With a Mentor Commented:
When you say that users are set up to look for .profile in /usr3, I hope you mean there are individual home directories under /usr3 for each user, owned by those individuals... Not one shared home directory for all of them..?
0
 
Brian UtterbackConnect With a Mentor Principle Software EngineerCommented:
I would expect that if the symbolic link did not work, then the attempt to change directory into the link
would have returned a "No such file for directory" error.

I am a little confused. You talk about the .profile file for each user, but that file is usually expected
to live in the user's home directory. Are you saying that all of your user's have home directory's
that are set to something like /usr3/username, but on this one machine, the user's home directories
live at /storage/username? If so, then the symbolic link given before should have done it.

The trick to diagnosing this is to take it step by step.

On the problem machine do this:

cd /
ls -ld /storage /usr3
/storage should show as a directory and /user3 should show as a link that points to /storage

These next two should produce nearly identical output:

ls -l /storage
ls -lL /user3

cd /user3
/bin/pwd

This should show that you are in /storage

Then change directory into the problem user's home directory.
cd username
ls -l .profile

Does it exist? If so, does it have the user as its owner.

If any of the above doesn't produce what they should, then let us know.
0
 
JeffBeallAuthor Commented:
I'm sorry I didn't explain this well. Hopefully this is a better picture of the setup. All CAD users .profile file lives in their own directory. So the structure likes like, /usr3/CADuser1, /usr3/CADuser1 and so forth, then in CADuser1's directory they have their .profile file. So for everyone's mount I used  
mount term1:/storage/usr3 /usr3
and I guess the profile or something tells Sun to look in /usr3/CADuserX given whoever logins, so if CADuser1 logins, Sun looks in /usr3/CADuser1's directory for .profile.
On one of the CAD machines there is an external hard drive with a large hard drive and that is where everybody's /usr3/CADuserX directory is. For the user that uses the CAD machine with the external hard drive I can't use   mount term1:/storage/usr3 /usr3, because they are on term1, and the external drive is mounted like this
/dev/dsk/c1t10d0s2 /storage.
So in the /storage directory a ls revels
usr3  lost+found  home  and so forth
Hopefully this helps. I will try blu's suggestion.
0
 
JeffBeallAuthor Commented:
the output for
cd /
ls -ld /storage /usr3
is
drwxr-xr-x  11  root         512  Feb  3  15:04  /storage
drwxr-xr-x    2  root         512  Feb  4  09:11  /usr3
0
 
sentnerConnect With a Mentor Commented:
There's your problem.  /usr3 is a directory instead of a symlink.  Verify that /usr3 is empty, and then remove the directory.  Then do the symlink creation:

rmdir /usr3
ln -s /storage /usr3

My guess is, if you do 'ls -l /usr3' you will see that there is a symlink under there that looks like:  /usr3/storage -> /storage

0
 
Brian UtterbackConnect With a Mentor Principle Software EngineerCommented:
Okay, you left off one level of directory in your first message. Also, there apparently already is
a /usr3 directory on this system. So, when you did the link via "ln -s /storage /usr3" what you really did was
create a link called "storage" in the /usr3 directory.

So, first you should double check this. Look in the /usr3 directory and see if it is either empty or contains
a link called storage and nothing else. If it is empty or only has the single link in it, then delete the link,
and cd to /. Then execute "rmdir user3". If says that it is not empty, then look again. Double check with
"ls -la". That should show you ".", "..". If there are any hidden files, then you need to decide why they are there
and if appropriate, delete them and try the rmdir again.

Once /usr3 is gone, then you can do the command "ln -s /storage /usr3" and you should be all set.
0
 
sentnerConnect With a Mentor Commented:
Hmm... I missed that usr3 in the directory listing for /storage.  Is it possible that you were sitting in the /storage directory, and did  "ln -s /storage usr3" without the leading "/" on "usr3"?  Or is that a subdirectory?

0
 
JeffBeallAuthor Commented:
I cd to / then a pwd shows that I'm in /. Then I run
ls -l /usr3
and that shows.
lrwxrwxrwx   1  root   other      13  Feb  09:11   usr3 -> /storage/usr3

I tried rmdir /usr3  and get
rmdir:  directory "/usr3": Directory not empty
If I cd into /usr3, and ls I get usr3, so I cd into usr3, do a pwd and it shows
/usr3/usr3,
At this point I forgot to mention that the users home directories are actually in /usr3/user_logins/  After user_logins there are the users directories.
I must have done the ln command wrong to end up with /usr3/usr3. I think /usr3/usr3 must be a link because if I run  
du -sk /usr3  
I get
2     /usr3
but if I do a du on where the other CAD users are mounted to I get
du -sk /storage/usr3
19260427    /storage/usr3
0
 
Brian UtterbackConnect With a Mentor Principle Software EngineerCommented:
Okay, you have a real directory that is called /usr3 and it contains a line
in it that points to /storage/usr3.

Do this:

cd /usr3
rm usr3
ln -s /storage/usr3/user_logins

I think that will do it for you. Note, there is no second file name in the ln, just the on, but you must do it
within the /usr3 directory.
0
 
sentnerConnect With a Mentor Commented:
If you want /usr3 to look exactly like /storage, then you need to do:

cd /
rm /usr3/usr3
rmdir /usr3
ln -s /storage /usr3


0
 
Brian UtterbackConnect With a Mentor Principle Software EngineerCommented:
Another possibility that presents itself, is that you could use loopback filesystems. Where the other
systems had a line in the vfstab that mounted the file system via NFS, you could simply use essentially
the same line on this system, but change the type from nfs to lofs, and remove the part about
"term1:", so that it would show /storage for the source and /usr3 for the mountpoint.
0
 
JeffBeallAuthor Commented:
Thanks for all the help. The ln -s thing works now. I'm always impressed with how quick the response is, and how knowledgeable everyone is. I accepted multiple solutions based on number of responses. Hope this seems fair, thanks again.
0
All Courses

From novice to tech pro — start learning today.