forked from hachi/MogileFS-Server
/
mogilefsd
executable file
·107 lines (65 loc) · 2.07 KB
/
mogilefsd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
#!/usr/bin/perl
#
# MogileFS daemon
#
# Copyright 2004, Danga Interactive
# Copyright 2005-2006, Six Apart Ltd.
#
# See POD at bottom.
use strict;
use warnings;
use lib 'lib';
use MogileFS::Server;
# Rename binary in process list to make init scripts saner
$0 = "mogilefsd";
my $s = MogileFS::Server->server;
$s->run;
1;
# Local Variables:
# mode: perl
# c-basic-indent: 4
# indent-tabs-mode: nil
# End:
__END__
=head1 NAME
mogilefsd -- MogileFS tracker daemon
=head1 USAGE
This is the main MogileFS daemon, mogilefsd, also called the
"tracker". All interaction with a MogileFS installation begins by a
client talking to a tracker (you should run several in parallel for
redundancy).
See L<MogileFS::Client> for a client library.
=head1 ARCHITECTURE
=head2 Processes
The mogilefsd daemon is an event-loop in the parent process, handling
with epoll/kqueue/etc (see L<Danga::Socket>) tons of client
connections, while managing a bunch of worker processes underneath.
The worker processes under mogilefsd include:
=over 4
=item B<Client query processing> -- implements the MogileFS client/server protocol
See L<MogileFS::Worker::Query>.
=item B<Monitoring> -- monitors hosts and devices
See L<MogileFS::Worker::Monitor>.
=item B<Replicate> -- replicates files
See L<MogileFS::Worker::Replicate>.
=item B<Deleter> -- deletes files from storage nodes (protocol deletes from namespace are immediate)
See L<MogileFS::Worker::Delete>.
=item B<Reaper> -- re-enqueues files for replication when disks are marked dead
See L<MogileFS::Worker::Reaper>.
=item B<Checker/Fsck> -- background filesystem consistency checker
See L<MogileFS::Worker::Checker>.
=back
=head2 Data Storage
See L<MogileFS::Store>.
=head1 AUTHORS
Brad Fitzpatrick E<lt>brad@danga.comE<gt>
Mark Smith E<lt>junior@danga.comE<gt>
Brad Whitaker E<lt>whitaker@danga.comE<gt>
=head1 COPYRIGHT
Copyright 2004, Danga Interactive
Copyright 2005-2006, Six Apart Ltd.
=head1 LICENSE
Same terms as Perl itself. Artistic/GPLv2, at your choosing.
=head1 SEE ALSO
L<mogstored> -- MogileFS storage daemon
L<http://danga.com/mogilefs/>