[news.admin] Symbolic links to cross-posted articles

carris@dinl.uucp (John P. Carris) (02/16/88)

I believe this topic came up before but I didn't pay attention to the
response/solution because I didn't realize I had the same problem until
recently. I am running news 2.11 B patch level #14. I assumed that any
cross posted articles were being symbolically linked to one primary
article. This is not the case. Identical copies of the same article are
being produced. Does anyone have a solution to this problem? I am running
ULTRIX 2.0 on a MicroVAX II. Thanx in advance.
-- 
John Carris			|	Martin Marietta Information and Communication Systems
carris@dinl.uucp	|	Distributed Informtation Network Laboratory (dinl)
...hao!dinl!carris	|	P.O. Box 1260  MS: XL8058
303-977-0556		|	Denver, CO. 80123-1260

"As always, should you or any of your IMF be caught or killed, the secretary
will disavow any knowledge of your actions. Good luck Jim!"
------------------------------------------------------------------------------

fair@ucbarpa.Berkeley.EDU (Erik E. Fair) (02/16/88)

Netnews uses UNIX "hard" links to link the multiple instantiations
of a news article into the multiple newsgroup directories. Netnews
is most certainly NOT making N copies of an article for appearance
in N newsgroups, except on VMS systems, under Eunice (but then,
they deserve to lose). I suggest that you go back and read up on the
UNIX filesystem structure, paying particular attention to the concept
of "inodes" and "directories." A "hard" link is simply another
directory entry that refers to the same inode; no extra disk space
required, modulo that required by the directory entry.

	Erik E. Fair	ucbvax!fair	fair@ucbarpa.berkeley.edu

jbuck@epimass.EPI.COM (Joe Buck) (02/17/88)

In article <23012@ucbvax.BERKELEY.EDU> fair@ucbarpa.Berkeley.EDU (Erik E. Fair) writes:
>Netnews uses UNIX "hard" links to link the multiple instantiations
>of a news article into the multiple newsgroup directories. Netnews
>is most certainly NOT making N copies of an article for appearance
>in N newsgroups, except on VMS systems, under Eunice (but then,
>they deserve to lose).

Nope.  I did the Eunice code for 2.11 news, and it makes the
equivalent of symbolic links.  The article is stored under the
first newsgroup, and the remaining newsgroups have a tiny file
containing nothing but the name of the first file (I stole this
from Larry Wall's Eunice code in "rn").
-- 
- Joe Buck  {uunet,ucbvax,sun,<smart-site>}!epimass.epi.com!jbuck
	    Old Internet mailers: jbuck%epimass.epi.com@uunet.uu.net

jfh@killer.UUCP (The Beach Bum) (02/18/88)

In article <23012@ucbvax.BERKELEY.EDU> fair@ucbarpa.Berkeley.EDU (Erik E. Fair) writes:
>Netnews uses UNIX "hard" links to link the multiple instantiations
>of a news article into the multiple newsgroup directories. Netnews
>is most certainly NOT making N copies of an article for appearance
>in N newsgroups, except on VMS systems, under Eunice (but then,
>they deserve to lose).
>
>	Erik E. Fair	ucbvax!fair	fair@ucbarpa.berkeley.edu

There was an interesting mis-feature in VMS prior to version 3.0 which
allowed (and may still allow) creating something like hard links by
judicious use of COPY/OVERLAY and a few other simple commands to create
a fake directory (which was then copied onto the real directory).

Has this been fixed?  Has anyone found anything useful to do with it?
Did you even know this bug existed?

- John.
-- 
John F. Haugh II                  SNAIL:  HECI Exploration Co. Inc.
UUCP: ...!ihnp4!killer!jfh                11910 Greenville Ave, Suite 600
"You can't threaten us, we're             Dallas, TX. 75243
  the Oil Company!"                       (214) 231-0993 Ext 260

jkingdon@oberlin.UUCP (Jim Kingdon) (02/21/88)

I don't know about tricks with fooling it about fake directories and
stuff.  VMS has command SET FILE/ENTER, which creates a hard link,
and SET FILE/REMOVE which removes one.  The big difference with UNIX
is that if you SET FILE/REMOVE the last reference to a file, instead
of deleting the file, those disk blocks just sit there until you
reformat the disk.  I'm pretty sure that there are RMS calls to do
this stuff from a program too, but I've never used this stuff much.

ted@blia.BLI.COM (Ted Marshall) (02/23/88)

In article <691@oberlin.UUCP>, jkingdon@oberlin.UUCP (Jim Kingdon) writes:
>    ...  VMS has command SET FILE/ENTER, which creates a hard link,
> and SET FILE/REMOVE which removes one.  The big difference with UNIX
> is that if you SET FILE/REMOVE the last reference to a file, instead
> of deleting the file, those disk blocks just sit there until you
> reformat the disk.  ...

If you already understand SET FILE/ENTER and SET FILE/REMOVE, you can
skip the rest of this message. There have already been several messages
explaining what they do, but this posting shows that there are still
many people who don't understand the details. Therefore I decided to
post a concise explanation.

The VMS file system, somewhat like UNIX, has a master list of all files
on a disk volume (called INDEXF.SYS). This is indexed by file
identification (FID). There are also directory files which relate
directory and file name to FID. Thus, if you have a file, for example,
"[X]Y.Z", the directory file "[000000]X.DIR" contains an entry for the
name "Y.Z" and the corresponding FID. There is also an entry in
INDEXF.SYS under that FID containing the rest of the information for
that file, including pointers to the file data. Also included is ONE
"back pointer" to a directory entry containing that FID.

Normally a file has one directory entry and the back pointer points to
that.  SET FILE/ENTER adds another directory entry with the same FID.
Here is the big difference from UNIX: the back pointer is not changed
and there is no information add to INDEXF.SYS saying that there is a
second directory entry with that FID.

SET FILE/REMOVE deletes an entry from a directory without affecting
INDEXF.SYS.  If the last directory entry for a file is removed, it
becomes a "lost" file. The file still exists, it is still charged to the
owner's quota and can still be accessed by FID, but it is not in any
directory. It can be recovered using the VERIFY utility (ANALYZE/DISK
command) which will put it in a specific system directory (sorry, I
can't remember its name) under one of its former names (info stored in
the index entry) where it can be returned to its owner or deleted.

DELETE deletes a directory entry and the associated index entry and file
data.  If there are additional directory entries, they now contain
invalid FIDs (note that FIDs include sequence numbers, so a specific FID
will not be re-used for a long time). If you do a directory on that file
name, requesting more than just file name, type and version you will
see:

	$ DIR/SIZE Y.Z
	Y.Z;1		no such file

This means that the directory entry exists, but the resulting FID does
not specify a current file. This directory entry can be removed by SET
FILE/REMOVE.

-- 
Ted Marshall       ...!ucbvax!mtxinu!blia!ted <or> mtxinu!blia!ted@Berkeley.EDU
Britton Lee, Inc., 14600 Winchester Blvd, Los Gatos, Ca 95030     (408)378-7000
The opinions expressed above are those of the poster and not his employer.