Re: choosing a file system

2009-01-09 Thread Janne Peltonen
On Thu, Jan 08, 2009 at 08:01:04AM -0800, Vincent Fox wrote:
 (Summary of filesystem discussion)
 
 You left out ZFS.
 
 Sometimes Linux admins remind me of Windows admins.

I didn't.

--clip--
Btrfs is in so early development that I don't know yet what to say about
it, but the fact of ZFS's being incompatible with GPL might be mitigated
by this.
--clip--

 I have adminned a half-dozen UNIX variants professionally but
 keep running into admins who only do ONE and for whom every
 problem is solved with how can I do this with one OS only?

So have I. But in the current Cyrus installation, I'm stuck with Linux,
so I concentrated on what's available on Linux. Moreover, I don't want
to use non-free operating systems - if anything, I've become more
ideological with age... I'd happily use /any/ free unix variant that ran
ZFS, but.

 Dark Ages now for terabytes of mail volume I'd throw a professional fit.
 Even the idea that I need to tune my filesystem for inodes and to avoid it
 wanting to fsck on reboot #20 or whatever seems like caveman discussion.
 Any of them offer cheap and nearly-instant snapshots  online scrubbing?
 No?  Then why use it for large number of files of important nature?

Because there isn't a free FS that does those things (yet). And there
are free systems that do enough...

 I love Linux, I surely do.  Virtually everything of an appliance nature here
 will probably shift over to it in the long run I think and for good reasons.
 But filesystem is one area where the bazaar model has fallen into a very
 deep rut and can't muster energy to climb out.

Really? Btrfs /does/ appear promising to me. I might be wrong, though.

 So far ZFS ticking along with no problems and low iostat numbers
 with everything in one big pool.  I have separate fs for data, imap, mail
 but haven't seen any need to carve mail spool into chunks at all.
 There were initial problems noted here in the mailing lists way back
 in Solaris 10u3 but that was solved with the fsync patch and since then
 it's been like butter.  Mail-store systems nobody ever needs to look
 at them because it just works.

Well, that's nice. It's a shame they made it GPL-incompatible.


BR
-- 
Janne Peltonen janne.pelto...@helsinki.fi PGP Key ID: 0x9CFAC88B
Please consider membership of the Hospitality Club 
(http://www.hospitalityclub.org)

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: choosing a file system

2009-01-09 Thread Bron Gondwana
On Thu, Jan 08, 2009 at 10:13:25PM -0800, Robert Banz wrote:

 There's a significant upfront cost to learning a whole new system
 for one killer feature, especially if it comes along with signifiant
 regressions in lots of other features (like a non-sucky userland
 out of the box).

 The non-sucky userland comment is simply a matter of preference, and  
 bait for a religious war, which I'm not going to bite.

Well, yeah.  Point.  Though most Solaris admins I know tend to pull in
gnu or bsd utilities pretty quickly.  I'll take that one back, it was
baity.

 What I will say is that switching between Solaris, Linux, IRIX, Ultrix, 
 FreeBSD, HP-UX, OSF/1 -- any *nix variant, should not be considered a 
 stumbling block. Your comment shows the narrow-mindedness of the current 
 Linux culture, many of us were brought up supporting and using a 
 collection of these platforms at any one time.

There's a switching cost, particularly if you don't have any experience
with a new system.  You have to consider that cost when making an
upgrade choice.  I agree that ZFS is better than anything currently
available on Linux - but the question is does that outweight the 
disadvantages of learning and supporting a new platform?.

There are basically two worthwhile things on Solaris: ZFS and DTrace.
Other things - fork behaviour caused us pain recently, it's just not
as cheap as on Linux, and forking from a big process caused lots of
swapping because even though it was execing pretty quickly, it had
to commit the memory first.  Oops.  There are downsides to Linux's
overcommit, but having to add complexity to our backup manager
because forking for every backup was too expensive was annoying.

(I do take offence to being considered narrow minded for not blindly
following the latest fashion and wanting to switch everything over to
Solaris because it has the latest bling - I've considered it, but the
numbers just don't add up.  We have something that works, is reliable
and is fast.  Our redundancy is just at a different level)

Hey - back on topic for cyrus.  We store sha1s of message files in
the index file now.  We don't have checksums on index files (yet, I
have crc32 patches half finished somewhere), but we're at a point
where userland scrubs are possible.  Along with replication, you can
restore any damaged file from the replica.  Actually, with out backup
system, you can even pull the original file from the backup, knowing
its sha1 because it gets recalculated again and checked during the
backup phase.

 (notice, didn't mention AIX. I've got my standards ;)

