Solved

man cannot create temp file

Posted on 2002-05-01
10
1,469 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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
 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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…

713 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