Path: utzoo!attcan!uunet!snorkelwacker!think!zaphod.mps.ohio-state.edu!wuarchive!kuhub.cc.ukans.edu!sloane From: sloane@kuhub.cc.ukans.edu (Bob Sloane) Newsgroups: news.software.anu-news Subject: Re: ** Convert/reclaim in Newspack.com failing ** Message-ID: <22388.25ed02a9@kuhub.cc.ukans.edu> Date: 1 Mar 90 17:08:25 GMT References: <1872@clyde.concordia.ca> <18477.25ea4d0e@ccavax.camb.com> Organization: University of Kansas Academic Computing Services Lines: 76 In article <18477.25ea4d0e@ccavax.camb.com>, glassmann@ccavax.camb.com writes: > CONVERT needs exclusive access to the file. That means that any user running > NEWS will cause it to fail. It would be nice if there was a way to kick users > out of NEWS when you're ready to run CONVERT, and keep them out until you're > done. Funny you should ask. :-) Just this week I needed to move all of the NEWS file do another device, so I needed some way to lock people out of NEWS until the move was done. First, I modified NNTP_ACCESS.NEWS to contain just the line: no.nntp.access read post * Then I wrote a short FORTRAN program: STOP "News is unavailable for file reorgisation." END I compiled and linked the FORTRAN program and replaced the NEWS executable with this new program. Then I removed NEWS.EXE in INSTALL so that new users would get the message from the FORTRAN program. I killed off the currently running NEWSSKIM batch job. Since this was happening about midnight, I didn't need to kill off any NEWS users, but I would probably have used some sort of program to use $FORCEX to kill off NEWS as needed. After this, SHOW DEVICE/FILE on the old device where NEWS was kept showed that none of the files were busy. Then I started the BACKUP to copy NEWS to the new device. About 15 hours later, the copy finished, and I fixed everything up. Anyway, it is possible to kill off NEWS and keep users out using these methods. NNTP_ACCESS.NEWS will keep any nntp clients from accessing the server, and replacing NEWS.EXE will keep any new users out. For users currently using NEWS, you can stop their process, or (more friendly) you can $FORCEX them out of NEWS. While I had the files available, I used the following procedure to compress NEWS.ITEMS and NEWS.GROUPS. -- USmail: Bob Sloane, University of Kansas Computer Center, Lawrence, KS, 66045 E-mail: sloane@kuhub.cc.ukans.edu, sloane@ukanvax.bitnet, AT&T: (913)864-0444 $ ! N E W S P A C K . C O M $ ! $ ! Author: $ ! G Huston $ ! Computer Services Centre $ ! Australian National University $ ! Modified by: $ ! Bob Sloane University of Kansas Computing Services $ ! added code to optimize indexed files $ ! $ ! Version $ ! V5.3 05-May-1989 RRS $ ! V5.2 26-Apr-1988 GIH $ ! $ ! $ !********************************************************************** $ ! Start code $ ! $ on error then goto abort $ oldprv = f$setprv("SYSPRV") $ if .not. f$privilege("SYSPRV") then exit $ analyze/rms/fdl/output=news_root:newsgroups.fdl news_root:news.groups $ edit/fdl/analyze=news_root:newsgroups.fdl/nointer news_root:newsgroups.fdl $ convert/fdl=news_root:newsgroups - news_root:news.groups news_root:news.groups $ purge news_root:news.groups $ purge news_root:newsgroups.fdl $ analyze/rms/fdl/output=news_root:newsitems.fdl news_root:news.items $ edit/fdl/analyze=news_root:newsitems.fdl/nointer news_root:newsitems.fdl $ convert/fdl=news_root:newsitems.fdl - news_root:news.items news_root:news.items $ purge news_root:news.items $ purge news_root:newsitems.fdl $ abort: $ exit