Solved

man cannot create temp file

Posted on 2002-05-01
10
1,447 Views
Last Modified: 2013-12-27
Ever since I put /var on a mirror, man cannot create a temp file.  I have made sure perms were 1777 on /var/tmp.  I don't know what else to check...


Here is the specific error:
# man vi
Reformatting page.  Please Wait...nroff: cannot create temp file.
 done
#

System info:

# df -k
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/md/dsk/d0       7001819   73245 6858556     2%    /
/dev/md/dsk/d6       10910828  933614 9868106     9%    /usr
/proc                      0       0       0     0%    /proc
fd                         0       0       0     0%    /dev/fd
mnttab                     0       0       0     0%    /etc/mnttab
/dev/md/dsk/d2       12965730   39760 12796313     1%    /var
swap                 7611880      16 7611864     1%    /var/run
swap                 7611912      48 7611864     1%    /tmp


# cat /etc/vfstab
#device         device          mount           FS      fsck    mount   mount
#to mount       to fsck         point           type    pass    at boot options
#

fd      -       /dev/fd fd      -       no      -
/proc   -       /proc   proc    -       no      -

/dev/md/dsk/d0  /dev/md/rdsk/d0 /       ufs     1       no      -
/dev/md/dsk/d1  /dev/md/rdsk/d1 -       swap    -       no      -
/dev/md/dsk/d2  /dev/md/rdsk/d2 /var    ufs     1       no      -
/dev/md/dsk/d6  /dev/md/rdsk/d6 /usr    ufs     1       no      -

swap    -       /tmp    tmpfs   -       yes     -

This is the ls -l of /var/tmp
drwxrwxrwt   2 root     other        512 Apr 30 16:11 tmp
0
Comment
Question by:pshirmey
  • 6
  • 4
10 Comments
 
LVL 40

Expert Comment

by:jlevie
ID: 6984124
Where the temp file is located depends on whether the man page was formatted with roff or sgml. The Solaris man pages are sgml and temp files for those will be placed in /tmp by default. The roff formatted documents will have their temp files in /usr/tmp (which is normally a symlink to /var/tmp). So check to see that /tmp is mode 1777 and that it is owned by root:sys
0
 

Author Comment

by:pshirmey
ID: 6984153
Here is /tmp

drwxrwxrwt  10 root     sys          695 May  1 14:11 tmp
0
 

Author Comment

by:pshirmey
ID: 6984162
Here is /tmp

drwxrwxrwt  10 root     sys          695 May  1 14:11 tmp
0
 

Author Comment

by:pshirmey
ID: 6984242
the symlink for /usr/tmp went to ../var/tmp.  which did not work since /var is now on a different file system.  After changing the link to /var/tmp it worked.

But now that raises another ?, all of my other links to ../var/* are now broken.

I guess short of changing them all, I should move /usr to the same mirror as /var.

Thoughts....
0
 

Author Comment

by:pshirmey
ID: 6984420
Well, I just changed them all.. There were only about 15 of them...
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 40

Expert Comment

by:jlevie
ID: 6986391
It shouldn't have mattered that the links pointed to ../var/tmp as long as tmp is a subdir of var. From the filesystem view going up one dir from /usr takes you to / and /var is there.

The only thing that seems logical to me is that something was cached. When you moved the contents of /var to a separate filesystem did you do so in single user mode?
0
 

Author Comment

by:pshirmey
ID: 6986987
No I was not in single user mode when I copied it...

So by redoing all the symlinks, do you think it should be good now...
0
 
LVL 40

Accepted Solution

by:
jlevie earned 50 total points
ID: 6987043
Yes, that's okay and now I understand what happened.

When moving something like /var (or some of it's contents) it's really important to do so in single user mode. For some other areas or file systems you can safely do it in multi-user mode if you can be certain that nothing has any of the files in that area open. Obviously, if you are moving a file system from one disk to another you can umount the source disk and re-mount it on a temporary mount point while doing the transfer. However, /var will always have open files when the system is in multi-user mode.

If you haven't done so since moving /var, I highly recommend a reboot of the server to be certain that everything is reading/writing to where /var is now. Anything that had an open file on the old /var hirearchy could well still be reading/writing to that area since the process would have the inodes of the file(s) in the file structure of the program.
0
 

Author Comment

by:pshirmey
ID: 6987137
I have rebooted and everything seems good...  But since this system is still virginal, I will probably rebuild it and do the var and usr movement in single user.  Thanks for all your help!
0
 
LVL 40

Expert Comment

by:jlevie
ID: 6987174
Those things in /var that are suspect are just log files, tmp files, etc. If the system isn't in production I doubt that you'd have lost any data that you will care about. So I see no point in going through all of the effort to rebuild.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now