🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
8 messages
8 total messages Started by John F. Morse Wed, 09 Feb 2011 22:16
CNFS articles going into tradspool directories
#83851
Author: John F. Morse
Date: Wed, 09 Feb 2011 22:16
13 lines
1592 bytes
INN 2.5.2 on Squeeze.

When an article is crossposted to a group in a CNFS class and a group in 
a tradspool class, there is a directory created in the tradspool 
articles directory for the article and a copy written into the directory.

This behavior is not desired when using CNFS to protect disk usage space.


-- 
John

When a person has -- whether they knew it or not -- already rejected the Truth, by what means do they discern a lie?
Re: CNFS articles going into tradspool directories
#83852
Author: Julien ÉLIE
Date: Wed, 09 Feb 2011 23:25
24 lines
2071 bytes
Hi John,

> When an article is crossposted to a group in a CNFS class and a group in
> a tradspool class, there is a directory created in the tradspool
> articles directory for the article and a copy written into the directory.
>
> This behavior is not desired when using CNFS to protect disk usage space.

I believe the article is stored only at one place (and the token of the 
article refers to its location in tradspool).

Wouldn't the order of the classes in storage.conf be of relevance?  CNFS 
before tradspool?
Or putting "@your-CNFS-newsgroups" at the end of your tradspool lines 
and using the exactmatch parameter?
     http://www.eyrie.org/~eagle/software/inn/docs/storage.conf.html

Just suggestions.  I have not tested.

-- 
Julien ÉLIE

« Quand tu auras lu ces lignes, le papyrus s'autodétruira. »
   (Astérix)
Re: CNFS articles going into tradspool directories
#83853
Author: John F. Morse
Date: Thu, 10 Feb 2011 00:10
87 lines
4326 bytes
Hi Julien,

>> When an article is crossposted to a group in a CNFS class and a group in
>> a tradspool class, there is a directory created in the tradspool
>> articles directory for the article and a copy written into the 
>> directory.
>>
>> This behavior is not desired when using CNFS to protect disk usage 
>> space.
>
> I believe the article is stored only at one place (and the token of 
> the article refers to its location in tradspool).


A directory is created in the /var/news/spool/articles/... directory and 
crossposted articles belonging in a cycbuff are stored there.

I have accessed these articles in that directory and can read them (cat 
or less the article number).

Running "grephistory {'m-id'} | sm -c" does show that the article is in 
tradspool, and that is what it should show.

But why is a directory created and the article placed there instead of 
only in a cycbuff, and in the proper tradspool directory.

The problem is when someone crossposts an article to, say, 
local.binaries (a CNFS group to expire rather quickly) and 
local.computers, which is a non-expiring tradspool group.

I guess since it is a non-expiring group, the disk space will always be 
used in the tradspool directory -- but -- there is an identical article 
stored in the odd directory that is created when that article should be 
in the CNFS buffer.

I can read it in both directories.


It is there twice! Double the trouble.

news@reader:~/articles/local/binaries$ grephistory 
'<op.vkudyschpbosr7@acer.gateway.net>' | sm -c
@050000000EC8000007B70000000000000000@ method=tradspool class=0 
ngnum=3784 artnum=1975 file=/var/spool/news/articles/local/binaries/1975

news@reader:~/articles/local/computers$ less 8001 | grep 8001

news@reader:~/articles/local/computers$ cd ../binaries

Then it is here, which is a waste of space:

news@reader:~/articles/local/binaries$ less 1975 | grep 1975


> Wouldn't the order of the classes in storage.conf be of relevance?  
> CNFS before tradspool?


I have method tradspool first in storage.conf but the specific 
local.binaries newsgroup is not listed there.

All works fine until someone crossposts, then I find a new directory was 
created and a duplicate article filed in the new tradspool directory.


> Or putting "@your-CNFS-newsgroups" at the end of your tradspool lines 
> and using the exactmatch parameter?
>     http://www.eyrie.org/~eagle/software/inn/docs/storage.conf.html


Reading that, I don't think it would allow the article in any group (it 
would be poisoned).


> Just suggestions.  I have not tested.


