dplatt@coherent.com (Dave Platt) (09/28/89)
I'm becoming quite frustrated, and could use some help if there's anybody out there who has encountered this problem before. I'm unable to run "expire -r" to rebuilt our news history file. Expire, itself, has no problems... but the sort process it forks off dies messily, because our root partition doesn't have enough space for the temporary sort files. We have about 2.5 megs free in our / partition, on which the /tmp directory lives... and that's where Sun's "sort" puts its scratch file(s). I've tried recompiling expire, using the -T option to redirect the temporary files to another filesystem on which more space is available. I've been unsuccessful. I've tried specifying "-T/usr/tmp" and "-T/usr/tmp/", but neither appears to have any effect... sort still places its "sm" temporary file in /tmp rather than in the directory I pointed it to. I've tried running "sort" manually, specifying the -T option. The option is apparently accepted (no error message is displayed), but it has no apparent effect. It looks as if this is a bug in Sun's "sort" program (and thus perhaps in BSD sort as well?), and that I may be unable to sort any file whose size exceeds the amount of space available in the root partition. If so, this is quite unfortunate. Has anyone else tackled this problem successfully? I realize that I could probably symlink /tmp over onto another file-system... but the thought of doing this makes my skin crawl. Are there any other solutions, other than hoping that Sun fixes 'sort' someday? Configuration: SunOS 3.5 running on a 3/280. News 2.11B, patch level 17. -- Dave Platt FIDONET: Dave Platt on 1:204/444 VOICE: (415) 493-8805 UUCP: ...!{ames,sun,uunet}!coherent!dplatt DOMAIN: dplatt@coherent.com INTERNET: coherent!dplatt@ames.arpa, ...@uunet.uu.net USNAIL: Coherent Thought Inc. 3350 West Bayshore #205 Palo Alto CA 94303
dplatt@coherent.com (Dave Platt) (09/29/89)
Well, I found the problem. Pilot error on our end. I had tried running sort manually, and from within expire, with the options "-T/usr/tmp" and "-T /usr/tmp". Neither seemed to work. I received some messages from people who suggested that this option _should_ work... and, in fact, that I might not even need it, since at least one version of sort (SunOS 4.0.x) tries to place its files in /usr/tmp, and switches over to /tmp only if it can't put them into /usr/tmp. I then tried running the sort again, trying the option again... and this time it worked! Why? Well, the first times I had tried it, I was running suid=news; the time it worked, I was running suid=myself. A little investigation showed that the /usr/tmp directory on our server machine had somehow been set up with owner=root, group=cti (our "software developer" group), and permissions=770. As a result, sort couldn't write there when run suid=news; it dropped back 10 and punted the files into /tmp without ever informing me of the fact. I changed the permissions on this directory to 777, recompiled expire so that it specified "sort -T /usr/tmp", and rebuilt my history file. Lo and behold, it worked perfectly... the scratch files were placed in /usr/tmp and the sort didn't overload our root partition. Thanks to everybody who wrote in with suggestions. I received two notes suggesting that I try "-T /usr/tmp" rather than "-T/usr/tmp" (I had, and had neglected to mention so in my posting), one saying "Everybody I know simply symlinks /tmp over to /usr/tmp", one saying "I symlinked it and it seems to work OK", and one urging me _not_ to symlink, because I might get burned if I ever needed temp space when running single-user with the /usr filesystem dismounted... but instead to set up a separate partition and mount /tmp onto it. Again, thank you all! -- Dave Platt VOICE: (415) 493-8805 UUCP: ...!{ames,apple,uunet}!coherent!dplatt DOMAIN: dplatt@coherent.com INTERNET: coherent!dplatt@ames.arpa, ...@uunet.uu.net USNAIL: Coherent Thought Inc. 3350 West Bayshore #205 Palo Alto CA 94303