Hey - I have a friend who _likes_ AIX.  There are odd people in the
world.

 Patching is always an issue on any OS, and you do have the choice of  
 running X applications remotely (booting an entire graphic  
 environment!?), and many other tools available such as pca to help you  
 patch on Solaris, which provide many of the features that you're used  
 to.

I take it you haven't run X applications remotely from the other side of
the world before?  I'd hardly call it running.  Crawling maybe.

My current approach is to run up an vncserver on a box in the same colo
and run X applications remotely to there.  It's significantly less
painful, and also gives me a place to run an iceweasel to talk to the
web interfaces of things things that won't talk to me any other way.
Uploading firmware via the web from locally is similarly less sucky
than pushing it out from Australia.

And I'm seeing there are quite a few third party tools that people have
written to ease the pain of patch management on Solaris (I believe it's
actually one of the nicer unixes to manage patches on, but when you're
used to apt-get, there's a whole world of WTFery in manually downloading
and applying patch sets - especially when you get permission denied on
a bunch of things that the tool has just suggested as being missing)

In short - I'm not sold on the value to FastMail of at least two of us
(bus factor) learning to maintain Solaris to the level that we'd want
for running something so core to our operations as the IMAP servers.

Bron ( happy to either stop the flamewar or take it off list at this
   point.  I don't think we're contributing anything meaningful
   any more )

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Delete an user + virtual domains

2009-01-09 Thread Laurent Archambault
Hello,

