rkt logo

INN FAQ Part 6

NOTE: The maintainers of the INN FAQ stopped publishing in December 1997.
An important update to this topic is provided by Mib Software in the Usenet RKT for Subscribers.

Subject: (6.15) What do I do if /var/spool/news is split over multiple partitions?


First of all, you can do this by either mounting a filesystem at
/var/spool/news/comp (for example) or by mounting a filesystem anywhere
and making /var/spool/news/comp a symbolic link to the new partition.

Articles will be written as normal, but cross-posts have to be handled
specially now. Usually INN handles crossposts by writing the article
to the first newsgroup, and then creating hard links to all the other
places where the article should appear. Hard links do not take up
additional disk space (except making your directories longer). Hard
links also have the advantage that the file data doesn't get deleted
until the last hard link is gone (and they can be deleted in any
order). Therefore, you can expire each newsgroup at a different rate,
but the file data won't delete until it is expired from the last

The problem is that two hard linked files must both be on the same
filesystem (partition).

When INN sees that it can not make a hard link (because an article is
cross-posted across two partitions) it will try to make a symbolic
link. If your system can not do symbolic links, set HAVE_SYMLINK to
DONT in your config.data file. This will make INN write a second
(or third, etc.) copy of the file instead. (NOTE: INN 1.4 doesn't
make the extra files.)

Anyway, even though INN will automatically create symbolic links, you
have to give expire the "-l" flag so that it will know to modify its
behavior. Suppose that a message is posted to rec.photo and
alt.cameras and suppose that rec.photo expires more quickly then the
alt group. If this happens, then you will be left with a dangling
symlink. The -l flag prevents this from happening by not removing
the file from rec.photo until alt.cameras expire time permits it
from being deleted.

To inform expire that your spool is split across multiple partitions:

In news.daily, change:
to read
        EXPIREFLAGS="-v1 -l"

In expirerm, change:
        RMPROC="fastrm -e -u -s ${SPOOL}"
to read
        RMPROC="fastrm -e -s ${SPOOL}"

Now edit innwatch.ctl so that it checks all the spool disks, not just
".". See the lines with "No space (spool)". Also edit innshellvars
and change the INNDF variable to reflect the innwatch.ctl changes.

Lastly, edit innstat (the line with the "df") so that all spool disks
are included. After that, you're done!

If you ever need to run "makehistory" you should pay attention to the
caveat in makehistory(8) (NB: This man page is called "news-recovery"
in releases before INN 1.5):


Here is an example of moving /var/spool/news/rec to its own
        (mount the new disk onto /mnt)
        cd /var/spool/news/rec
        tar cf - . | ( cd /mnt && tar xpvf - )
        If you are confident you did it right, "rm -rf /var/spool/news/rec"
        then "mkdir /var/spool/news/rec".
        umount /mnt
        mount /var/spool/news/rec

If you are moving >50% of the spool, you might use dump instead of tar:
        dump 0f - /var/spool/news | ( cd /mnt && restore xf - rec)
But try it out first if it is really faster - some people had much better
success with using a tar-pipe (as above) using GnuTar (10 times faster).
If you don't mind about article loss, just deleting the articles would
be fastest:
        cd /var/spool/news
        mv rec rec.o
        mkdir rec
        mount /dev/newdisk /var/spool/news/rec
        rm -rf rec.o

Remember: If you screw up the /etc/fstab, SunOS and many other UNIXs
won't boot. fstab can't have any blank lines in many UNIXs either.
Double check the file after you modify it.


[Source: INN FAQ Part 6 Archive-name: usenet/software/inn-faq/part6]
[Last Changed: $Date: 1997/07/01 01:25:41 $ $Revision: 2.21 $]
[Copyright: 1997 Heiko Rupp, portions by Tom Limoncelli, Rich Salz, et al.]