I have not tested the @ poison either. Maybe Russ would know?

It would seem if a wildmat was used, it could require a long list of 
groups to exclude from a particular storage class.


-- 
John

When a person has -- whether they knew it or not -- already rejected the Truth, by what means do they discern a lie?
Re: CNFS articles going into tradspool directories
#83854
Author: Russ Allbery
Date: Thu, 10 Feb 2011 00:21
20 lines
2142 bytes
"John F. Morse" <john@example.invalid> writes:

> All works fine until someone crossposts, then I find a new directory was
> created and a duplicate article filed in the new tradspool directory.

Are you sure that it's a duplicate copy?  It should be a hard link (and
hence will not take up any additional space).

As for where articles are stored, the first matching entry in storage.conf
will be used to determine the storage location of an article.  Crossposted
articles will normally match any entry whose newsgroups wildmat matches
any of the newsgroups to which they're posted.  If you don't want to use
that behavior, you need to use poison wildmats (@) to exclude crossposted
articles, or list the CNFS binaries rule before the tradspool rule.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: CNFS articles going into tradspool directories
#83863
Author: John F. Morse
Date: Thu, 10 Feb 2011 01:51
47 lines
3089 bytes
Russ Allbery wrote:
> "John F. Morse" <john@example.invalid> writes:
>   
>> All works fine until someone crossposts, then I find a new directory was
>> created and a duplicate article filed in the new tradspool directory.
>>     
>
> Are you sure that it's a duplicate copy?  It should be a hard link (and
> hence will not take up any additional space).
>   


Yes, I am sure.

These are separate directories and separate files. No linking involved.


> As for where articles are stored, the first matching entry in storage.conf
> will be used to determine the storage location of an article.  Crossposted
> articles will normally match any entry whose newsgroups wildmat matches
> any of the newsgroups to which they're posted.  If you don't want to use
> that behavior, you need to use poison wildmats (@) to exclude crossposted
> articles, or list the CNFS binaries rule before the tradspool rule.
>   

Poison wildmats would be a major undertaking since it is not known which 
groups might be crossposted. Also, wouldn't a poisoned group never be 
accepted - anywhere?

"Poison wildmat expressions (expressions starting with "@") are allowed 
and can be used to exclude certain group patterns:  articles crossposted 
to poisoned newsgroups will not be stored using this storage method.  
The <wildmat> pattern is matched in order."

If I'm dense here, please give me an example using the two local groups 
I provided in my report.

Rearranging the storage.conf listing is not feasible due to the final 
"*" wildcard used for CNFS groups not listed elsewhere.

I think it is a bug, Russ.


-- 
John

When a person has -- whether they knew it or not -- already rejected the Truth, by what means do they discern a lie?
Re: CNFS articles going into tradspool directories
#83869
Author: Russ Allbery
Date: Thu, 10 Feb 2011 02:08
61 lines
3428 bytes
"John F. Morse" <john@example.invalid> writes:
> Russ Allbery wrote:

>> Are you sure that it's a duplicate copy?  It should be a hard link (and
>> hence will not take up any additional space).

> Yes, I am sure.

> These are separate directories and separate files. No linking involved.

Do you know what to look for to see whether it's a hard link?  I ask
because neither of the things you said above (separate directories and
separate files) indicate that it's not a hard link, so I'm not certain if
you know what you're looking at.

> Poison wildmats would be a major undertaking since it is not known which
> groups might be crossposted.

But you know what groups you want to store in CNFS, so you can poison all
of those.

> Also, wouldn't a poisoned group never be accepted - anywhere?

Your storage.conf configuration doesn't have anything to do with what
newsgroups you accept.

> "Poison wildmat expressions (expressions starting with "@") are allowed
> and can be used to exclude certain group patterns:  articles crossposted
> to poisoned newsgroups will not be stored using this storage method.
> The <wildmat> pattern is matched in order."

> If I'm dense here, please give me an example using the two local groups I
> provided in my report.

method tradspool {
    newsgroups: local.*,@local.binaries
    class: 0
}