With this values in imap.conf : virtdomains: yes + unixhierarchysep: yes
(do after for it).
- In this directory : /var/spool/cyrus/mail/domain/d/domaine2.com
- I have for this an user this structural directory ... (for me it's strange
but i don't known all)

*./Sent/l/user/laurent^amt
./Sent/l/user/laurent^amt/cyrus.cache
./Sent/l/user/laurent^amt/cyrus.index
./Sent/l/user/laurent^amt/cyrus.squat
./Sent/l/user/laurent^amt/cyrus.header
./l/user/laurent^amt
./l/user/laurent^amt/cyrus.cache
./l/user/laurent^amt/cyrus.index
./l/user/laurent^amt/cyrus.squat
./l/user/laurent^amt/cyrus.header
./Drafts/l/user/laurent^amt
./Drafts/l/user/laurent^amt/cyrus.cache
./Drafts/l/user/laurent^amt/cyrus.index
./Drafts/l/user/laurent^amt/cyrus.squat
./Drafts/l/user/laurent^amt/cyrus.header
./Trash/l/user/laurent^amt
./Trash/l/user/laurent^amt/cyrus.cache
./Trash/l/user/laurent^amt/cyrus.index
./Trash/l/user/laurent^amt/cyrus.squat
./Trash/l/user/laurent^amt/cyrus.header
./Junk/l/user/laurent^amt
./Junk/l/user/laurent^amt/cyrus.cache
./Junk/l/user/laurent^amt/cyrus.index
./Junk/l/user/laurent^amt/cyrus.squat
./Junk/l/user/laurent^amt/cyrus.header
*
With this structure, Cyrus run perfectly... but when i want to delete an
mailbox (or account), its not clean for me ...
*./cyrus-admin.pl -u cyrus -p secret -m laurent@domaine2.com --delete
Mailbox:define acl lrswipkxtecda for user/laurent@domaine2.com by cyrus
Deleted Mailbox: user/laurent@domaine2.com
*
And now i read my structural Cyrus and i can see this :
*just lhis line ./l/user/laurent^amt* is not present or deleted ... i can
see almost all ...
- And it's similar with cyradm 

./Sent/l/user/laurent^amt
./Sent/l/user/laurent^amt/cyrus.cache
./Sent/l/user/laurent^amt/cyrus.index
./Sent/l/user/laurent^amt/cyrus.squat
./Sent/l/user/laurent^amt/cyrus.header
./Drafts/l/user/laurent^amt
./Drafts/l/user/laurent^amt/cyrus.cache
./Drafts/l/user/laurent^amt/cyrus.index
./Drafts/l/user/laurent^amt/cyrus.squat
./Drafts/l/user/laurent^amt/cyrus.header
./Trash/l/user/laurent^amt
./Trash/l/user/laurent^amt/cyrus.cache
./Trash/l/user/laurent^amt/cyrus.index
./Trash/l/user/laurent^amt/cyrus.squat
./Trash/l/user/laurent^amt/cyrus.header
./Junk/l/user/laurent^amt
./Junk/l/user/laurent^amt/cyrus.cache
./Junk/l/user/laurent^amt/cyrus.index
./Junk/l/user/laurent^amt/cyrus.squat
./Junk/l/user/laurent^amt/cyrus.header

Thanks a lot ... where is my error ..
-- 
~o00o-//{ ´°`(_)´°` }\\-o00o~--

  Laurent Archambault
   Under Linux

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

Re: choosing a file system

2009-01-09 Thread Nic Bernstein

On 01/09/2009 12:59 AM, Bron Gondwana wrote:

On Thu, Jan 08, 2009 at 10:13:25PM -0800, Robert Banz wrote:
  

There's a significant upfront cost to learning a whole new system
for one killer feature, especially if it comes along with signifiant
regressions in lots of other features (like a non-sucky userland
out of the box).
  
The non-sucky userland comment is simply a matter of preference, and  
bait for a religious war, which I'm not going to bite.



Well, yeah.  Point.  Though most Solaris admins I know tend to pull in
gnu or bsd utilities pretty quickly.  I'll take that one back, it was
baity.
  
So at the risk of entering into a flame war, I must say I am surprised 
that no one has mentioned Nexenta/OS.

   http://www.nexenta.org/os
They have bolted the Ubuntu/Debian userland onto OpenSolaris to give the 
Linux lovers out there a linuxy experience with access to all of that 
shiny new Solaris bling, such as zfs and dtrace.  You may want to give 
it a look-see.


Patching is always an issue on any OS, and you do have the choice of  
running X applications remotely (booting an entire graphic  
environment!?), and many other tools available such as pca to help you  
patch on Solaris, which provide many of the features that you're used  
to.


SNIP

And I'm seeing there are quite a few third party tools that people have
written to ease the pain of patch management on Solaris (I believe it's
actually one of the nicer unixes to manage patches on, but when you're
used to apt-get, there's a whole world of WTFery in manually downloading
and applying patch sets - especially when you get permission denied on
a bunch of things that the tool has just suggested as being missing)
  

Oh yeah, apt-get included.

Cheers,
   -nic

PS - This has been a very interesting thread to read.  Some of us just 
don't have the exposure to large systems like the participants in this 
thread have, and this can be very educational.


--
Nic Bernstein n...@onlight.com
Onlight llc.  www.onlight.com
2266 North Prospect Avenue #610   v. 414.272.4477
Milwaukee, Wisconsin  53202-6306  f. 414.290.0335


Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

Re: choosing a file system

2009-01-09 Thread Dave McMurtrie
Nic Bernstein wrote:

 PS - This has been a very interesting thread to read.  Some of us just 
 don't have the exposure to large systems like the participants in this 
 thread have, and this can be very educational.

It's actually been helpful to us, as well.

All of our mail backends are currently Solaris with SAN storage using 
vxfs.  We're considering a move to Linux, but which filesystem to choose 
is still a major unanswered question for us.

After reading this entire thread, it makes me realize that I've been 
taking vxfs for granted.  It's been rock solid and the performance is fine.

Thanks,

Dave
-- 
Dave McMurtrie, SPE
Email Systems Team Leader
Carnegie Mellon University,
Computing Services

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: choosing a file system

2009-01-09 Thread Martin Wendel
Bron Gondwana wrote:
 On Thu, Jan 08, 2009 at 10:13:25PM -0800, Robert Banz wrote:

 (notice, didn't mention AIX. I've got my standards ;)
 
 Hey - I have a friend who _likes_ AIX.  There are odd people in the
 world.

We at Uppsala university have been running cyrus on AIX for a little more than 
10
years. Back then, there was no acceptable alternative to the AIX LVM. AIX still 
is,
as I see it, very competent when it comes to handling disk I/O. About three 
years
ago I thought time was ready for running cyrus on a shared file system. We had a
large installation of IBM SANFS on another system that at the time was 
performing
well. We purchased SANFS and four RS/6000 servers for cyrus and needed to take 
it
in production rather abruptly after a filesystem crash on the old cyrus server.

However time was not quite ready for running cyrus on SANFS. After about two 
years
of SANFS problems (although at no time did SANFS get corrupt, it was very stable
but just could not handle the load. Sometimes we needed to restart the 
filesystem
several times a week) we decided to follow the examples published on this list 
by the
FastMail guys. I did not dare to go with GPFS when SANFS was discontinued.

We've since splitted our 20 million cyrus files onto eight IBM blade servers, 
running
AIX virtualization server handling SAN connections for the 6 virtual RedHat 
servers
running on each of them. We run one cyrus instance on each RedHat server, 3 
primary
servers and 3 replicas on each blade. We thus have 24 primary servers, and 24 
replicas,
with about 1 million cyrus files each.

We did some tests on which file system to choose but there were not that much 
difference
so we decided on ext3.

We also have 4 additional blades running Debian, 2 for LVS and 2 for Nginx, and 
about
10TB of SAN disk area dedicated to cyrus. The system has been running very 
nicely for six
months now.

So I guess this is a success story inspired by FastMail. But I still would not 
choose
anything other than AIX for our TSM servers.




Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: choosing a file system

2009-01-09 Thread Scott Lambert
On Fri, Jan 09, 2009 at 10:54:10AM +0200, Janne Peltonen wrote:
 So have I. But in the current Cyrus installation, I'm stuck with Linux,
 so I concentrated on what's available on Linux. Moreover, I don't want
 to use non-free operating systems - if anything, I've become more
 ideological with age... I'd happily use /any/ free unix variant that ran
 ZFS, but.

Well, fire up your test environment and start playing with FreeBSD.  ZFS
and DTrace and free.  The better ZFS is in 8-CURRENT.  Apparently,
you have to tweak things a bit on 7-STABLE still.  But, by the time you
(third person non-specific) get comfortable with not Linux 8 may be
-STABLE.

-- 
Scott LambertKC5MLE   Unix SysAdmin
lamb...@lambertfam.org


Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: choosing a file system

2009-01-09 Thread Janne Peltonen
On Fri, Jan 09, 2009 at 08:41:38AM -0600, Scott Lambert wrote:
 On Fri, Jan 09, 2009 at 10:54:10AM +0200, Janne Peltonen wrote:
  So have I. But in the current Cyrus installation, I'm stuck with Linux,
  so I concentrated on what's available on Linux. Moreover, I don't want
  to use non-free operating systems - if anything, I've become more
  ideological with age... I'd happily use /any/ free unix variant that ran
  ZFS, but.
 
 Well, fire up your test environment and start playing with FreeBSD.  ZFS
 and DTrace and free.  The better ZFS is in 8-CURRENT.  Apparently,
 you have to tweak things a bit on 7-STABLE still.  But, by the time you
 (third person non-specific) get comfortable with not Linux 8 may be
 -STABLE.

OK, I was oversimplifying things. ZFS isn't actually non-free as such,
it's just GPL-incompatible.

And the but above did include quite a lot of things, like for instance
us being committed to red hat / centos. If I haven't been able to even
alter the Linux distribution here, just how hard would you think it'd be
to try altering the unix variant... For example, one thing is, our SAN
vendor says their product supports Red Hat, and I'm already treading
over thin ice by using Centos.

I've even been playing a little with userland ZFS, but it's far from
usable in production (was a nice little toy. though, and a /lot/ faster
than could be believed).

I think other points concerning why not to change to another OS
completely for the benefits available in ZFS were already covered by
Bron, so I'm not going to waste bandwidth any more with this matter. :)


--Janne
-- 
Janne Peltonen janne.pelto...@helsinki.fi PGP Key ID: 0x9CFAC88B
Please consider membership of the Hospitality Club 
(http://www.hospitalityclub.org)

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: 32-bit to 64-bit migration seen flags

2009-01-09 Thread Wesley Craig
How are you copying?

:wes

On 09 Jan 2009, at 01:47, ram wrote:
 I am migrating mailboxes from a 32 bit cyrus (cyrus-2.3.7) to a 64 bit
 cyrus (2.3.13) server

 When I copy the mailbox seen flags(skiplist) from the 32 bit server to
 the 64 bit servers it does not work. All the mails are flagged as  
 unseen
 on the new server

 Is there a way I can migrate the seen flags

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: howto list inactive users in cyrus:

2009-01-09 Thread Blake Hudson
 Original Message  
Subject: Re: howto list inactive users in cyrus:
From: Chris Conn cc...@abacom.com
To: Blake Hudson bl...@ispn.net
Date: Friday, January 09, 2009 10:38:38 AM
 Blake Hudson wrote:
 I brought this subject up on the list a few times over the years and
 never received any interest in updating cyradm/fud to report on the
 last pop(login) date correctly.

 Rather than try to fix cyrus myself, I decided to write my own script
 which tails the mail log and looks for successful pop/imap/smtp
 logins and updates our user sql database with the current time and IP
 the user used to access his or her account.

 If someone were interested in fixing this feature of cyrus it would
 be great.

 -Blake

 Hello,

 You wouldn't care to post this script to the list or to share the loop
 you use to extract that information from the log?  I am currently
 looking to work on one and if you don't mind I'd appreciate the
 timesaver.

 Thanks in advance,

 Chris

This is accomplished via two scripts. First, a shell script that starts,
monitors, and restarts the process that pipes input to the actual
logging script. And second, the script that gets data from stdin and
puts that data into sql. Once the data is in sql, we can do a number of
operations to classify users as active or inactive based on the last
login or other criteria we already track in sql.

login-runner.sh
---
#!/bin/sh
#
# login-runner.sh
#
# Checks for running login-runner, if none starts a tail of the maillog
# that outputs pop/imap logins to login2sql.php which puts the data into
a db.
#

l2sLOG=/var/log/someLogFile.log
l2sRCP=monitoring-addr...@somedomain.com
l2sPIDS=`ps ax | grep -v grep | grep '/usr/bin/php ./login2sql.php' |
awk '{print $1}'`

if [ $l2sPIDS !=  ]; then
COUNT=`echo $l2sPIDS | wc -w | tr -d  `
  else
COUNT=0
fi


if [ $COUNT -lt 1 ]; then
STAMP=`date +%m/%d/%y %H:%M:%S`
ALERT=$COUNT processes.  Restarting login2sql.
echo $STAMP`basename $0`:  $ALERT  $l2sLOG
if [ $l2sRCP !=  ]; then
  echo `basename $0`:  $ALERT | mail -s login2sql Restarted $l2sRCP
fi
#kill $PIDS 2/dev/null;

tail -F /var/log/maillog | grep ': login:' | awk -F ']' '{print $2
$3}' | awk -F '[' '{print $2 $3}' | awk '{print $1,$2}'| ./login2sql.php

else
echo $COUNT processes already running. Exiting...
fi
---


login2sql.php
---
#!/usr/bin/php
?php
/*
Takes data from stdin and writes it to MySQL database.
Expects data in format ip emailAddress ex:
1.2.3.4 b...@bob.com
1.2.3.5 bi...@billy.com
*/

if(!defined(STDIN))
{
define(STDIN, fopen('php://stdin','r'));
}

mysql_connect($server,$user,$pass) or die (Couldn't connect to MySQL
server...);
mysql_select_db($db) or die(Database not available...);
while(!feof(STDIN))
{
$array = explode( ,trim(fgets(STDIN, 128)));
if($ip = $array['0'] and $email = $array['1'])
{
$ip = mysql_real_escape_string($ip);
$email = mysql_real_escape_string($email);
mysql_query(update mailbox set last=now(), ip='$ip'
where email='$email') or die(Query Failed!);
echo Updated $email - $ip\n;
}
}

mysql_close();
die(Ran out of input...);

?
---

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html