lstat() failed on: /mnt/ramdisk/...

Julian Field MailScanner at ecs.soton.ac.uk
Thu Jun 25 18:01:10 IST 2009


I would double-check all the permissions down the /mnt/ramdisk tree, and 
do a MailScanner --lint to see if that succeeds or not. Are you using 
clamd? If so, you have to set your permissions carefully, both in the 
filesystem and in MailScanner.conf. It's all documented in there. If 
they are wrong, MailScanner --lint won't find the EICAR test pattern 
with all of your virus scanners.

tmpfs is much better. You say it never gets above about 5% full. That 
means you are constantly wasting 950 MB of your RAM that could be used 
for better things such as disk cache!

The change to tmpfs is very simple, just change the /etc/fstab line for 
/mnt/ramdisk so it references 'tmpfs' instead of 'ramdiskfs' or whatever 
it uses now. Then stop MailScanner, umount /mnt/ramdisk, mount 
/mnt/ramdisk, double check the permissions are what you want and start 
MailScanner again. 30 second job.

Jules.

On 25/06/2009 15:32, Dave Jones wrote:
>> Dave
>>
>> is the /mnt/ramdisk the actual mount point or merely a symbolic link.
>> MailScanner needs the actual proper path and not a sym link to it.
>>
>> 2009/6/24 Scott Silva<ssilva at sgvwater.com>
>>
>>      
>>> on 6-24-2009 5:04 AM Dave Jones spake the following:
>>>        
>>>> lstat() failed on: /mnt/ramdisk/31166/n5NC95S6028227/tnef.31166
>>>>
>>>> I get thousands of these messages in my logwatch report daily.  My
>>>> permissions are correct in the dir and conf.
>>>>
>>>> MailScanner.conf:
>>>> -----------------------------
>>>> Quarantine Permissions = 0660
>>>> Incoming Work Dir = /mnt/ramdisk
>>>> SpamAssassin Cache Database File = /mnt/ramdisk/SpamAssassin.cache.db
>>>> SpamAssassin Temporary Dir = /mnt/ramdisk/SpamAssassin-Temp
>>>>
>>>> # ll -d /mnt/ramdisk
>>>> drwxrwsr-x 19 root clamav 4096 Jun 24 07:53 /mnt/ramdisk
>>>>
>>>> This is happening on all 3 systems that use a ramdisk.  Other
>>>> non-ramdisk MS servers are fine.
>>>>
>>>> I am seeing subdirs like "31166" under /mnt/ramdisk that are empty.
>>>> Is there a conf setting that needs to match the "Incoming Work Dir" so
>>>> the TNEF will use the same location or something like this?
>>>>          
>>> How do you have the ramdisks created? Maybe they are running out of space.
>>> Most people use tmpfs, as it can grow into the swap if it overflows.
>>>        
> # mount | grep ram
> /dev/ram0 on /mnt/ramdisk type ext2 (rw)
> # df -H | grep ram
> /dev/ram0              1.1G    26M   983M   3% /mnt/ramdisk
>
> I have 1 GB allocated to the ramdisk and never see it get more than
> 3 to 5 percent used.
>
> We have plans to add 2 MailScanner servers in a few months and we will
> build these with tempfs now that I understand that tempfs is better.
> At that time, we were going to switch the existing MailScanner servers
> to tempfs but if you think the ramdisk is the problem, then I could do
> the switch now.
>
> It seems like this was working perfectly until 4 or 5 months ago, possibly
> coinciding when I did a MailScanner upgrade but I am not sure.  The servers
> have been in place for about 18+ months using the ramdisk I an know the
> lstat errors just started this year without any major changes to the
> MailScanner.conf.
>
>    

Jules

-- 
Julian Field MEng CITP CEng
www.MailScanner.info
Buy the MailScanner book at www.MailScanner.info/store
Follow me at twitter.com/JulesFM

MailScanner customisation, or any advanced system administration help?
Contact me at Jules at Jules.FM

PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
PGP public key: http://www.jules.fm/julesfm.asc


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the MailScanner mailing list