浏览 3037 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
|
|
---|---|
作者 | 正文 |
发表时间:2012-12-01
There are some technical restrictions regarding where you can run a shared file system master/slave configuration. The shared file system requires the semantics of a distributed shared file lock. So if you’re not using a storage area network (SAN), there are some alternatives such as Network File System (NFS)—available on Mac OS X, OpenVMS, Microsoft Windows (from third parties), Solaris, and AS/400. If you’re using Fedora or RedHat Enterprise (5.3 and above), it’s recommended you use the Global File System (GFS) 2, which requires a cluster locking protocol, such as dlm, the distributed lock manager, which is a Linux kernel module. 请问大家都使用的是哪些shared file system? 声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |
发表时间:2012-12-01
参考http://activemq.apache.org/shared-file-system-master-slave.html中的提示:
Ensure your shared file locks work Note that the requirements of this failover system are a distributed file system like a SAN for which exclusive file locks work reliably. If you do not have such a thing available then consider using MasterSlave instead which implements something similar but working on commodity hardware using local file systems which ActiveMQ does the replication. OCFS2 Warning Was testing using OCFS2 and both brokers thought they had the master lock - this is because "OCFS2 only supports locking with 'fcntl' and not 'lockf and flock', therefore mutex file locking from Java isn't supported." From http://sources.redhat.com/cluster/faq.html#gfs_vs_ocfs2 : OCFS2: No cluster-aware flock or POSIX locks GFS: Cluster-wide flocks and POSIX locks NFSv3 Warning In the event of an abnormal NFSv3 client termination (i.e., the ActiveMQ master broker), the NFSv3 server will not timeout the lock that is held by that client. This effectively renders the ActiveMQ data directory inaccessible because the ActiveMQ slave broker can't acquire the lock and therefore cannot start up. The only solution to this predicament with NFSv3 is to reboot all ActiveMQ instances to reset everything. Use of NFSv4 is another solution because it's design includes timeouts for locks. When using NFSv4 and the client holding the lock experiences an abnormal termination, by design, the lock is released after 30 seconds, allowing another client to grab the lock. For more information about this, see this blog entry. 可以尝试GFS和NFSv4,查了下资料,NFSv4 的方式比较简单。但是没有做实验。 |
|
返回顶楼 | |
发表时间:2013-01-01
做了个简单的例子http://harbey.iteye.com/admin/blogs/1756607
|
|
返回顶楼 | |