If you actually accept crossposts between your local.* hierarchy and other
non-local groups (not recommended), you can use something like:

method tradspool {
    newsgroups: @*,local.*,@local.binaries
    class: 0
}

to poison all non-local.* groups.

> Rearranging the storage.conf listing is not feasible due to the final
> "*" wildcard used for CNFS groups not listed elsewhere.

Yes, if you want CNFS to be your catch-all, you need to use poison
patterns instead if you want to exclude some groups from your tradspool
configuration.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: CNFS articles going into tradspool directories
#83864
Author: John F. Morse
Date: Thu, 10 Feb 2011 19:05
95 lines
3890 bytes
Russ Allbery wrote:

> Do you know what to look for to see whether it's a hard link?  I ask
> because neither of the things you said above (separate directories and
> separate files) indicate that it's not a hard link, so I'm not certain if
> you know what you're looking at.
>   


The inode number.

"ls -i" or "stat" provides the information.

The inode is identical.

So, would the tradspool file be deleted when the CNFS buffer rolled 
around at some future date?

I don't think so since it is a hard link, but I've been known to make 
errors. ;-)


> But you know what groups you want to store in CNFS, so you can poison all
> of those.
>   
>> Also, wouldn't a poisoned group never be accepted - anywhere?
>>     
>
> Your storage.conf configuration doesn't have anything to do with what
> newsgroups you accept.
>   


OK. "Accept and store" then. ;-)


>> "Poison wildmat expressions (expressions starting with "@") are allowed
>> and can be used to exclude certain group patterns:  articles crossposted
>> to poisoned newsgroups will not be stored using this storage method.
>> The <wildmat> pattern is matched in order."
>>     
>
>   
>> If I'm dense here, please give me an example using the two local groups I
>> provided in my report.
>>     
>
> method tradspool {
>     newsgroups: local.*,@local.binaries
>     class: 0
> }
>   


Easy enough, and applied. Tests OK. Thanks.

Wouldn't the ! work just as good?


> If you actually accept crossposts between your local.* hierarchy and other
> non-local groups (not recommended), you can use something like:
>
> method tradspool {
>     newsgroups: @*,local.*,@local.binaries
>     class: 0
> }
>
> to poison all non-local.* groups.
>   


I don't, but I'll file this for future reference. Thanks


>> Rearranging the storage.conf listing is not feasible due to the final
>> "*" wildcard used for CNFS groups not listed elsewhere.
>>     
>
> Yes, if you want CNFS to be your catch-all, you need to use poison
> patterns instead if you want to exclude some groups from your tradspool
> configuration.


The actual used-to-be final "*" in CNFS storage.conf had to be changed 
to "*,!junk" because the junk class was added at a later date below the 
"*" catch-all.

I suppose I could move junk up one stanza, and then remove the ! from * 
and it would work.


-- 
John

When a person has -- whether they knew it or not -- already rejected the Truth, by what means do they discern a lie?
Re: CNFS articles going into tradspool directories
#83856
Author: Russ Allbery
Date: Thu, 10 Feb 2011 22:27
44 lines
2709 bytes
"John F. Morse" <john@example.invalid> writes:

> The inode number.

> "ls -i" or "stat" provides the information.

> The inode is identical.

Okay, good, so it is a hard link.  (The hard link count in ls -l output is
usually also good enough.)

> So, would the tradspool file be deleted when the CNFS buffer rolled
> around at some future date?

No, I doubt that the article is stored in CNFS at all.  It's probably only
stored in tradspool.  Generally INN tries to put articles in one and only
one storage backend.

>> method tradspool {
>>     newsgroups: local.*,@local.binaries
>>     class: 0
>> }

> Easy enough, and applied. Tests OK. Thanks.

> Wouldn't the ! work just as good?

! wouldn't exclude from tradspool articles that are crossposted between
your local non-binary groups and local.binaries.

> The actual used-to-be final "*" in CNFS storage.conf had to be changed
> to "*,!junk" because the junk class was added at a later date below the
> "*" catch-all.

> I suppose I could move junk up one stanza, and then remove the ! from *
> and it would work.

Yup, either way works.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads