Python论坛  - 讨论区

标题:[python-chinese] Linux 文件系统近实时镜像工具及其高可用应用, Python 实现

2007年10月17日 星期三 11:00

Roc Zhou chowroc.z+l在gmail.com
星期三 十月 17 11:00:38 HKT 2007

ÕâÊÇÎÒ×î½üÔÚ×öµÄÒ»¸ö¿ªÔ´ÏîÄ¿£¬·ÅÔÚ sourceforge ÉÏÃæÁË¡£¿ÉÒÔ´ÓÕâÀïÕÒµ½²¢ÏÂÔØ£º
https://sourceforge.net/projects/crablfs/

Ïà¹ØµÄÎĵµ¿ÉÒÔÔÚ£º
http://crablfs.sourceforge.net/
ÕÒµ½¡£ÆäÖÐÓëÎļþϵͳʵʱ¾µÏñÓйصIJ¿·ÖÔÚ£º
http://crablfs.sourceforge.net/#ru_data_man

Õâ¸öÏîÄ¿ÊÇÁíÒ»¸öÏîÄ¿µÄÒ»¸ö×ÓÏîÄ¿£¬Æä×îÖÕÄ¿±ê£¬ÎÒÏëÊÇ×öÒ»¸öÒ×¹ÜÀíµÄ»ùÓÚ LFS µÄ·¢Ðа棬ËùÒÔÁíÍ⻹ÓÐÁ½¸ö×ÓÏîÄ¿¡£ÆäÖÐÖ®Ò»ÊÇÎÒÒÔÇ°ÔÚ LinuxSir
ÂÛ̳ÉÏ·¢¹ýµÄÒ»¸ö"»ùÓÚÓû§µÄ°ü¹ÜÀíϵͳ"£º
http://www.linuxsir.org/bbs/showthread.php?t=277172
Ö¼ÔÚΪ´ÓÔ´´úÂë±àÒëµÄÈí¼þ°üÌṩһÖÖ·½±ã°²È«µÄ°ü¹ÜÀí·½Ê½£¬ÀýÈçËüÌṩ½»»¥Ä£Ê½£¬ÔÚ½»»¥Ä£Ê½Ï¿ÉÒÔ°´ÕÕ°²×° LFS
µÄ·½Ê½Ò»²½²½½øÐУ¬ÕâÑù±£ÁôÁËѧϰµÄ¹ý³Ì£»¶øÔÚ½»»¥Ä£Ê½ÏÂÊäÈëµÄ°²×°Ö¸Áî¿ÉÒÔ×Ô¶¯¼Ç¼£¬²¢Ôڷǽ»»¥Ä£Ê½ÏÂ×Ô¶¯ÔËÐУ¬±£ÁôÕâЩģ°åÎļþ£¬¾ÍµÃµ½ÁËÒ»¸öÄã×Ô¼º
µÄ¶¨ÖÆ·¢Ïְ棬²¢ÇÒÊǺÍÓ²¼þƽ̨Î޹صÄ(×îÖÕÄ¿±êÈç´Ë£¬µ±È»Öм仹ÊÇ»áÓÐЩСÀ§ÄÑ£¬²»¹ýÓ¦¸Ã²»ÄÑ¿Ë·þ)¡£

¶øÕâ¸öÏîÄ¿£¬ÊÇΪÁËÌṩһЩ·½±ãϵͳ¹ÜÀíµÄ¹¤¾ß¼¯£¬±ÈÈ籸·ÝµÈ¡£ÔÚÕâÀÎÒÒªÌÖÂ۵ľÍÊÇÒ»ÖÖ±¸·Ý·½Ê½£ºÊµÊ±¾µÏñ¼ÓÂÖת¡£ÕâÀÂǵÄÖ÷ÒªÊÇÈíÓ²¼þ×ÊÔ´±È½ÏÓÐÏÞµÄÇé¿ö(Çîѽ)£¬ÊÇÒ»ÖֱȽϾ­¼ÃµÄ½â¾ö˼·£¬Èç¹ûÄãÓÐÇ®£¬Ê¹ÓÃÉÌÒµµÄÕóÁкÍÈí¼þÒ²Ðí¸üºÃ¡£

µ±È»£¬ËùÓÐÕâЩ¹¤¾ß¼¯£¬°üÀ¨Ç°ÃæµÄ°ü¹ÜÀíÆ÷£¬Æäʵµ±È»Ò²¿ÉÒÔÓÃÔÚÆäËûÈκη¢ÐаæÉÏÃ棬±ÈÈçÎÒ¾ÍÔÚ×Ô¼ºµÄ RHEL4 µÄ»·¾³ÖÐÓ¦ÓÃÁËÕâЩ¹¤¾ß¡£

ËùÌṩµÄÎĵµ¶¼ÊÇÓ¢Îĵģ¬ÔÚ´úÂëÖеÄ×¢ÊͺÍÄÚ²¿ÎĵµÒ²ÊÇÓ¢Îĵģ¬ÒòΪÔÚÒ»¿ªÊ¼±àдµÄʱºò£¬ÒªÔÚ²»Í¬µÄ»úÆ÷ÉϹ¤×÷£¬ÎÒ×Ô¼ºµÄ LFS ϵͳûÓÐ¼Ó GBK
Ö§³Ö£¬ÀÏÊdzöÂÒÂë¡£¶øÇÒÖÐÎıàÂë±¾À´¾ÍÊǸöÀÏ´óÄѵÄÎÊÌâÁË£¬ÎÒ×Ô¼ºÒ²ÓÐЩ²»Í¬µÄÏë·¨£¬ËùÒÔË÷ÐÔдӢÎĵģ¬ÔÚ·­ÒëÖÐÎÄÎĵµ£¬²¢ÀûÓà gettext
´¦ÀíÄÚ²¿Îĵµ£¬Ò»·½ÃæÒ²Ìá¸ßÏÂ×Ô¼ºµÄÓ¢ÎÄˮƽ¡£

ÓÉÓڱȽÏæµ£¬ÎÒÒ²Ö»Äܼ·Ê±¼äÀ´×öÕâ¸öÊÂÇ飬ËùÒÔÖ»ÄÜÒ»µãÒ»µãµÄд¡£×îºóÐγɵÄÎĵµ£¬Ôò»á¼ÓÈëµ½
http://crablfs.sourceforge.net/

ÓÉÓÚ±¾ÈËˮƽºÍ¾­ÑéÓÐÏÞ£¬ÄÑÃâç¢Â©ºÍ´íÎ󣬻¶Ó­¶à¶àÖ¸½Ì¡£

лл¡£
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20071017/108e4a95/attachment.htm 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年10月17日 星期三 11:05

Roc Zhou chowroc.z+l在gmail.com
星期三 十月 17 11:05:10 HKT 2007

±¸·ÝºÍ»Ö¸´¸ÅÀÀ

==±¸·ÝºÍ»Ö¸´¸ÅÀÀ==[ru_data_man_overview]
±¸·Ý×ÜÊÇϵͳ¹ÜÀíÖÐ×îÖØÒªµÄÒ»¼þÊÂÇ飬Ŀǰ¿´À´£¬ÎÞÂÛÊÇÉÌÒµµÄ»¹ÊÇ¿ªÔ´µÄ£¬
¶¼ÓÐÐí¶à½â¾ö·½°¸¡£

Ò²ÐíÊÇÓÉÓÚÎÒ¸öÈ˵ķôdz°É£¬Ä¿Ç°ÎÒûÓÐʹÓùýÕâÑùµÄÉÌÓÃÈí¼þ£¬Ö»ÖªµÀ²»»á
±ãÒË£¬¶øÇÒ¾ÍÎÒʹÓÃÉÌÒµÈí¼þµÄ¾­ÑéÀ´Ëµ£¬×ܾõµÃÄÑÒÔÕÒµ½ÕæÕýºÏÊʵģ¬²¢ÇÒ
ÎÒÒ²²»Ï£Íû±»°ó¶¨ÔÚijÖÖ°º¹óµÄÓ²¼þÉèÊ©ÉÏ¡£

ÄÇôÀ´¿´Ò»¿´Îļþϵͳ±¸·ÝµÄÎÊÌ⡣ĿǰÀ´Ëµ£¬¶ÔÊý¾Ý¿âµÄ±¸·ÝÖ»ÄܲÉÓò»Í¬
µÄ·½·¨£¬²¢ÇÒÒѾ­ÓÐһЩ±È½ÏºÃµÄ·½°¸£¬ËùÒÔÕâÀï²»Ó迼ÂÇ¡£

Ëƺõ±àдһ¸ö½Å±¾¶¨Ê±µÄÔËÐÐ``tar``¿´ÉÏÈ¥²»´í£¬µ«ÊÇÕâЩ¹éµµÎļþ½«ºÜ¿ìʧȥ
Ò×¹ÜÀíÐÔ£¬ÒòΪÎÞ·¨ºÜÈÝÒ׵ķֱð³öÔڹ鵵ÖмÓÈëÁËʲô£¬Í¬Ê±£¬Õë¶ÔÎļþϵͳ
µÄ²»Í¬²¿·Ö£¬¿ÉÄÜ»áÉú³É²»Í¬µÄ¹éµµÎļþ¡£

"¼òµ¥ tar"µÄÁíÒ»¸öÎÊÌâÊDz»ÀûÓÚʵÏÖÔöÁ¿ºÍ²î·Ö±¸·Ý£¬ÓÈÆäÊÇ tar ÎÞ·¨ÕÒ³ö
±»É¾³ýµÄÎļþ£¬Õ⽫µ¼ÖÂÔÚ»Ö¸´Ê±ÎļþϵͳÀïÈûÂúÁ˹ýʱµÄ·ÏÆ·(Ò²Ðí»¹ÓÐһЩ
Ãô¸ÐµÄ¶«Î÷)¡£Õâ¸öÎÊÌâ¿ÉÒÔÀûÓÃ``find``À´µÃµ½Ò»¸öµÍЧÂʵĽâ¾ö·½°¸£¬µ«ÊÇ
»¹ÊÇÓÐÎÊÌ⣺

×îÖØÒªµÄÊÇ£ºÄãÈÔÈ»½«±»Ò»¸öÓµÓжàÓÚÉÏ°ÙÍòµÄÎļþ/Ŀ¼µÄÕæʵµÄÉú²úϵͳ¿¨×¡
£¬ÒòΪ½ö½öÊÇѹËõ/½âѹÕâЩ¹éµµÎļþ¶¼ÊǷdz£·Ç³£ÂýµÄ(Ò²±È½ÏÏûºÄϵͳ×ÊÔ´)...
ÊÂʵÉÏ£¬½ö½öÊDZéÀúÒ»´ÎËüµÄÎļþϵͳ¶¼ÒªºÄ·Ñ´óÁ¿Ê±¼ä¡£ÔÚÕâÖÖÇé¿öÏ£¬»Ö¸´
ʱµÄЧÂʺÍÒ×ÓÃÐÔ¶¼Ã»Óб»ºÜºÃµÄ¿¼ÂÇ¡£

Òò´Ë£¬ÀûÓÃÏÖ´ú¸ßËÙ¡¢¾Þ´ó²¢ÇÒ±ãÒ˵ĴÅÅÌ£¬Ò»Ð©Í¬²½µÄ»úÖƱ»Ó¦ÓÃÓÚ±¸·ÝºÍ
»Ö¸´£¬ÀýÈç``rsync``, ``amanda`` ... ͬʱÀûÓà Linux µÄ hard link ÄÜÁ¦£¬
Äã¿ÉÒÔΪÿһ¸öͬ²½µã±£ÁôÒ»¸öÍêÈ«±¸·Ý£¬µ«Êµ¼ÊÉÏÈ´Ö»ÊÇÒ»¸öÔöÁ¿±ä»¯(¿ÉÒÔ
ÈÏΪÕâʱһÖÖÏó¿ìÕյķ½Ê½£¬Í¨³£ÀûÓÃÂÖת rotate ʵÏÖ)¡£

ÓÐÒ»¸ö ruby ³ÌÐò``pdumpfs``ͬʱÀûÓÃÁË rsync ºÍ rotate(``pdumpfs-rsync``)
£¬ÎÒÔÚ FreeBSD ÉÏÓùýÒ»¶Îʱ¼ä¡£

ÀûÓÃÕâÖÖ¹¤¾ß£¬ÎÒÃÇ¿ÉÒÔʹÓÃÇ°ÊýСʱ֮ÄÚµÄÊý¾ÝÀ´¼±¾ÈÒ»¸ö±ÀÀ£µÄϵͳ£¬ÀýÈ磬
Èç¹û±¸·ÝϵͳÈçÏ£º
```
ʹÓõȿí×ÖÌåÏÔʾ:

    +----------+                +----------+
    |  worker  | --- rsync ---> |  rescue  |
    +----------+                +----------+
```
ÄÇô¾Í¿ÉÒÔʹÓà "rescue" Ö÷»úÀ´´úÌæ "worker"Ö÷»ú£¬Í¨³£Ö»ÐèÒªÔÚ "rescue"
Ö÷»úÉÏ×öһЩ·ûºÅÁ´½Ó¾Í¿ÉÒÔÁË¡£

Ò»ÖÖ¸ü¾­¼ÃµÄÍØÆ˽ṹÊÇÕâÑùµÄ£º
```
ʹÓõȿí×ÖÌåÏÔʾ:

    +----------+
    |  worker  | --- rsync -----------\
    +----------+                      |
       ......                         |
                                      |
    +----------+                      |
    |  worker  | --- rsync -----------\
    +----------+                      |
                                      V
    +----------+                +----------+
    |  worker  | --- rsync ---> |  backup  |
    +----------+                +----------+
         |                            |
    [take_over]                       |
         |                            |
         V                            |
    +----------+                      |
    |  rescue  | <------------------ NFS
    +----------+
```
ÀûÓÃÕâÖÖģʽ£¬Äã¿ÉÒԵõ½Ò»¸ö»º³åÆ÷£¬Òò´Ë¿ÉÒԵõ½¸ü¶àµÄʱ¼äÀ´´¦ÀíºÍ»Ö¸´
±ÀÀ£µÄϵͳ¡£

ÕâÀïÖ®ËùÒÔʹÓà NFS ÊÇÒòΪֱ½ÓÀûÓÿ½±´À´»Ö¸´½«»áÊÇÒ»¸ö¼°ÆäÏûºÄʱ¼äºÍ×ÊÔ´
µÄ·½Ê½£¬Òò´ËÊDz»¿ÉÐеġ£ÀýÈ磬һ¸öÕæʵµÄÔÚÏßÉú²úϵͳ£¬Ê¹Óà SCSI ´ÅÅÌ£¬
100 MBit Íø¿¨ºÍÍøÏߣ¬50GB µÄÊý¾Ý/´óÔ¼ 200 ÍòÎļþ/Ŀ¼(ÆäÖÐĿ¼ÊýÁ¿Îª 10
Íò×óÓÒ)£¬½«ÐèÒª³¬¹ýÁ½¸öСʱ²ÅÄÜ°ÑËùÓÐÎļþ¿½±´»ØÀ´(¿ÉÒÔ½¨Á¢Ò»¸ö
SNMP/Cacti À´¹Û²ìÕâ¸ö¹ý³Ì)¡£

¾¡¹Ü SCSI ½Ó¿ÚÊÇ
``target0:0:0: FAST-80 WIDE SCSI 160.0 MB/s DT (12.5 ns, offset 62)``
(dmesg Êä³ö)£¬ÕâÀï MB/s ÊÇ MBps(MBits/s)£¬ËùÒÔ 3 MBytes/s ʵ¼ÊÉÏÊÇÔÚ»ñÈ¡
(¿½±´)ÕâЩ´óÁ¿µÄСÎļþʱ¿ÉÒÔÔ¤ÆÚµÄÉÏÏÞ£¬¶ø 30 MBits/s ÔòÊÇ¿ÉÔ¤ÆÚµÄÍøÂç
´ø¿íµÄÉÏÏÞ£¬ÔÚÕâÖÖÇé¿öÏ£¬Êµ¼ÊµÄÆ¿¾±ÔÚ´ÅÅÌ I/O ÉÏ¡£

Èç¹û´«ÊäÒ»¸öÓÐÊý GBytes µÄ´óÎļþ£¬Çé¿öÔòÍêÈ«²»Í¬£º´ÅÅÌ I/O ¿ÉÒÔ³¬¹ý
11 MBytes/s ¶øÍøÂç´ø¿íÊÇ 98 MBits/s£¬ËùÒÔÕâʱÍøÂç³ÉΪÁËÆ¿¾±£¬´Ëʱ´ÅÅ̺Í
ÍøÂçµÄÐÔÄܶ¼¿ÉÒÔÈÏΪ±»³ä·ÖÀûÓÃÁË¡£

ÎÒÃDZØÐ뿼ÂÇÇ°ÃæÄÇÖÖÇé¿ö£¬ÒòΪÄÇÊÇÔÚÉú³ÉϵͳÖÐÎÒÃÇͨ³£Óöµ½µÄÇé¿ö£¬¼ÆËã
Ò»ÏÂʱ¼ä£º
```
sh$ echo "50 * 1024 / 3 / 60 / 60" | bc -l
4.74074074074074074074
```
ÕâÒâζ×Å´Ó±¸·ÝÖлָ´ÐèÒª³¬¹ý 5 СʱµÄʱ¼ä¡£¼´±ã½«´ÅÅÌ I/O Ìá¸ßÒ»±¶£º
```
sh$ echo "50 * 1024 / 6 / 60 / 60" | bc -l
2.37037037037037037037
```
ÈÔȻҪ»¨·Ñ³¬¹ý 2 ¸öСʱ¡£ÕâÍêÈ«²»Äܱ»½ÓÊÜ¡£

ËùÒԹؼüÊÇ£º***¾¡¿ÉÄÜÏû³ý»ò¼õÉÙÔھȻ¤Ê±µÄ¿½±´ºÍ±éÀúÎļþϵͳµÄ²Ù×÷***

ÔÚСÎļþºÍ´óÎļþÖ±½Ó¾Þ´óµÄ²î±ðÔ´×ÔÓÚÎļþϵͳ×ÔÉíµÄÔ­ÀíºÍ½á¹¹¡£ÒÔ Ext3fs
ΪÀý£¬ÆäÎïÀí´ÅÅ̱»·Ö¸î³ÉºÜ¶à×é(groups)£¬Òò´ËÔªÊý¾Ý(metadata)ÒÔ¼°Ä¿Â¼ºÍ
ÎļþÉ¢²¼ÔÚ´ÅÅ̵ĸ÷¸ö²¿·Ö£¬Õâ¶ÔÓÚËæ»ú´æ´¢ÊÇÓÐÀûµÄ£¬µ«ÔÚ±éÀúÕâÑùµÄ²Ù×÷ÖУ¬
Äں˲»µÃ²»È¡µÃËùÓеÄÔªÊý¾Ý£¬Òò´ËÐèÒªºÄ·Ñ´óÁ¿µÄʱ¼äÔÚ´ÅÅÌÑ°µÀÉÏ¡£¶ø´ó
ÎļþÔòͨ³£ÔÚ´ÅÅÌÉÏÓÐÁ¬ÐøµÄÊý¾Ý¿é¡£

Ò²ÐíÄã»á¿¼ÂÇʹÓà RAID£¬²»¹ýÎÒ¿´£¬Èç¹û¿¼Âǵ½Ð´ËÙÂÊ£¬ÄÇô RAID10 Ò²Ö»ÄÜ
Ô¤ÆÚÁ½±¶µÄËٶȣ¬ÔòÈÔÈ»ÐèÒª³¬¹ýÒ»¸öСʱµÄʱ¼ä¡£Õ⻹ֻÊÇ¿¼ÂÇ¿½±´µÄʱ¼ä£¬
Äã¿ÉÄÜ»¹ÐèҪһЩÆäËûµÄ²Ù×÷£¬ÀýÈç¸Ä±äÎļþµÄÊôÖ÷ºÍȨÏÞ£¬ÕâͬÑùÐèÒªµÝ¹éµÄ
±éÀú¡£Ò²Ðí»¹ÓÐÆäËûһЩ¸¨Öú²Ù×÷ ...

Ä¿Ç°ÎÒ»¹²»ÊÇÌ«Çå³þ **Reiserfs**£¬µ«ÎÒ²»ÆÚÍû 5 ±¶ÒÔÉϵÄÌáʾ£¬¼´Ê¹ÀûÓÃ
RAID£¬ÎÒÏë¼ÓÉÏÏà¹Ø²Ù×÷£¬Ò»¸öСʱ×ÜÊÇÐèÒªµÄ¡£

È»¶ø¼´Ê¹Ê¹ÓÃÉÏÃæÌáµ½µÄ¾È»¤·½Ê½£¬ÄãÈÔÈ»»áËðʧ×ÔÉÏÒ»´Î rsync ÔËÐкóµÄËùÓÐ
Êý¾Ý£¬ÒòΪ£º

rsync »úÖÆÊDz»ÍêÃÀµÄ(µ±È»Õâ¸öÊÀ½çÉÏҲûÓÐʲôÊÇÍêÃÀµÄ)£¬ÒòΪ rsync ²»ÊÇ
ʵʱµÄ¡£Ã¿Ò»´Îµ÷Óà rsync£¬Ëü±ØÐëÈ¡µÃÒ»¸öÐèÒª´«ÊäµÄÎļþµÄÁÐ±í£¬¶øÒª»ñÈ¡
Õâ¸öÁÐ±í£¬ËüÐèÒª¶ÔÔ´¶ËµÄÎļþϵͳ×öÒ»´Î±éÀú£¬±È½Ïÿһ¸öÔ´ÎļþºÍÄ¿±êÎļþ
µÄʱ¼ä´Á²¢Ö´ÐÐÏàÓ¦²Ù×÷¡£Ëæ×ÅÎļþϵͳԽÀ´Ô½´ó£¬Ô½À´Ô½¶àµÄʱ¼äºÍ×ÊÔ´½«±»
ºÄ·ÑÔÚͬ²½ÉÏ£¬Äã±ØÐëÔö¼ÓÁ½´ÎÔËÐеļä¸ô£¬·ñÔòϵͳ¿ÉÄÜ»á½øÈëÏÂÐý״̬£¬
µ«ÊÇÄã±¾ÒâÉÏÓ¦¸ÃÊÇÒª¼õСÕâ¸ö¼ä¸ô£¬ÒòΪ¸ü´óµÄʱ¼ä¼ä¸ôÒâζ×ÅËðʧ¸ü¶àµÄ
Îļþ¡£ÔÚÒ»¸ö¹Ø¼üµÄ·þÎñÉÏ£¬ÕâÑùµÄËðʧ¿ÉÄÜÎÞ·¨½ÓÊÜ¡£

rsync ÁíÍâÓÐÒ»¸ö "vanished" ÎÊÌ⣬Ôڵõ½ÁбíºÍ½øÐÐʵ¼ÊÎļþ´«ÊäÖ®¼ä£¬Ô´
Îļþϵͳ¿ÉÄܸı䣬һЩĿ¼/Îļþ¿ÉÄܱ»´´½¨¡¢¸ü¸Ä£¬»òÕß±»É¾³ý£¬Ç°Õß²»ÊÇ
Ò»¸öºÜÖØÒªµÄÎÊÌ⣬µ«ºóÕß¿ÉÄÜÊÇ¡£ÀýÈç pdumpfs-rsync ¿ÉÄÜ»áÔÚÕâÑùµÄ
"vanished" µÄµØ·½ÖÕÖ¹£¬ÁôÏÂÓàϵÄÎļþûÓб»Í¬²½¡£²»¹ýÏÖÔÚµÄ rsync Ó¦¸Ã
ÒѾ­×ã¹»½¡×³¿ÉÒÔ¼òµ¥µÄºöÂÔÕâЩ¾¯¸æ¡£

ÎÞÂÛÄãʹÓÃÄÄÖÖ»úÖÆ£¬tar/find »ò rsync, ...£¬ÈÔÈ»ÓÐÒ»¸öÌôÕ½£ºÍ¨³£Çé¿öÏÂ
Äã¿ÉÄÜÖ»Ï뱸·ÝÎļþϵͳµÄÒ»¸ö²¿·Ö£¬Í¬Ê±ÅųöÆäÖеÄһЩ²¿·Ö£¬ÀýÈçÓÐ web
Õ¾µãµÄ php ³ÌÐò²úÉúµÄ´óÁ¿µÄ cache Îļþ£¬...; ÕâЩ²¿·ÖµÄʶ±ðÓ¦¸ÃÒ×ÓÚ¹ÜÀí
£¬×îºÃÊÇÔÚÄãµÚÒ»´ÎÖ¸¶¨Ö®ºóÄܹ»ÓмÆËã»ú×Ô¶¯Íê³É¡£

µ½Ä¿Ç°ÎªÖ¹£¬Õë¶ÔÎļþϵͳµÄʵʱ¾µÏñ£¬ÎÒ»¹Ã»ÓÐÕÒµ½Ò»¸ö¿ªÔ´µÄ½â¾ö·½°¸£¬
ËùÒÔÎÒ×Ô¼ºÐ´ÁËÒ»¸ö£¬Ï£Íû¶ÔÄãÃÇÓÐÓá£(ÊÂʵÉÏ£¬¾ÍÔÚ×òÌì(**9 Ô 18 ÈÕ**,
2007)£¬ÎÒ·¢ÏÖÁ˼¸¸ö£¬ÀýÈçÉÌÒµµÄ PeerFs£¬ÒÔ¼°¿ªÔ´µÄ DRBD£¬Ä¿Ç°ÎÒ»¹²»ÊÇ
·Ç³£Á˽âËüÃÇ£¬Ö»ÓÐһЩ¸ÅÄÎÒ»áÕÒ¸öʱ¼äѧϰºÍʵÑéËüÃÇ£¬¿´¿´ÓÐûÓиüºÃ
µÄ½â¾ö·½°¸)¡£

±ØÐë˵Ã÷µÄÊÇ£¬Õâ¸ö C/S Ó¦ÓóÌÐò£¬ÎÒ³Æ֮Ϊ ``mirrord/fs_mirror``£¬ÔÚ
``cutils`` Õâ¸ö°üÀïÃ棬²¢²»ÊÇÒ»¸öÍêÈ«¾ø¶ÔµÄʵʱ±¸·Ý¹¤¾ß£¬ËüÖ»ÊÇ"½üʵʱ"
£¬Ò²¾ÍÊÇ˵£¬ÔÚÒ»°ãµÄÇé¿öÏÂ(Õý³£µÄϵͳ¸ºÔغʹÅÅÌ I/O£¬ÒÔ¼°×ã¹»µÄÍøÂç´ø¿í
)£¬ÔÚÔËÐÐ mirrord agent µÄ server Ö÷»úºÍÔËÐÐ fs_mirror µÄ±¸·Ý¿Í»§¶ËÖ®¼ä
£¬»áÓÐÒ»¸öÒ»°ãÉÙÓÚ 1s µÄÑÓ³Ù£¬¶øÆäÏûºÄµÄϵͳ×ÊÔ´»ù±¾ÉÏ¿ÉÒÔºöÂÔ¡£ÏêϸµÄ
ϸ½ÚÔÚ "[Design #ru_data_man_design]" Ò»½Ú¡£

ºÜÃ÷ÏÔ£¬µ½Ä¿Ç°ÎªÖ¹£¬mirrord/fs_mirror **Ö»ÊÊÓÃÓÚÓµÓÐСÎļþµÄÎļþϵͳ**£¬
¶ÔÓÚƵ·±±ä¶¯µÄ´óÎļþÀýÈçÈÕÖ¾ÎļþºÍÊý¾Ý¿â£¬ÒѾ­ÓÐÐí¶àÆäËûµÄÓ¦ÓÃÁË¡£

×÷Ϊ×ܽᣬ¿´Ò»Ï±¸·ÝºÍ»Ö¸´°üº¬µÄ¼¸¸ö·½ÃæµÄÎÊÌ⣺
+ ͨ³£ÓÐÁ½ÖÖÀàÐ͵ı¸·Ý£º¾µÏñ»òÕß˵Èȱ¸·Ý£¬ÒÔ¼°ÖÜÆÚÐԵı¸·Ý¡£

ΪÁËʹ»Ö¸´¹ý³Ì¾¡¿ÉÄܿ죬¾µÏñÊDZØÒªµÄ¡£ÆäÁíÒ»¸ö×÷ÓÃÊÇÓ¦¸¶Ó²¼þ¹ÊÕÏ(¾¡¹Ü
RAID ¿ÉÒÔ´¦Àí´ÅÅ̹ÊÕÏ£¬µ«²¢²»ÄÜ´¦Àí CPU/ÄÚ´æ/µçÔ´/... ¹ÊÕϵȣ¬¶øΪËùÓÐ
ÕâЩÉ豸¶¼Å䱸ÈßÓàÓÖ¹ýÓÚ°º¹ó)¡£

µ«ÊǾµÏñ²»Äܽâ¾ö£ºÎó²Ù×÷(¿ÉÄÜÓÐÉÏǧ¸öÓû§µÄÉÏǧ¸ö×ÓĿ¼µÄÊý¾ÝÐèÒª±¸·Ý£¬
Ò²ÐíijһÌ죬ij¸öÓû§¸æËßÄãËû/ËýÏëÒª»Ø¹öµ½¼¸ÌìÇ°µÄ״̬)¡¢²¡¶¾»òÈëÇÖ¡£
Èç¹ûÆäÖÐ֮һȷʵ·¢ÉúÁË£¬ÄÇôÄãÖ»ÄÜÒÀÀµÓÚÖÜÆÚÐԵı¸·Ýµµ°¸¡£

ËùÒÔ±¸·ÝÓ¦¸Ãͬʱ°üÀ¨ÕâÁ½¸ö·½Ã棬¶øÕâÁ½¸ö·½Ã涼¿ÉÒÔÓà mirrord/fs_mirror
À´ÊµÏÖ¡£

+ ΪÁ˸ü¿ìµÄ»Ö¸´£¬ÎļþµÄ¿½±´ºÍĿ¼±éÀú¶¼Ó¦¸Ã¾¡¿ÉÄÜÏÞÖÆ£¬ËùÒÔ×îºÃµÄ·½·¨
ÊÇÖ±½ÓÓþȻ¤Ö÷»úÌæ»»±ÀÀ£µÄÖ÷»ú£¬»òÕß´Ó±¸·ÝÖ÷»úÖе¼³öÏàÓ¦µÄĿ¼ºÍÎļþ
ϵͳÒÔ»º³åѹÁ¦£¬Òò´Ë¿ÉÒÔʹÓÃÔÚÉÏÃæÌáµ½µÄ rsync ÏàͬµÄÍØÆ˽ṹ£¬Ï¸½ÚÔÚ
ºòÑ¡Õ½ÚÖÐÌÖÂÛ(Èç¹ûÄãÖ»¹ØϵÈçºÎʹÓà mirrord/fs_mirror£¬¿ÉÒÔÖ±½ÓÌøµ½
"[Usage Manual #ru_data_man_usage]" Ò»½Ú)¡£

+ ¿É¹ÜÀíÐԷdz£ÖØÒª£¬Äã¿ÉÄÜÏ£ÍûÖ»±¸·ÝÕû¸öÎļþϵͳµÄÈô¸É²¿·Ö£¬Çø±ðËüÃÇ(
ÀýÈçÓëƽ̨Ïà¹ØºÍƽ̨Î޹صÄ)¡£ÔÚ±»°üº¬µÄ²¿·Ö£¬ÈÔÈ»¿ÉÄÜÏ£ÍûÅųýһЩÓô¦
²»´óµÄÄÚÈÝ¡£mirrord/fs_mirror ͨ¹ý``fs_info``Ä£¿éÌṩÁËÕâ¸ö¹¦ÄÜ¡£

On 10/17/07, Roc Zhou <chowroc.z+l在gmail.com> wrote:
>
> ÕâÊÇÎÒ×î½üÔÚ×öµÄÒ»¸ö¿ªÔ´ÏîÄ¿£¬·ÅÔÚ sourceforge ÉÏÃæÁË¡£¿ÉÒÔ´ÓÕâÀïÕÒµ½²¢ÏÂÔØ£º
> https://sourceforge.net/projects/crablfs/
>
> Ïà¹ØµÄÎĵµ¿ÉÒÔÔÚ£º
> http://crablfs.sourceforge.net/
> ÕÒµ½¡£ÆäÖÐÓëÎļþϵͳʵʱ¾µÏñÓйصIJ¿·ÖÔÚ£º
> http://crablfs.sourceforge.net/#ru_data_man
>
> Õâ¸öÏîÄ¿ÊÇÁíÒ»¸öÏîÄ¿µÄÒ»¸ö×ÓÏîÄ¿£¬Æä×îÖÕÄ¿±ê£¬ÎÒÏëÊÇ×öÒ»¸öÒ×¹ÜÀíµÄ»ùÓÚ LFS µÄ·¢Ðа棬ËùÒÔÁíÍ⻹ÓÐÁ½¸ö×ÓÏîÄ¿¡£ÆäÖÐÖ®Ò»ÊÇÎÒÒÔÇ°ÔÚ
> LinuxSir ÂÛ̳ÉÏ·¢¹ýµÄÒ»¸ö"»ùÓÚÓû§µÄ°ü¹ÜÀíϵͳ"£º
> http://www.linuxsir.org/bbs/showthread.php?t=277172
> Ö¼ÔÚΪ´ÓÔ´´úÂë±àÒëµÄÈí¼þ°üÌṩһÖÖ·½±ã°²È«µÄ°ü¹ÜÀí·½Ê½£¬ÀýÈçËüÌṩ½»»¥Ä£Ê½£¬ÔÚ½»»¥Ä£Ê½Ï¿ÉÒÔ°´ÕÕ°²×° LFS
> µÄ·½Ê½Ò»²½²½½øÐУ¬ÕâÑù±£ÁôÁËѧϰµÄ¹ý³Ì£»¶øÔÚ½»»¥Ä£Ê½ÏÂÊäÈëµÄ°²×°Ö¸Áî¿ÉÒÔ×Ô¶¯¼Ç¼£¬²¢Ôڷǽ»»¥Ä£Ê½ÏÂ×Ô¶¯ÔËÐУ¬±£ÁôÕâЩģ°åÎļþ£¬¾ÍµÃµ½ÁËÒ»¸öÄã×Ô¼º
> µÄ¶¨ÖÆ·¢Ïְ棬²¢ÇÒÊǺÍÓ²¼þƽ̨Î޹صÄ(×îÖÕÄ¿±êÈç´Ë£¬µ±È»Öм仹ÊÇ»áÓÐЩСÀ§ÄÑ£¬²»¹ýÓ¦¸Ã²»ÄÑ¿Ë·þ)¡£
>
>
> ¶øÕâ¸öÏîÄ¿£¬ÊÇΪÁËÌṩһЩ·½±ãϵͳ¹ÜÀíµÄ¹¤¾ß¼¯£¬±ÈÈ籸·ÝµÈ¡£ÔÚÕâÀÎÒÒªÌÖÂ۵ľÍÊÇÒ»ÖÖ±¸·Ý·½Ê½£ºÊµÊ±¾µÏñ¼ÓÂÖת¡£ÕâÀÂǵÄÖ÷ÒªÊÇÈíÓ²¼þ×ÊÔ´±È½ÏÓÐÏÞµÄÇé¿ö(Çîѽ)£¬ÊÇÒ»ÖֱȽϾ­¼ÃµÄ½â¾ö˼·£¬Èç¹ûÄãÓÐÇ®£¬Ê¹ÓÃÉÌÒµµÄÕóÁкÍÈí¼þÒ²Ðí¸üºÃ¡£
>
> µ±È»£¬ËùÓÐÕâЩ¹¤¾ß¼¯£¬°üÀ¨Ç°ÃæµÄ°ü¹ÜÀíÆ÷£¬Æäʵµ±È»Ò²¿ÉÒÔÓÃÔÚÆäËûÈκη¢ÐаæÉÏÃ棬±ÈÈçÎÒ¾ÍÔÚ×Ô¼ºµÄ RHEL4 µÄ»·¾³ÖÐÓ¦ÓÃÁËÕâЩ¹¤¾ß¡£
>
> ËùÌṩµÄÎĵµ¶¼ÊÇÓ¢Îĵģ¬ÔÚ´úÂëÖеÄ×¢ÊͺÍÄÚ²¿ÎĵµÒ²ÊÇÓ¢Îĵģ¬ÒòΪÔÚÒ»¿ªÊ¼±àдµÄʱºò£¬ÒªÔÚ²»Í¬µÄ»úÆ÷ÉϹ¤×÷£¬ÎÒ×Ô¼ºµÄ LFS ϵͳûÓÐ¼Ó GBK
> Ö§³Ö£¬ÀÏÊdzöÂÒÂë¡£¶øÇÒÖÐÎıàÂë±¾À´¾ÍÊǸöÀÏ´óÄѵÄÎÊÌâÁË£¬ÎÒ×Ô¼ºÒ²ÓÐЩ²»Í¬µÄÏë·¨£¬ËùÒÔË÷ÐÔдӢÎĵģ¬ÔÚ·­ÒëÖÐÎÄÎĵµ£¬²¢ÀûÓà gettext
> ´¦ÀíÄÚ²¿Îĵµ£¬Ò»·½ÃæÒ²Ìá¸ßÏÂ×Ô¼ºµÄÓ¢ÎÄˮƽ¡£
>
> ÓÉÓڱȽÏæµ£¬ÎÒÒ²Ö»Äܼ·Ê±¼äÀ´×öÕâ¸öÊÂÇ飬ËùÒÔÖ»ÄÜÒ»µãÒ»µãµÄд¡£×îºóÐγɵÄÎĵµ£¬Ôò»á¼ÓÈëµ½
> http://crablfs.sourceforge.net/
>
> ÓÉÓÚ±¾ÈËˮƽºÍ¾­ÑéÓÐÏÞ£¬ÄÑÃâç¢Â©ºÍ´íÎ󣬻¶Ó­¶à¶àÖ¸½Ì¡£
>
> лл¡£
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20071017/acc0a853/attachment-0001.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年10月17日 星期三 11:06

Roc Zhou chowroc.z+l在gmail.com
星期三 十月 17 11:06:58 HKT 2007

ÎÒÔ­À´µÄÎĵµÊÇÊ×ÏÈ˵Éè¼ÆµÄ˼·µÄ¡£ÕâÀïÎÒÏ뻹ÊÇÊ×ÏÈ˵˵ mirrord/fs_mirror
µÄ»ù±¾Ê¹ÓÿÉÄܸüºÃ¡£²»¹ýΪÁ˸üºÃµÄÀí½â£¬ÏÈ´ÖÂԵؽâÊÍÒ»ÏÂÆä»ù±¾Ô­Àí¡£

mirrord/fs_mirror ÀûÓÃÁË×î½ü Linux ÄÚºË(´Ó 2.6.12 ¿ªÊ¼)ÌṩµÄÒ»ÖÖÐÂÌØÐÔ£¬
³Æ֮Ϊ inotify£¬Ëü¿ÉÒÔ¼à¿ØÎļþϵͳ·¢ÉúµÄ±ä»¯£¬²¢ÏòÉϲãµ÷ÓÃËüµÄÓ¦ÓóÌÐò
Å׳öʼþ£¬ÕâЩӦÓò¶×½µ½ÕâЩʼþÒԺ󣬿ÉÒÔ²é³öÊÇÄÇЩÎļþ·¢ÉúÁËÄÇЩ±ä»¯£¬²¢
½øÐÐÏàÓ¦µÄ²Ù×÷£¬ÒòΪ±ÜÃâÁ˱éÀúºÍ±È½Ï£¬ÓÖÊÇÓÉÄÚºËÀ´ÊµÏֵģ¬ËùÒÔÊÇÒ»¸öºÜÇáÁ¿
¼¶µÄ½â¾ö°ì·¨¡£

mirrord/fs_mirror ¾ÍÊÇÀûÓÃÕâÖÖÌØÐÔ£¬ÔÚÁ½Ì¨Ö÷»úÖ®¼ä×öÎļþϵͳµÄ¾µÏñ£¬
ÕâÖÖ¾µÏñÒò´Ë¿ÉÒԷdz£½Ó½üʵʱ״̬£¬²¢ÇÒÒ²²»ÐèÒªÏûºÄÌ«´óµÄϵͳ×ÊÔ´£¬
Òò´ËΪ±¸·ÝºÍ¸ß¿ÉÓÃÌṩÁËÒ»ÖÖ;¾¶¡£

һЩ¹ØÓÚ inotify µÄÎĵµ£º
[Kernel Korner - Intro to inotify #http://www.linuxjournal.com/article/8478]
[Monitor Linux file system events with inotify #
http://www-128.ibm.com/developerwork...-inotify.html]
[Lightweight filesystem notifications #
http://blog.printf.net/articles/2006...notifications]

Linux ÄÚºËÀïµÄÔ´´úÂ룺
```
./include/linux/inotify.h
./Documentation/filesystems/inotify.txt
./fs/inotify.c
```

Ä¿Ç° mirrord/fs_mirror ÀûÓÃÁËÒ»¸ö pyinotify ÏîÄ¿£¬ËüÊÇÔÚ inotify ÉÏ°ü¹ü
ÁËÒ»¸ö Python ²ã×÷Ϊģ¿é¡£
http://pyinotify.sourceforge.net/

On 10/17/07, Roc Zhou <chowroc.z+l在gmail.com> wrote:
>
> ÕâÊÇÎÒ×î½üÔÚ×öµÄÒ»¸ö¿ªÔ´ÏîÄ¿£¬·ÅÔÚ sourceforge ÉÏÃæÁË¡£¿ÉÒÔ´ÓÕâÀïÕÒµ½²¢ÏÂÔØ£º
> https://sourceforge.net/projects/crablfs/
>
> Ïà¹ØµÄÎĵµ¿ÉÒÔÔÚ£º
> http://crablfs.sourceforge.net/
> ÕÒµ½¡£ÆäÖÐÓëÎļþϵͳʵʱ¾µÏñÓйصIJ¿·ÖÔÚ£º
> http://crablfs.sourceforge.net/#ru_data_man
>
> Õâ¸öÏîÄ¿ÊÇÁíÒ»¸öÏîÄ¿µÄÒ»¸ö×ÓÏîÄ¿£¬Æä×îÖÕÄ¿±ê£¬ÎÒÏëÊÇ×öÒ»¸öÒ×¹ÜÀíµÄ»ùÓÚ LFS µÄ·¢Ðа棬ËùÒÔÁíÍ⻹ÓÐÁ½¸ö×ÓÏîÄ¿¡£ÆäÖÐÖ®Ò»ÊÇÎÒÒÔÇ°ÔÚ
> LinuxSir ÂÛ̳ÉÏ·¢¹ýµÄÒ»¸ö"»ùÓÚÓû§µÄ°ü¹ÜÀíϵͳ"£º
> http://www.linuxsir.org/bbs/showthread.php?t=277172
> Ö¼ÔÚΪ´ÓÔ´´úÂë±àÒëµÄÈí¼þ°üÌṩһÖÖ·½±ã°²È«µÄ°ü¹ÜÀí·½Ê½£¬ÀýÈçËüÌṩ½»»¥Ä£Ê½£¬ÔÚ½»»¥Ä£Ê½Ï¿ÉÒÔ°´ÕÕ°²×° LFS
> µÄ·½Ê½Ò»²½²½½øÐУ¬ÕâÑù±£ÁôÁËѧϰµÄ¹ý³Ì£»¶øÔÚ½»»¥Ä£Ê½ÏÂÊäÈëµÄ°²×°Ö¸Áî¿ÉÒÔ×Ô¶¯¼Ç¼£¬²¢Ôڷǽ»»¥Ä£Ê½ÏÂ×Ô¶¯ÔËÐУ¬±£ÁôÕâЩģ°åÎļþ£¬¾ÍµÃµ½ÁËÒ»¸öÄã×Ô¼º
> µÄ¶¨ÖÆ·¢Ïְ棬²¢ÇÒÊǺÍÓ²¼þƽ̨Î޹صÄ(×îÖÕÄ¿±êÈç´Ë£¬µ±È»Öм仹ÊÇ»áÓÐЩСÀ§ÄÑ£¬²»¹ýÓ¦¸Ã²»ÄÑ¿Ë·þ)¡£
>
>
> ¶øÕâ¸öÏîÄ¿£¬ÊÇΪÁËÌṩһЩ·½±ãϵͳ¹ÜÀíµÄ¹¤¾ß¼¯£¬±ÈÈ籸·ÝµÈ¡£ÔÚÕâÀÎÒÒªÌÖÂ۵ľÍÊÇÒ»ÖÖ±¸·Ý·½Ê½£ºÊµÊ±¾µÏñ¼ÓÂÖת¡£ÕâÀÂǵÄÖ÷ÒªÊÇÈíÓ²¼þ×ÊÔ´±È½ÏÓÐÏÞµÄÇé¿ö(Çîѽ)£¬ÊÇÒ»ÖֱȽϾ­¼ÃµÄ½â¾ö˼·£¬Èç¹ûÄãÓÐÇ®£¬Ê¹ÓÃÉÌÒµµÄÕóÁкÍÈí¼þÒ²Ðí¸üºÃ¡£
>
> µ±È»£¬ËùÓÐÕâЩ¹¤¾ß¼¯£¬°üÀ¨Ç°ÃæµÄ°ü¹ÜÀíÆ÷£¬Æäʵµ±È»Ò²¿ÉÒÔÓÃÔÚÆäËûÈκη¢ÐаæÉÏÃ棬±ÈÈçÎÒ¾ÍÔÚ×Ô¼ºµÄ RHEL4 µÄ»·¾³ÖÐÓ¦ÓÃÁËÕâЩ¹¤¾ß¡£
>
> ËùÌṩµÄÎĵµ¶¼ÊÇÓ¢Îĵģ¬ÔÚ´úÂëÖеÄ×¢ÊͺÍÄÚ²¿ÎĵµÒ²ÊÇÓ¢Îĵģ¬ÒòΪÔÚÒ»¿ªÊ¼±àдµÄʱºò£¬ÒªÔÚ²»Í¬µÄ»úÆ÷ÉϹ¤×÷£¬ÎÒ×Ô¼ºµÄ LFS ϵͳûÓÐ¼Ó GBK
> Ö§³Ö£¬ÀÏÊdzöÂÒÂë¡£¶øÇÒÖÐÎıàÂë±¾À´¾ÍÊǸöÀÏ´óÄѵÄÎÊÌâÁË£¬ÎÒ×Ô¼ºÒ²ÓÐЩ²»Í¬µÄÏë·¨£¬ËùÒÔË÷ÐÔдӢÎĵģ¬ÔÚ·­ÒëÖÐÎÄÎĵµ£¬²¢ÀûÓà gettext
> ´¦ÀíÄÚ²¿Îĵµ£¬Ò»·½ÃæÒ²Ìá¸ßÏÂ×Ô¼ºµÄÓ¢ÎÄˮƽ¡£
>
> ÓÉÓڱȽÏæµ£¬ÎÒÒ²Ö»Äܼ·Ê±¼äÀ´×öÕâ¸öÊÂÇ飬ËùÒÔÖ»ÄÜÒ»µãÒ»µãµÄд¡£×îºóÐγɵÄÎĵµ£¬Ôò»á¼ÓÈëµ½
> http://crablfs.sourceforge.net/
>
> ÓÉÓÚ±¾ÈËˮƽºÍ¾­ÑéÓÐÏÞ£¬ÄÑÃâç¢Â©ºÍ´íÎ󣬻¶Ó­¶à¶àÖ¸½Ì¡£
>
> лл¡£
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20071017/6485da2c/attachment.htm 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年10月17日 星期三 11:15

Roc Zhou chowroc.z+l在gmail.com
星期三 十月 17 11:15:43 HKT 2007

mirrord/fs_mirror µÄ¼òµ¥Ê¹ÓÃ

==ʹÓÃÊÖ²á==[ru_data_man_usage]
===°²×°===
°üº¬ mirrord/fs_mirror µÄ°üÊÇ``cutils``£¬ÊÇ``ulfs``µÄÒ»¸ö×ÓÏîÄ¿¡£uLFS
Òâ˼ÊÇ"**Your** own customed and easily managable **LFS**(Linux From
Scratch) distrubution"£¬Ëü°üº¬Ò»Ð©¹¤¾ßÒÔ´ïµ½Õâ¸öÄ¿µÄ£¬ÀýÈç
[User Based Package Management(°ü¹ÜÀíϵͳ) #ru_package_man]£¬
Configuration Sharing Management(ÅäÖù²Ïí¹ÜÀí)£¬ÒÔ¼°Õâ¸öÎļþϵͳ±¸·ÝºÍ
½üʵʱ¾µÏñ(Ò²ÐíÔÚ½«À´ÎÒ¿ÉÒÔʵÏÖÒ»¸öÍêȫʵʱµÄÓ¦ÓÃ)¡£

ÔÚÐèÒª±¸·ÝµÄ·þÎñÆ÷ÉÏ°²×° mirrord£¬´ËʱÐèÒª Python 2.4 »ò¸ü¸ßµÄ°æ±¾£¬
ÒÔ¼° pyinotify-0.7.1£º
```
sh$ tar xfz Python-2.5.1.tar.gz
sh$ cd Python-2.5.1
sh$ ./configure --prefix=/usr
sh$ make
sh# make install

sh$ tar xfj pyinotify-0.7.1.tar.bz2
sh$ cd pyinotify-0.7.1
sh$ python setup.py build
sh# python setup.py install
```

ÔÚ±¸·ÝÖ÷»ú¿Í»§¶ËÔËÐÐ fs_mirror£¬Ö»ÐèÒª Python ¼´¿É¡£

È»ºóÒª°²×° caxes-0.1.2£¬ÕâÒ²ÊÇ``ulfs``µÄÁíÒ»¸ö×ÓÏîÄ¿£¬¿ÉÒÔÔÚ``cutils``
ÏàͬµÄÏÂÔØÒ³ÃæÈ¡µÃ£¬Ëü°üÀ¨ÎÒ¶¨ÒåµÄÈô¸É¸¨ÖúµÄÊý¾Ý½á¹¹£¬ÀýÈç Python Tree
```
sh$ tar xfz caxes-0.1.2.tar.gz
sh$ cd caxes-0.1.2
sh$ python setup.py build
sh# python setup.py install
```

×îºó£¬°²×° cutils-0.1.1£º
```
sh$ tar xfz cutils-0.1.1.tar.gz
sh$ cd cutils-0.1.1
sh$ python setup.py build
sh# python setup.py install --install-scripts=/usr/local/bin
```

===¼òµ¥Ê¹ÓÃ===
²Î¿¼ [The Second Story #ru_data_man_design_second] ÖеÄͼ£¬Îª±¸·Ý»ò¾µÏñ
Ò»¸öÎļþϵͳ£¬Ê×ÏÈÐèÒª¸æËß±¸·Ý/¾µÏñ³ÌÐòÒª±¸·ÝЩʲô¡£¿ÉÒÔÔËÐÐ``fs_info``
À´×öÕâ¼þÊ£º
```
server# fs_info -a t:/var/www/html system
```
Õâ»á½«"/var/www/html"¼ÓÈëµ½±¸·Ý/¾µÏñ°üº¬ÁбíÖУ¬²¢·ÖÅäÒ»¸ö¶ÔÎļþϵͳ
²¿·Ö½øÐбêʶµÄ±êʶÃû"system"£¬Õâ¸ö±êʶÔÚÄãµÚÒ»´ÎÔËÐÐÕâ¸öÃüÁîµÄʱºò´´½¨
£¬ÄãÒ²¿ÉÒÔʹÓÃÆäËûÃû×Ö£¬ÀýÈç"www", "web", "work" µÈ...

Ö»ÓÐ×îÉϲãµÄĿ¼ÊDZØÐèµÄ£¬ËùÒÔ£º
```
server# fs_info -a t:/var/www/html \
-a t:/var/www/html/include system
```
ÓëÇ°ÃæÄǸöÃüÁîµÄЧ¹ûÍêÈ«Ò»Ñù("/var/www/html")¡£

ΪÁ˽«Ò»Ð©Ä¿Â¼/ÎļþÅųýÔÚ±¸·Ý/¾µÏñÖ®Í⣬ʹÓÃ"x:"±êÖ¾£º
```
server# fs_info -a t:/var/www/html \
-a x:/var/www/html/cache system
```
Õâ»á½«"/var/www/html/cache"¼ÓÈëµ½ÅųýÁÐ±íµ±ÖС£

Èç¹ûÓÐÒ»¸öÁÐ±í£¬¿ÉÒÔÖ±½Ó½«Æä¼ÓÈ룺
```
server# fs_info -a tL:/tmp/included_01 \
-a tL:/tmp/included_02 \
-a xL:/tmp/excluded_01 system
```

fs_info ʵ¼ÊµÄЧ¹û¾ÍÊÇÏò $datadir/$identity/.{t,x}_files ÖÐ×·¼ÓÌõÄ¿£¬
ËùÒÔÄãÒ²¿ÉÒÔÖ±½Ó±à¼­ÕâÁ½¸öÎļþ£¬»òÕßʹÓà shell ½Å±¾Öض¨Ïò¹¦ÄÜ£º
```
server# find /var -maxdepth 1 >$datadir/$identity/.t_file
```
²»¹ý fs_info ¿ÉÒÔΪÄã×öÈô¸ÉÓÐЧÐÔ¼ì²éµÄ²Ù×÷£¬ÀýÈçÅжÏÎļþ/Ŀ¼ÊÇ·ñ´æÔÚ
µÈ¡£ÎÞÂÛÈçºÎ£¬Ñ¡ÔñȨÔÚÄãÊÖÀï¡£

$datadir ĬÈÏÊÇ"/var/fs_info"£¬Äã¿ÉÒÔͨ¹ý±à¼­
"/etc/python/fs_info_config.py"À´µ÷ÕûËüΪ"/var/mirrord"£¬ÒÔÊÊÓ¦ mirrord
µÄÐèÒª£¬ÒòΪ mirrord µÄĬÈÏÖµ¾ÍÊÇ"/var/mirrord"£¬Õâ¸öÖµÒ²¿ÉÒÔͨ¹ý±à¼­
"/etc/python/mirrord_config.py"À´µ÷Õû¡£

ÕâЩÅäÖÃÎļþ¶¼Ö±½ÓʹÓÃ"Python Tree"¶¨ÒåµÄÊý¾Ý½á¹¹£¬ÔÚÇ°ÃæÌáµ½µÄ``caxes``
°üÀïÃæ¡£

$identity ĬÈÏΪ"system"£¬ÈçÇ°ËùÊö¡£

ÕâЩÅäÖÃÒ²¿ÉÒÔ×ÔÃüÁîÐиı䣬ÀýÈ磺
```
server# fs_info -o datadir=/var/mirrord -a t:/var/www/html
```

**×¢Òâ**£¬inotify µÄĬÈÏÄں˲ÎÊýֵ̫С£º
```
16384 /proc/sys/fs/inotify/max_queued_events
8192 /proc/sys/fs/inotify/max_user_watches
```

"max_user_watches"µÄ´óСȡ¾öÓÚÒª±¸·ÝµÄÕⲿ·ÖÎļþϵͳ°üº¬¶àÉÙĿ¼£¬¿ÉÒÔ

```
sh# find $path -type d | wc -l
```
À´Í³¼Æһϣ¬²¢±£Ö¤Õâ¸öÖµ´óÓÚͳ¼Æ½á¹û¡£

"max_queued_events"Òâζ×Å inotify ¹ÜÀíµÄ¶ÓÁеÄ×î´ó³¤¶È£¬Îļþϵͳ±ä»¯Ô½
Ƶ·±£¬Õâ¸öÖµ¾ÍÓ¦¸ÃÔ½´ó¡£Èç¹ûÄãÔÚÈÕÖ¾Öп´µ½""** Event Queue Overflow **"
ÕâÑùµÄÏûÏ¢£¬Õâ¾ÍÒâζ×Å"max_queued_events"̫С£¬²¢ÇÒ×Ô´ËÖ®ºó¶ÔÓÚÎļþϵͳ
µÄ¼à¿Ø¶¼ÊDz»×¼È·µÄ£¬ÄãÓ¦¸ÃÔÚµ÷Õû²ÎÊýºóÖØÆô"mirrord"¡£

ÕâЩÉèÖÃÖ®ºó£¬¾Í¿ÉÒÔÆô¶¯ mirrord À´¼à¿ØºÍ¼Ç¼ԴÎļþϵͳµÄ±ä»¯ÁË£º
```
server# mirrord
# OR verbose:
server# mirrord -v
```

Äã¿ÉÒÔ×ÔÅäÖÃÎļþ"/etc/python/mirrord_config.py"»òÃüÁîÐÐÀ´µ÷Õû mirrord
µÄÐÐΪ£¬ÀýÈç wmLog µÄ³¤¶È(o.length, ´ËÖµÔ½´ó£¬¾Í»á±£ÁôÔ½¶àµÄ¼Ç¼£¬Õâ
¿ÉÒÔΪ³¤Ê±¼äÍ£Ö¹µÄ fs_mirror ¿Í»§¶Ë´Ó¶ÏµãÖØÆôÌṩ¸ü´óµÄ·½±ã£¬µ«Í¬Ê±Ò²
Òâζ×ÅÔÚ¶ÁÈ¡ºÍ±ä¸ü wmLog ʱÐèÒª¸ü¶àµÄ×ÊÔ´)£¬°ó¶¨µÄ½Ó¿ÚºÍ¶Ë¿Ú£¬ÒÔ¼°
socket µÄ³¬Ê±£¬»òÐèÒª¾µÏñµÄ identity ±êʶ¼¯¡£

mirrord Æô¶¯Ö®ºó£¬µÈ´ýÒ»¶Îʱ¼ä(È¡¾öÓÚÓ²¼þ¡¢ÎļþϵͳÀàÐÍÒÔ¼°ÐèÒª
±¸·Ý/¾µÏñµÄĿ¼/ÎļþÊýÁ¿)£¬µ±"boot init finished"µÄÏûÏ¢±»´òÓ¡µÄʱºò£¬¾Í
¿ÉÒÔÇл»µ½¿Í»§¶Ë²¢Æô¶¯ fs_mirror ÁË¡£

ºóÐøµÄ°æ±¾½«»áÏû³ýÕâ¸öµÈ´ý½×¶Î£¬Ê¹Äã¿ÉÒÔÔÚÆô¶¯ mirrord Ö®ºóÁ¢¼´Æô¶¯
fs_mirror¡£

ÔÚÆô¶¯ fs_mirror ֮ǰ£¬±ØÐë±£Ö¤¿Í»§¶ËÄܹ»Óë mirrord ͨÐŲ¢½øÐÐÆÕͨÎļþ
µÄ´«Êä(Ö»ÐèÒªÆÕͨÎļþ´«Êä)£¬Òò´Ë±ØÐëÔÚ·À»ðǽÉÏÔÊÐí 2123 ¶Ë¿Ú(»òÑ¡ÔñÁí
Ò»¸ö¶Ë¿Ú)£¬ÒÔ¼°ÄãÑ¡ÔñÓÃÀ´´«ÊäÆÕͨÎļþµÄ¶Ë¿Ú -- ¾ÍÏóÔÚ
[The Second Story #ru_data_man_design_second] ºÍ
[The Fifth Story: Monitor #ru_data_man_design_monitor]
ÖÐËùÃèÊöµÄÄÇÑù£¬mirrord/fs_mirror µÄÉè¼ÆÖ§³ÖºÜ¶àÎļþ´«Êä»úÖÆ£¬ÀýÈç FTP,
NFS, SMB/CIFS µÈµÈ... ²»¹ýÄ¿Ç°À´Ëµ£¬ÎÒֻʵÏÖÁËÁ½ÖÖ£ºREPORT ºÍ FTP¡£

"REPORT" ½ö½ö´òÓ¡ÓÉ fs_mirror ½ÓÊÕµ½µÄ wmLog ÖеĶ¯×÷£¬ÕâÈÔÈ»ÊÇÒ»¸öºÜ
ÓÐÓõÄÌØÐÔ£¬ÔÚºóÃæÌÖÂÛ¡£

"FTP" ͬ²½»úÖƽ«´´½¨Ä¿Â¼£¬É¾³ý»òÒƶ¯(µÝ¹é)Ŀ¼/Îļþ£¬ÕâЩ¶¼¿ÉÒÔÔÚ±¾µØ
Íê³É£¬¶øÖ»ÓжÔÆÕͨÎļþµÄд²Ù×÷ÐèҪͨ¹ý FTP ЭÒé½øÐÐʵ¼ÊµÄÎļþ´«Êä²Ù×÷£¬
ÕâÖÖ·½Ê½½µµÍÁËÔÚ·þÎñÆ÷ÉϵÄ×ÊÔ´ÏûºÄ¡£×¢ÒâÕû¸öÎļþ¶¼»á±»´«Ê䣬¶ø²»Êǽö½ö
±»±ä¸üµÄ²¿·Ö£¬ËùÒÔÕâ**²»ÊÇ**Ò»¸ö×Ö½Ú¼¶±ðµÄ´«Ê䣬Òò´Ë²»ÊÊÓÃÓÚ´óµÄ²¢ÇÒ
±ä»¯Æµ·±µÄÎļþ£¬»òÕß˵£¬Èç¹û´óСºÍ±ä»¯Æµ¶ÈµÄ³Ë»ý¹ý´ó£¬»ò"size/seconds"
µÄֵ̫С(ÕâÀï seconds ±íʾ×ÔµÚÒ»´Î´«ÊäÒÔÀ´Ëù¾­¹ýµÄ¼ä¸ô)£¬¶¼²»Êʺϴ«Êä¡£
δÀ´Ò²Ðí»áÔÚ¿Í»§¶Ë×öÒ»¸ö¼ÆËãÒÔÅжÏÊÇ·ñÓ¦¸Ã´«Êä¡£

ÕâЩͬ²½»úÖƶ¨ÒåÔÚ cutils.fs_sync Ä£¿éÖС£

ÔÚÐèÒª¾µÏñµÄÔ´ÎļþϵͳµÄÖ÷»úÉÏ´´½¨Ò»¸öÃ÷ÎÄ"mirror"»ò"backup"µÄÓû§ÊÇ
Ò»¸öºÃÖ÷Ò⣬Õâ¸öÓû§Ó¦¸ÃÓµÓÐÕⲿ·ÖÎļþϵͳµÄ¶ÁȨÏÞ£¬Õâ¿ÉÒÔÀûÓà Linux
µÄ ACL ¹¦ÄÜÀ´ÊµÏÖ£¬²¢Ê¹Õâ¸öÓû§Äܹ»Í¨¹ý FTP ·ÃÎÊ£¬Ò²ÐíÄãÏë½øÒ»²½Ê¹ÓÃ
FTP SSL¡£µ½Ä¿Ç°ÎªÖ¹£¬ÈÏÖ¤»úÖÆ»¹Ã»ÓÐʵÏÖ¡£

±à¼­ fs_mirror µÄÅäÖÃÎļþ"/etc/fs_mirror_config.py"ÒÔ»ñÈ¡¹ØÓÚÅäÖõĸú¶à
ÐÅÏ¢¡£

´Ëʱ£¬Æô¶¯ fs_mirror£º
```
client# fs_mirror
# OR verbose:
client# fs_mirror -v
```
"fs_mirror --help"½«ÌṩÃüÁîÐеĸü¶àÐÅÏ¢¡£

×÷Ϊһ¸öÀý×Ó£¬Äã¿ÉÄÜ»áʹÓÃÈçϵIJÎÊý£º
```
client# fs_mirror -v -o host=roc \
-o fssync.user=root \
-o fssync.port=2121 \
--password-from=/root/.fs_mirror/secrets:roc \
--datadir=/data/fs_mirror/roc
```
ÏÖÔÚ£¬¾µÏñµÄĿ¼/Îļþ½«±»·ÅÔÚ /data/fs_mirror/$hostname ÖУ¬Ñ¡Ïî"-o"
(--option) Óë /etc/python/fs_mirror_config.py ÖÐ o.* ÓµÓÐÏàͬµÄº¬Ò壬
ÈçÇ°ËùÊö¡£ÕâÀhostname ºÍÁ½¸öÎļþͬ²½µÄ²ÎÊý±»¸Ä±äÁË£¬µ±È»Òª±£Ö¤
hostname ¿ÉÒÔ±»½âÎö¡£

Èç¹û verbose ģʽ´ò¿ªÁ˵Ļ°£¬ÔÚÆÁÄ»ÉÏ¿ÉÄÜ»áÓÐÕâÑùµÄÏûÏ¢£º
```
Daemon PID 7094
Connecting to the Mirrord: ('roc', 2123) ...
Conected.
Server reply 'OK' for 'START'
Server reply 'OK' for 'SN:b5e0ce480c925184dbdb6f23a62ddc6d,872302'
Received next serial message: 'SERIAL:862303'
WRITE FILE '/var/Counter/data/5597.dat', PREFIX '/data/fs_mirror/roc'
Received next serial message: 'SERIAL:862306'
CREATE DIR '/var/www/html/sample231.com/syssite', PREFIX
'data/fs_mirror/roc'
WRITE FILE '/var/www/html/sample231.com/sysstie/rec.php', PREFIX
'/data/fs_mirror/roc'
DELETE DIR/FILE '/var/www/html/sample231.com/sysstie/rec.php.old', PREFIX
'/data/fs_mirror/roc'
...
```

ÓÐÒ»¸öÆÕͨÎļþ"$datadir/sn"ÓÃÀ´¼Ç¼ session ºÍ serial number£º
```
sh# cat /data/fs_mirror/roc/sn
b5e0ce480c925184dbdb6f23a62ddc6d,872302
```
Õâ¸öÎļþÔÚ fs_mirror ÐèÒª´Ó¶ÏµãÖØÆôµÄʱºò±»Ê¹Óá£ËüʹÓÃÒ»¸öÎļþËø
(fcntl.LOCK_EX)À´±ÜÃâ¾µÏñÁ½¸öÎļþϵͳµ½Ò»¸öĿ¼£¬»òͬʱ¾µÏñÒ»¸öÎļþϵͳ
Á½´Î(ÔËÐÐÁ½¸öͬÑùµÄ fs_mirror ʵÀý)¡£

ÔÚ[¸ÅÊö #ru_data_man_overview]Ò»½Ú˵¹ý£¬ÂÖת»úÖÆÊDZØÐèµÄ¡£Ä¿Ç°
fs_mirror »¹Ã»ÓÐÄÚÖõÄÂÖתʵÏÖ£¬ÕâÖ»ÄÜÔÚÒÔºóÀ´ÊµÏÖËü£¬µ«ÊÇ¿ÉÒÔ×Ô¼ºÐ´
Ò»¸ö½Å±¾×öÕâ¸öÊÂÇé¡£ÔÚ SVN µÄ repository ÀïÃæµÄ"prototypes"×ÓĿ¼ÀïÓÐ
Á½¸öÀý×Ó£ºprototypes/fs_mirror_rotate.py ºÍ prototypes/mirror_rotate¡£
ÕâÁ½¸ö½Å±¾ÈçÏ£º

prototypes/mirror_rotate:
```
#!/bin/sh

hosts="p01 2121
p02 2121
p03 2121"

cd `dirname $0`

# for host in hosts; do
echo "$hosts" | while read host port; do
    pid=`ps aux | grep "fs_mirror.*$host" | grep -v 'grep' | awk '{print
$2}'`
    if [ $? -eq 0 ]; then
        if [ -n "$pid" ]; then kill $pid; fi
        && ./fs_mirror_rotate.py $host
        && /usr/local/bin/fs_mirror -v
            -o host=$host
            -o fssync.user=root
            -o fssync.port=$port
            --passwd-from=/root/.mirror/secrets:$host
            --datadir=/data/fs_mirror/$host/
    fi
    && cat /data/fs_mirror/$host/www/prima/usermap
        | awk -F, '{printf("%s %s %s %s %s\n", $1, $2, $3, $4, $5)}'
        | while read perm uid user gid site; do
            chown $uid.$gid /data/fs_mirror/$host/www/users/$site -R
            # gid always be ftpd
        done
done
```

prototypes/fs_mirror_rotate.py:
```
#!/usr/bin/python
# -*- encoding: utf-8 -*

import os,sys,shutil
import time
import datetime

mirror = "/data/fs_mirror"
backdir = "/data/hosts"
try:
    host = sys.argv[1]
except IndexError:
    print >> sys.stderr, "Lack of a host identity"
    sys.exit(1)

day = datetime.date(*time.localtime()[:3])
new = os.path.normpath("%s/%s" % (mirror, host))
NL = len(new)
old = os.path.normpath("%s/%s/%s" % (backdir, host, str(day)))
OL = len(old)
shutil.move(new, old)
for root, dirs, files in os.walk(old):
    d_new = os.path.normpath("%s/%s" % (new, root[OL:]))
    os.mkdir(d_new)
    # status = os.lstat(root)
    # perm = status[0]
    # os.chmod(d_new, perm)
    # uid = status[4]
    # gid = status[5]
    # os.chown(d_new, uid, gid)
    try:
        os.chmod(d_new, 0755)
    except OSError:
        pass
    # print "CREATE DIR '%s'" % d_new
    for fname in files:
        f_new = os.path.normpath("%s/%s" % (d_new, fname))
        f_old = os.path.normpath("%s/%s" % (root, fname))
        os.link(f_old, f_new)
        # Hard link will reserve the permission and ownership of a file
        try:
            os.chmod(f_new, 0644)
        except OSError:
            pass
        # print "HARD LINK '%s' -> '%s'" % (f_old, f_new)

interval = datetime.timedelta(days=14)
overdue_day = day - interval
overdue_dir = os.path.normpath("%s/%s/%s" % (backdir, host,
str(overdue_day)))
try:
    shutil.rmtree(overdue_dir)
except OSError, (errno, strerr):
    if errno == 2:
        print strerr
    else:
        raise
```

ʾÀý¹éµµ£º
```
[root在stor p01]# ls -l
total 144
drwxr-xr-x+ 6 root root 4096 Oct 2 03:10 2007-10-03
drwxr-xr-x+ 6 root root 4096 Oct 3 03:10 2007-10-04
drwxr-xr-x+ 6 root root 4096 Oct 4 03:10 2007-10-05
drwxr-xr-x+ 6 root root 4096 Oct 5 03:10 2007-10-06
drwxr-xr-x+ 6 root root 4096 Oct 6 03:10 2007-10-07
drwxr-xr-x+ 6 root root 4096 Oct 7 03:10 2007-10-08
drwxr-xr-x+ 6 root root 4096 Oct 8 03:10 2007-10-09
drwxr-xr-x+ 6 root root 4096 Oct 9 03:10 2007-10-10
drwxr-xr-x+ 6 root root 4096 Oct 10 03:10 2007-10-11
drwxr-xr-x+ 6 root root 4096 Oct 11 03:10 2007-10-12
drwxr-xr-x+ 6 root root 4096 Oct 12 03:10 2007-10-13
drwxr-xr-x+ 6 root root 4096 Oct 13 03:10 2007-10-14
drwxr-xr-x+ 6 root root 4096 Oct 14 03:10 2007-10-15
drwxr-xr-x+ 6 root root 4096 Oct 15 03:10 2007-10-16
[root在stor p01]# ls 2007-10-16/etc/httpd/conf.d -l
total 112
-rw-r--r-- 9 root root 58 Oct 8 13:41 bw_mod.conf
-rw-r--r-- 9 root root 187 Oct 8 13:41 mod_caucho.conf
-rw-r--r-- 9 root root 2965 Oct 8 13:41 site.conf
-rw-r--r-- 9 root root 10919 Oct 8 13:41 ssl.conf
-rw-r--r-- 9 root root 85876 Oct 8 13:41 virtual.conf
```
Ó²Á´½ÓÊýÊÇ 8£¬ÕâÒâζ×ÅÉÏ´ÎÆô¶¯ mirrord ʵÔÚ 2007-10-08¡£

×¢Òâ fs_sync »áÔÚ´«ÊäÒ»¸öÆÕͨÎļþ֮ǰÏÈ×ö unlink£¬ÒÔ±ÜÃâÆÆ»µÂÖתµÄ±¸·Ý
£¬¼ÈÈ»ÂÖת½Å±¾Êµ¼Ê×öµÄ¾ÍÊǼòµ¥µÄ´´½¨Ä¿Â¼ºÍÆÕͨÎļþÓ²Á´½Ó¡£

µ½Ä¿Ç°ÎªÖ¹£¬Ö»Óбä¸ü¶¯×÷(CREATE, FWRITE, DELETE, MOVE)¼°ÆäÏàÓ¦µÄ·¾¶Ãû
±»´«Ê䣬ËùÒÔÈç¹ûĿ¼/ÎļþÓÐÊôÖ÷/ȨÏÞµÄÐèÇ󣬵±Ç°µÄ mirrord/fs_mirror
×ÔÉí²»Äܽâ¾ö£¬ÒªÖªµÀ¸Ä±äÊôÖ÷ºÍȨÏÞÉæ¼°µ½±éÀú²Ù×÷£¬Òò´Ë±È½ÏÏûºÄ×ÊÔ´¡£
ËùÒÔÎÒÔÚÉÏÃæ¸Ä±äÂÖת½Å±¾ÁîÿÌìÆä¸Ä±äÒ»´ÎÊôÖ÷ºÍȨÏÞ£¬Õ⵱Ȼ²»ÊÇÒ»¸öºÜºÃ
µÄ°ì·¨£¬ÌرðÊÇÔÚûÓÐͳһÈÏÖ¤ÖÐÐĵÄÇé¿öÏ¡£ÕâÖÖ¸üÇ¿µÄ¹¦Äܽ«ÔÚÒ»¸öδÀ´µÄ
°æ±¾ÖÐʵÏÖ¡£

ʹÓÃÒ»¸öÈÏÖ¤ÖÐÐÄÊDZȽϺÏÀíµÄ£¬ÀýÈç NIS, LDAP »ò Kerberos£¬ÒòΪ±£³ÖȨÏÞ
ºÍÊôÖ÷µÄÒ»ÖÂÊǺÜÓбØÒªµÄ¡£

**ÎÒ±ØÐëÖ¸³ö¿Í»§¶ËµÄ fs_mirror µ½Ä¿Ç°»¹Ã»Óг¹µ×²âÊÔ**
**ÕâÒ²ÊÇÎÒʱ¼äÓÐÏÞ£¬¾­Ñé²»×ãµÄÔµ¹Ê**
**Òò´ËÄã¿ÉÄÜÐèÒª¶à»¨Ò»Ð©Ê±¼ä×öµ÷Õû**


On 10/17/07, Roc Zhou <chowroc.z+l在gmail.com> wrote:
>
> ÕâÊÇÎÒ×î½üÔÚ×öµÄÒ»¸ö¿ªÔ´ÏîÄ¿£¬·ÅÔÚ sourceforge ÉÏÃæÁË¡£¿ÉÒÔ´ÓÕâÀïÕÒµ½²¢ÏÂÔØ£º
> https://sourceforge.net/projects/crablfs/
>
> Ïà¹ØµÄÎĵµ¿ÉÒÔÔÚ£º
> http://crablfs.sourceforge.net/
> ÕÒµ½¡£ÆäÖÐÓëÎļþϵͳʵʱ¾µÏñÓйصIJ¿·ÖÔÚ£º
> http://crablfs.sourceforge.net/#ru_data_man
>
> Õâ¸öÏîÄ¿ÊÇÁíÒ»¸öÏîÄ¿µÄÒ»¸ö×ÓÏîÄ¿£¬Æä×îÖÕÄ¿±ê£¬ÎÒÏëÊÇ×öÒ»¸öÒ×¹ÜÀíµÄ»ùÓÚ LFS µÄ·¢Ðа棬ËùÒÔÁíÍ⻹ÓÐÁ½¸ö×ÓÏîÄ¿¡£ÆäÖÐÖ®Ò»ÊÇÎÒÒÔÇ°ÔÚ
> LinuxSir ÂÛ̳ÉÏ·¢¹ýµÄÒ»¸ö"»ùÓÚÓû§µÄ°ü¹ÜÀíϵͳ"£º
> http://www.linuxsir.org/bbs/showthread.php?t=277172
> Ö¼ÔÚΪ´ÓÔ´´úÂë±àÒëµÄÈí¼þ°üÌṩһÖÖ·½±ã°²È«µÄ°ü¹ÜÀí·½Ê½£¬ÀýÈçËüÌṩ½»»¥Ä£Ê½£¬ÔÚ½»»¥Ä£Ê½Ï¿ÉÒÔ°´ÕÕ°²×° LFS
> µÄ·½Ê½Ò»²½²½½øÐУ¬ÕâÑù±£ÁôÁËѧϰµÄ¹ý³Ì£»¶øÔÚ½»»¥Ä£Ê½ÏÂÊäÈëµÄ°²×°Ö¸Áî¿ÉÒÔ×Ô¶¯¼Ç¼£¬²¢Ôڷǽ»»¥Ä£Ê½ÏÂ×Ô¶¯ÔËÐУ¬±£ÁôÕâЩģ°åÎļþ£¬¾ÍµÃµ½ÁËÒ»¸öÄã×Ô¼º
> µÄ¶¨ÖÆ·¢Ïְ棬²¢ÇÒÊǺÍÓ²¼þƽ̨Î޹صÄ(×îÖÕÄ¿±êÈç´Ë£¬µ±È»Öм仹ÊÇ»áÓÐЩСÀ§ÄÑ£¬²»¹ýÓ¦¸Ã²»ÄÑ¿Ë·þ)¡£
>
>
> ¶øÕâ¸öÏîÄ¿£¬ÊÇΪÁËÌṩһЩ·½±ãϵͳ¹ÜÀíµÄ¹¤¾ß¼¯£¬±ÈÈ籸·ÝµÈ¡£ÔÚÕâÀÎÒÒªÌÖÂ۵ľÍÊÇÒ»ÖÖ±¸·Ý·½Ê½£ºÊµÊ±¾µÏñ¼ÓÂÖת¡£ÕâÀÂǵÄÖ÷ÒªÊÇÈíÓ²¼þ×ÊÔ´±È½ÏÓÐÏÞµÄÇé¿ö(Çîѽ)£¬ÊÇÒ»ÖֱȽϾ­¼ÃµÄ½â¾ö˼·£¬Èç¹ûÄãÓÐÇ®£¬Ê¹ÓÃÉÌÒµµÄÕóÁкÍÈí¼þÒ²Ðí¸üºÃ¡£
>
> µ±È»£¬ËùÓÐÕâЩ¹¤¾ß¼¯£¬°üÀ¨Ç°ÃæµÄ°ü¹ÜÀíÆ÷£¬Æäʵµ±È»Ò²¿ÉÒÔÓÃÔÚÆäËûÈκη¢ÐаæÉÏÃ棬±ÈÈçÎÒ¾ÍÔÚ×Ô¼ºµÄ RHEL4 µÄ»·¾³ÖÐÓ¦ÓÃÁËÕâЩ¹¤¾ß¡£
>
> ËùÌṩµÄÎĵµ¶¼ÊÇÓ¢Îĵģ¬ÔÚ´úÂëÖеÄ×¢ÊͺÍÄÚ²¿ÎĵµÒ²ÊÇÓ¢Îĵģ¬ÒòΪÔÚÒ»¿ªÊ¼±àдµÄʱºò£¬ÒªÔÚ²»Í¬µÄ»úÆ÷ÉϹ¤×÷£¬ÎÒ×Ô¼ºµÄ LFS ϵͳûÓÐ¼Ó GBK
> Ö§³Ö£¬ÀÏÊdzöÂÒÂë¡£¶øÇÒÖÐÎıàÂë±¾À´¾ÍÊǸöÀÏ´óÄѵÄÎÊÌâÁË£¬ÎÒ×Ô¼ºÒ²ÓÐЩ²»Í¬µÄÏë·¨£¬ËùÒÔË÷ÐÔдӢÎĵģ¬ÔÚ·­ÒëÖÐÎÄÎĵµ£¬²¢ÀûÓà gettext
> ´¦ÀíÄÚ²¿Îĵµ£¬Ò»·½ÃæÒ²Ìá¸ßÏÂ×Ô¼ºµÄÓ¢ÎÄˮƽ¡£
>
> ÓÉÓڱȽÏæµ£¬ÎÒÒ²Ö»Äܼ·Ê±¼äÀ´×öÕâ¸öÊÂÇ飬ËùÒÔÖ»ÄÜÒ»µãÒ»µãµÄд¡£×îºóÐγɵÄÎĵµ£¬Ôò»á¼ÓÈëµ½
> http://crablfs.sourceforge.net/
>
> ÓÉÓÚ±¾ÈËˮƽºÍ¾­ÑéÓÐÏÞ£¬ÄÑÃâç¢Â©ºÍ´íÎ󣬻¶Ó­¶à¶àÖ¸½Ì¡£
>
> лл¡£
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20071017/fd4cced9/attachment-0001.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年10月17日 星期三 11:16

Roc Zhou chowroc.z+l在gmail.com
星期三 十月 17 11:16:51 HKT 2007

Ϊ¸ß¿ÉÓÃ(HA)Éè¼Æ±¸·Ýϵͳ

===Ϊ¸ß¿ÉÓÃ(HA)Éè¼Æ±¸·Ýϵͳ===
ÔÚ[¸ÅÊö #ru_data_man_overview]Ò»½Ú¹ØÓÚ rsync µÄ²¿·ÖµÄʾÀýÖУ¬ÎÒÒѾ­ÌÖÂÛ
¹ýΪ¸ß¿ÉÓýøÐб¸·ÝµÄÎÊÌ⡣ʹÓà mirrord/fs_mirror£¬Ö»ÐèÒª½«"rsync"Ì滻Ϊ
"mirrord"£¬¾ÍµÃµ½ÁËÕâÑùµÄÍØÆË£º
```
ʹÓõȿí×ÖÌåÏÔʾ£º

    +----------+
    |  worker  | -[mirrord] -----------\
    +----------+                       |
       ......                          |
                                       |
    +----------+                       |
    |  worker  | -[mirrord] -----------\
    +----------+                       |
                                       V
                                  [fs_mirror]
                                       |
    +----------+                  +----------+
    |  worker  | -[mirrord] --->  |  backup  |
    +----------+                  +----------+
         |                             |
    [take_over]                        |
         |                             |
         V                             |
    +----------+                       |
    |  rescue  | <------------------- NFS
    +----------+
```
ÕâÖÖ¶à¶ÔÒ»µÄ±¸·ÝÊDZȽϾ­¼ÃµÄ¡£Èç¹ûÒ»¸ö¹¤×÷Ö÷»ú¹ÊÕÏ£¬Äã¿ÉÒÔʹÓþȻ¤Ö÷»ú
Ìæ»»Ëü£¬Í¬Ê±ÀûÓÃһЩ¸ß¿ÉÓõÄÊֶΣ¬ÀýÈç
[The High Availability Linux Project #http://www.linux-ha.org/]
``heartbeat``ÏîÄ¿¡£

ΪÁËʹÔÚ±¸·ÝÖ÷»úÉϵÄ"fs_mirror"Äܹ»¾µÏñÈô¸É¹¤×÷Ö÷»úÉϵÄÎļþϵͳ£¬Ó¦¸Ã
ʹÓÃÈçÏ·½·¨µ÷Óà fs_mirror:
```
client# fs_mirror -v -o host=worker01 -o fssync.user=mirror -o
fssync.port=21 \
        --password-from=/root/.fs_mirror/secrets:worker01
--datadir=/data/fs_mirror/worker01/
client# fs_mirror -v -o host=worker02 -o fssync.user=mirror -o
fssync.port=21 \
        --password-from=/root/.fs_mirror/secrets:worker02
--datadir=/data/fs_mirror/worker02/
```

±£Ö¤Ö÷»úÃû¿ÉÒÔ±»½âÎö£¬ÒÔ¼°Óû§"mirror"´æÔÚÓë·þÎñÆ÷ÉÏ£¬²¢ÓµÓÐÕû¸öÐèÒª
¾µÏñµÄÎļþϵͳµÄ¶ÁȡȨÏÞ(ÍƼöʹÓà Linux ACL)¡£

ÈçÇ°ËùÊö£¬Ê¹ÓÃÕâÖÖ·½·¨£¬Äã¿ÉÒ԰ɲ»Í¬Ö÷»úµÄÎļþϵͳ¾µÏñµ½²»Í¬µÄ×ÓĿ¼ÖÐ
£¬È»ºó´´½¨Èô¸ÉÕýÈ·µÄ·ûºÅÁ´½Ó£¬ÒÔÀûÓڽӹܡ£

On 10/17/07, Roc Zhou <chowroc.z+l在gmail.com> wrote:
>
> ÕâÊÇÎÒ×î½üÔÚ×öµÄÒ»¸ö¿ªÔ´ÏîÄ¿£¬·ÅÔÚ sourceforge ÉÏÃæÁË¡£¿ÉÒÔ´ÓÕâÀïÕÒµ½²¢ÏÂÔØ£º
> https://sourceforge.net/projects/crablfs/
>
> Ïà¹ØµÄÎĵµ¿ÉÒÔÔÚ£º
> http://crablfs.sourceforge.net/
> ÕÒµ½¡£ÆäÖÐÓëÎļþϵͳʵʱ¾µÏñÓйصIJ¿·ÖÔÚ£º
> http://crablfs.sourceforge.net/#ru_data_man
>
> Õâ¸öÏîÄ¿ÊÇÁíÒ»¸öÏîÄ¿µÄÒ»¸ö×ÓÏîÄ¿£¬Æä×îÖÕÄ¿±ê£¬ÎÒÏëÊÇ×öÒ»¸öÒ×¹ÜÀíµÄ»ùÓÚ LFS µÄ·¢Ðа棬ËùÒÔÁíÍ⻹ÓÐÁ½¸ö×ÓÏîÄ¿¡£ÆäÖÐÖ®Ò»ÊÇÎÒÒÔÇ°ÔÚ
> LinuxSir ÂÛ̳ÉÏ·¢¹ýµÄÒ»¸ö"»ùÓÚÓû§µÄ°ü¹ÜÀíϵͳ"£º
> http://www.linuxsir.org/bbs/showthread.php?t=277172
> Ö¼ÔÚΪ´ÓÔ´´úÂë±àÒëµÄÈí¼þ°üÌṩһÖÖ·½±ã°²È«µÄ°ü¹ÜÀí·½Ê½£¬ÀýÈçËüÌṩ½»»¥Ä£Ê½£¬ÔÚ½»»¥Ä£Ê½Ï¿ÉÒÔ°´ÕÕ°²×° LFS
> µÄ·½Ê½Ò»²½²½½øÐУ¬ÕâÑù±£ÁôÁËѧϰµÄ¹ý³Ì£»¶øÔÚ½»»¥Ä£Ê½ÏÂÊäÈëµÄ°²×°Ö¸Áî¿ÉÒÔ×Ô¶¯¼Ç¼£¬²¢Ôڷǽ»»¥Ä£Ê½ÏÂ×Ô¶¯ÔËÐУ¬±£ÁôÕâЩģ°åÎļþ£¬¾ÍµÃµ½ÁËÒ»¸öÄã×Ô¼º
> µÄ¶¨ÖÆ·¢Ïְ棬²¢ÇÒÊǺÍÓ²¼þƽ̨Î޹صÄ(×îÖÕÄ¿±êÈç´Ë£¬µ±È»Öм仹ÊÇ»áÓÐЩСÀ§ÄÑ£¬²»¹ýÓ¦¸Ã²»ÄÑ¿Ë·þ)¡£
>
>
> ¶øÕâ¸öÏîÄ¿£¬ÊÇΪÁËÌṩһЩ·½±ãϵͳ¹ÜÀíµÄ¹¤¾ß¼¯£¬±ÈÈ籸·ÝµÈ¡£ÔÚÕâÀÎÒÒªÌÖÂ۵ľÍÊÇÒ»ÖÖ±¸·Ý·½Ê½£ºÊµÊ±¾µÏñ¼ÓÂÖת¡£ÕâÀÂǵÄÖ÷ÒªÊÇÈíÓ²¼þ×ÊÔ´±È½ÏÓÐÏÞµÄÇé¿ö(Çîѽ)£¬ÊÇÒ»ÖֱȽϾ­¼ÃµÄ½â¾ö˼·£¬Èç¹ûÄãÓÐÇ®£¬Ê¹ÓÃÉÌÒµµÄÕóÁкÍÈí¼þÒ²Ðí¸üºÃ¡£
>
> µ±È»£¬ËùÓÐÕâЩ¹¤¾ß¼¯£¬°üÀ¨Ç°ÃæµÄ°ü¹ÜÀíÆ÷£¬Æäʵµ±È»Ò²¿ÉÒÔÓÃÔÚÆäËûÈκη¢ÐаæÉÏÃ棬±ÈÈçÎÒ¾ÍÔÚ×Ô¼ºµÄ RHEL4 µÄ»·¾³ÖÐÓ¦ÓÃÁËÕâЩ¹¤¾ß¡£
>
> ËùÌṩµÄÎĵµ¶¼ÊÇÓ¢Îĵģ¬ÔÚ´úÂëÖеÄ×¢ÊͺÍÄÚ²¿ÎĵµÒ²ÊÇÓ¢Îĵģ¬ÒòΪÔÚÒ»¿ªÊ¼±àдµÄʱºò£¬ÒªÔÚ²»Í¬µÄ»úÆ÷ÉϹ¤×÷£¬ÎÒ×Ô¼ºµÄ LFS ϵͳûÓÐ¼Ó GBK
> Ö§³Ö£¬ÀÏÊdzöÂÒÂë¡£¶øÇÒÖÐÎıàÂë±¾À´¾ÍÊǸöÀÏ´óÄѵÄÎÊÌâÁË£¬ÎÒ×Ô¼ºÒ²ÓÐЩ²»Í¬µÄÏë·¨£¬ËùÒÔË÷ÐÔдӢÎĵģ¬ÔÚ·­ÒëÖÐÎÄÎĵµ£¬²¢ÀûÓà gettext
> ´¦ÀíÄÚ²¿Îĵµ£¬Ò»·½ÃæÒ²Ìá¸ßÏÂ×Ô¼ºµÄÓ¢ÎÄˮƽ¡£
>
> ÓÉÓڱȽÏæµ£¬ÎÒÒ²Ö»Äܼ·Ê±¼äÀ´×öÕâ¸öÊÂÇ飬ËùÒÔÖ»ÄÜÒ»µãÒ»µãµÄд¡£×îºóÐγɵÄÎĵµ£¬Ôò»á¼ÓÈëµ½
> http://crablfs.sourceforge.net/
>
> ÓÉÓÚ±¾ÈËˮƽºÍ¾­ÑéÓÐÏÞ£¬ÄÑÃâç¢Â©ºÍ´íÎ󣬻¶Ó­¶à¶àÖ¸½Ì¡£
>
> лл¡£
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20071017/2a998c2c/attachment.htm 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年10月17日 星期三 11:17

Roc Zhou chowroc.z+l在gmail.com
星期三 十月 17 11:17:59 HKT 2007

ÒÔ IDS µÄ·½Ê½ÔËÐÐ

===ÒÔ IDS µÄ·½Ê½ÔËÐÐ===[ru_data_man_usage_ids]
mirrord/fs_mirror Ò»¸öÔ¤ÁÏÖ®ÍâµÄÓô¦ÊÇ×÷Ϊ IDS(Intrusion Detection
System ÈëÇÖ¼à²âϵͳ)À´ÔËÐУ¬´ËʱʹÓà fs_sync µÄ"REPORT"»úÖÆ£¬Õâ¿ÉÒÔÔÚ
ijÖ̶ֳÈÉϱ»¿´×÷ÊÇʵʱµÄ``tripware``¡£ÔÚ·þÎñÆ÷¶Ë£¬½«ÄÇЩ²»»áƵ·±±ä¶¯µÄ
Îļþϵͳ²¿·ÖÖÃÓÚ mirrord(inotify) µÄ¼à¿Ø֮ϣ¬ÀýÈçËùÓеĿÉÖ´ÐÐÎļþ£¬
ÒÔ¼°ÅäÖÃÎļþ£¬ÔÚ¿Í»§¶Ë£¬ÒÔ "REPORT" ģʽÔËÐÐ fs_mirror£¬ÔòÔÚ·þÎñÆ÷ÉϵÄ
ËùÓÐÖØÒªµÄ±ä¸ü¶¼Äܹ»¼°Ê±µÄ±»±¨¸æ¡£

ÔÚ ¿Í»§¶ËÉÏΪÕâÖÖ IDS Ó¦ÓÃʵÏÖÒ»¸ö GUI ¿´ÉÏÈ¥²»´í£¬ÕâÑùÎҾͿÉÒÔÔÚÎÒµÄ
PC »úÉÏÅÜÁË£¬ÀýÈ繫˾µÄ Windows ϵͳ¡£

Ä¿Ç°À´Ëµ£¬Õâ¸öÎÊÌ⻹ûÓÐÉîÈ뿼ÂÇ£¬Ò»Ð©±È½ÏÖØÒªµÄÌØÐÔÀýÈç SSL Ö§³Ö»¹
ûÓмÓÈ룬²»¹ýÕâÖÖʹÓ÷½Ê½ÊÇ¿ÉÒԿ϶¨µÄ¡£


On 10/17/07, Roc Zhou <chowroc.z+l在gmail.com> wrote:
>
> ÕâÊÇÎÒ×î½üÔÚ×öµÄÒ»¸ö¿ªÔ´ÏîÄ¿£¬·ÅÔÚ sourceforge ÉÏÃæÁË¡£¿ÉÒÔ´ÓÕâÀïÕÒµ½²¢ÏÂÔØ£º
> https://sourceforge.net/projects/crablfs/
>
> Ïà¹ØµÄÎĵµ¿ÉÒÔÔÚ£º
> http://crablfs.sourceforge.net/
> ÕÒµ½¡£ÆäÖÐÓëÎļþϵͳʵʱ¾µÏñÓйصIJ¿·ÖÔÚ£º
> http://crablfs.sourceforge.net/#ru_data_man
>
> Õâ¸öÏîÄ¿ÊÇÁíÒ»¸öÏîÄ¿µÄÒ»¸ö×ÓÏîÄ¿£¬Æä×îÖÕÄ¿±ê£¬ÎÒÏëÊÇ×öÒ»¸öÒ×¹ÜÀíµÄ»ùÓÚ LFS µÄ·¢Ðа棬ËùÒÔÁíÍ⻹ÓÐÁ½¸ö×ÓÏîÄ¿¡£ÆäÖÐÖ®Ò»ÊÇÎÒÒÔÇ°ÔÚ
> LinuxSir ÂÛ̳ÉÏ·¢¹ýµÄÒ»¸ö"»ùÓÚÓû§µÄ°ü¹ÜÀíϵͳ"£º
> http://www.linuxsir.org/bbs/showthread.php?t=277172
> Ö¼ÔÚΪ´ÓÔ´´úÂë±àÒëµÄÈí¼þ°üÌṩһÖÖ·½±ã°²È«µÄ°ü¹ÜÀí·½Ê½£¬ÀýÈçËüÌṩ½»»¥Ä£Ê½£¬ÔÚ½»»¥Ä£Ê½Ï¿ÉÒÔ°´ÕÕ°²×° LFS
> µÄ·½Ê½Ò»²½²½½øÐУ¬ÕâÑù±£ÁôÁËѧϰµÄ¹ý³Ì£»¶øÔÚ½»»¥Ä£Ê½ÏÂÊäÈëµÄ°²×°Ö¸Áî¿ÉÒÔ×Ô¶¯¼Ç¼£¬²¢Ôڷǽ»»¥Ä£Ê½ÏÂ×Ô¶¯ÔËÐУ¬±£ÁôÕâЩģ°åÎļþ£¬¾ÍµÃµ½ÁËÒ»¸öÄã×Ô¼º
> µÄ¶¨ÖÆ·¢Ïְ棬²¢ÇÒÊǺÍÓ²¼þƽ̨Î޹صÄ(×îÖÕÄ¿±êÈç´Ë£¬µ±È»Öм仹ÊÇ»áÓÐЩСÀ§ÄÑ£¬²»¹ýÓ¦¸Ã²»ÄÑ¿Ë·þ)¡£
>
>
> ¶øÕâ¸öÏîÄ¿£¬ÊÇΪÁËÌṩһЩ·½±ãϵͳ¹ÜÀíµÄ¹¤¾ß¼¯£¬±ÈÈ籸·ÝµÈ¡£ÔÚÕâÀÎÒÒªÌÖÂ۵ľÍÊÇÒ»ÖÖ±¸·Ý·½Ê½£ºÊµÊ±¾µÏñ¼ÓÂÖת¡£ÕâÀÂǵÄÖ÷ÒªÊÇÈíÓ²¼þ×ÊÔ´±È½ÏÓÐÏÞµÄÇé¿ö(Çîѽ)£¬ÊÇÒ»ÖֱȽϾ­¼ÃµÄ½â¾ö˼·£¬Èç¹ûÄãÓÐÇ®£¬Ê¹ÓÃÉÌÒµµÄÕóÁкÍÈí¼þÒ²Ðí¸üºÃ¡£
>
> µ±È»£¬ËùÓÐÕâЩ¹¤¾ß¼¯£¬°üÀ¨Ç°ÃæµÄ°ü¹ÜÀíÆ÷£¬Æäʵµ±È»Ò²¿ÉÒÔÓÃÔÚÆäËûÈκη¢ÐаæÉÏÃ棬±ÈÈçÎÒ¾ÍÔÚ×Ô¼ºµÄ RHEL4 µÄ»·¾³ÖÐÓ¦ÓÃÁËÕâЩ¹¤¾ß¡£
>
> ËùÌṩµÄÎĵµ¶¼ÊÇÓ¢Îĵģ¬ÔÚ´úÂëÖеÄ×¢ÊͺÍÄÚ²¿ÎĵµÒ²ÊÇÓ¢Îĵģ¬ÒòΪÔÚÒ»¿ªÊ¼±àдµÄʱºò£¬ÒªÔÚ²»Í¬µÄ»úÆ÷ÉϹ¤×÷£¬ÎÒ×Ô¼ºµÄ LFS ϵͳûÓÐ¼Ó GBK
> Ö§³Ö£¬ÀÏÊdzöÂÒÂë¡£¶øÇÒÖÐÎıàÂë±¾À´¾ÍÊǸöÀÏ´óÄѵÄÎÊÌâÁË£¬ÎÒ×Ô¼ºÒ²ÓÐЩ²»Í¬µÄÏë·¨£¬ËùÒÔË÷ÐÔдӢÎĵģ¬ÔÚ·­ÒëÖÐÎÄÎĵµ£¬²¢ÀûÓà gettext
> ´¦ÀíÄÚ²¿Îĵµ£¬Ò»·½ÃæÒ²Ìá¸ßÏÂ×Ô¼ºµÄÓ¢ÎÄˮƽ¡£
>
> ÓÉÓڱȽÏæµ£¬ÎÒÒ²Ö»Äܼ·Ê±¼äÀ´×öÕâ¸öÊÂÇ飬ËùÒÔÖ»ÄÜÒ»µãÒ»µãµÄд¡£×îºóÐγɵÄÎĵµ£¬Ôò»á¼ÓÈëµ½
> http://crablfs.sourceforge.net/
>
> ÓÉÓÚ±¾ÈËˮƽºÍ¾­ÑéÓÐÏÞ£¬ÄÑÃâç¢Â©ºÍ´íÎ󣬻¶Ó­¶à¶àÖ¸½Ì¡£
>
> лл¡£
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20071017/495947e6/attachment.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年10月17日 星期三 11:35

Jiahua Huang jhuangjiahua在gmail.com
星期三 十月 17 11:35:09 HKT 2007

直接用 zfs 做镜像 :)

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年10月17日 星期三 12:34

Fluke fluke.l在gmail.com
星期三 十月 17 12:34:52 HKT 2007

ºÃ²»ÈÝÒ׿´ÍêÁË£¬ºÜÓÐÊÕ»ñ°¢¡£

¿ÉϧÎÒÕâ·½ÃæûÓÐʲôʵ¼Ê¾­Ñ飬°ï²»ÉÏʲô¡£Ö§³Ö¹úÈË¿ªÔ´ÏîÄ¿°¢!

¸ÕºÃÎÒÃÇÕâÕó×Ó¿ªÊ¼±ÏÒµÉè¼ÆÑ¡Ì⣬Èç¹û²»ÊÇÇ°¼¸ÌìÒѾ­¾ö¶¨×ö¸öÀàËÆdjangoÕâÑùµÄ¶«Î÷£¬ÎÒÒ²¿ÉÒÔ°ÑÎļþϵͳ×÷ΪÑо¿¿ÎÌâµÄ£¬¿ÉϧÁË¡£

On 10/17/07, Roc Zhou <chowroc.z+l在gmail.com> wrote:
>
> ÒÔ IDS µÄ·½Ê½ÔËÐÐ
>
> ===ÒÔ IDS µÄ·½Ê½ÔËÐÐ===[ru_data_man_usage_ids]
> mirrord/fs_mirror Ò»¸öÔ¤ÁÏÖ®ÍâµÄÓô¦ÊÇ×÷Ϊ IDS(Intrusion Detection
> System ÈëÇÖ¼à²âϵͳ)À´ÔËÐУ¬´ËʱʹÓà fs_sync µÄ"REPORT"»úÖÆ£¬Õâ¿ÉÒÔÔÚ
> ijÖ̶ֳÈÉϱ»¿´×÷ÊÇʵʱµÄ``tripware``¡£ÔÚ·þÎñÆ÷¶Ë£¬½«ÄÇЩ²»»áƵ·±±ä¶¯µÄ
> Îļþϵͳ²¿·ÖÖÃÓÚ mirrord(inotify) µÄ¼à¿Ø֮ϣ¬ÀýÈçËùÓеĿÉÖ´ÐÐÎļþ£¬
> ÒÔ¼°ÅäÖÃÎļþ£¬ÔÚ¿Í»§¶Ë£¬ÒÔ "REPORT" ģʽÔËÐÐ fs_mirror£¬ÔòÔÚ·þÎñÆ÷ÉϵÄ
> ËùÓÐÖØÒªµÄ±ä¸ü¶¼Äܹ»¼°Ê±µÄ±»±¨¸æ¡£
>
> ÔÚ ¿Í»§¶ËÉÏΪÕâÖÖ IDS Ó¦ÓÃʵÏÖÒ»¸ö GUI ¿´ÉÏÈ¥²»´í£¬ÕâÑùÎҾͿÉÒÔÔÚÎÒµÄ
> PC »úÉÏÅÜÁË£¬ÀýÈ繫˾µÄ Windows ϵͳ¡£
>
> Ä¿Ç°À´Ëµ£¬Õâ¸öÎÊÌ⻹ûÓÐÉîÈ뿼ÂÇ£¬Ò»Ð©±È½ÏÖØÒªµÄÌØÐÔÀýÈç SSL Ö§³Ö»¹
> ûÓмÓÈ룬²»¹ýÕâÖÖʹÓ÷½Ê½ÊÇ¿ÉÒԿ϶¨µÄ¡£
>
>
> On 10/17/07, Roc Zhou <chowroc.z+l在gmail.com> wrote:
> >
> > ÕâÊÇÎÒ×î½üÔÚ×öµÄÒ»¸ö¿ªÔ´ÏîÄ¿£¬·ÅÔÚ sourceforge ÉÏÃæÁË¡£¿ÉÒÔ´ÓÕâÀïÕÒµ½²¢ÏÂÔØ£º
> > https://sourceforge.net/projects/crablfs/
> >
> > Ïà¹ØµÄÎĵµ¿ÉÒÔÔÚ£º
> > http://crablfs.sourceforge.net/
> > ÕÒµ½¡£ÆäÖÐÓëÎļþϵͳʵʱ¾µÏñÓйصIJ¿·ÖÔÚ£º
> > http://crablfs.sourceforge.net/#ru_data_man
> >
> > Õâ¸öÏîÄ¿ÊÇÁíÒ»¸öÏîÄ¿µÄÒ»¸ö×ÓÏîÄ¿£¬Æä×îÖÕÄ¿±ê£¬ÎÒÏëÊÇ×öÒ»¸öÒ×¹ÜÀíµÄ»ùÓÚ LFS µÄ·¢Ðа棬ËùÒÔÁíÍ⻹ÓÐÁ½¸ö×ÓÏîÄ¿¡£ÆäÖÐÖ®Ò»ÊÇÎÒÒÔÇ°ÔÚ
> > LinuxSir ÂÛ̳ÉÏ·¢¹ýµÄÒ»¸ö"»ùÓÚÓû§µÄ°ü¹ÜÀíϵͳ"£º
> > http://www.linuxsir.org/bbs/showthread.php?t=277172
> > Ö¼ÔÚΪ´ÓÔ´´úÂë±àÒëµÄÈí¼þ°üÌṩһÖÖ·½±ã°²È«µÄ°ü¹ÜÀí·½Ê½£¬ÀýÈçËüÌṩ½»»¥Ä£Ê½£¬ÔÚ½»»¥Ä£Ê½Ï¿ÉÒÔ°´ÕÕ°²×° LFS
> > µÄ·½Ê½Ò»²½²½½øÐУ¬ÕâÑù±£ÁôÁËѧϰµÄ¹ý³Ì£»¶øÔÚ½»»¥Ä£Ê½ÏÂÊäÈëµÄ°²×°Ö¸Áî¿ÉÒÔ×Ô¶¯¼Ç¼£¬²¢Ôڷǽ»»¥Ä£Ê½ÏÂ×Ô¶¯ÔËÐУ¬±£ÁôÕâЩģ°åÎļþ£¬¾ÍµÃµ½ÁËÒ»¸öÄã×Ô¼º
> > µÄ¶¨ÖÆ·¢Ïְ棬²¢ÇÒÊǺÍÓ²¼þƽ̨Î޹صÄ(×îÖÕÄ¿±êÈç´Ë£¬µ±È»Öм仹ÊÇ»áÓÐЩСÀ§ÄÑ£¬²»¹ýÓ¦¸Ã²»ÄÑ¿Ë·þ)¡£
> >
> >
> > ¶øÕâ¸öÏîÄ¿£¬ÊÇΪÁËÌṩһЩ·½±ãϵͳ¹ÜÀíµÄ¹¤¾ß¼¯£¬±ÈÈ籸·ÝµÈ¡£ÔÚÕâÀÎÒÒªÌÖÂ۵ľÍÊÇÒ»ÖÖ±¸·Ý·½Ê½£ºÊµÊ±¾µÏñ¼ÓÂÖת¡£ÕâÀÂǵÄÖ÷ÒªÊÇÈíÓ²¼þ×ÊÔ´±È½ÏÓÐÏÞµÄÇé¿ö(Çîѽ)£¬ÊÇÒ»ÖֱȽϾ­¼ÃµÄ½â¾ö˼·£¬Èç¹ûÄãÓÐÇ®£¬Ê¹ÓÃÉÌÒµµÄÕóÁкÍÈí¼þÒ²Ðí¸üºÃ¡£
> >
> > µ±È»£¬ËùÓÐÕâЩ¹¤¾ß¼¯£¬°üÀ¨Ç°ÃæµÄ°ü¹ÜÀíÆ÷£¬Æäʵµ±È»Ò²¿ÉÒÔÓÃÔÚÆäËûÈκη¢ÐаæÉÏÃ棬±ÈÈçÎÒ¾ÍÔÚ×Ô¼ºµÄ RHEL4 µÄ»·¾³ÖÐÓ¦ÓÃÁËÕâЩ¹¤¾ß¡£
> >
> > ËùÌṩµÄÎĵµ¶¼ÊÇÓ¢Îĵģ¬ÔÚ´úÂëÖеÄ×¢ÊͺÍÄÚ²¿ÎĵµÒ²ÊÇÓ¢Îĵģ¬ÒòΪÔÚÒ»¿ªÊ¼±àдµÄʱºò£¬ÒªÔÚ²»Í¬µÄ»úÆ÷ÉϹ¤×÷£¬ÎÒ×Ô¼ºµÄ LFS ϵͳûÓÐ¼Ó GBK
> > Ö§³Ö£¬ÀÏÊdzöÂÒÂë¡£¶øÇÒÖÐÎıàÂë±¾À´¾ÍÊǸöÀÏ´óÄѵÄÎÊÌâÁË£¬ÎÒ×Ô¼ºÒ²ÓÐЩ²»Í¬µÄÏë·¨£¬ËùÒÔË÷ÐÔдӢÎĵģ¬ÔÚ·­ÒëÖÐÎÄÎĵµ£¬²¢ÀûÓà gettext
> > ´¦ÀíÄÚ²¿Îĵµ£¬Ò»·½ÃæÒ²Ìá¸ßÏÂ×Ô¼ºµÄÓ¢ÎÄˮƽ¡£
> >
> > ÓÉÓڱȽÏæµ£¬ÎÒÒ²Ö»Äܼ·Ê±¼äÀ´×öÕâ¸öÊÂÇ飬ËùÒÔÖ»ÄÜÒ»µãÒ»µãµÄд¡£×îºóÐγɵÄÎĵµ£¬Ôò»á¼ÓÈëµ½
> > http://crablfs.sourceforge.net/
> >
> > ÓÉÓÚ±¾ÈËˮƽºÍ¾­ÑéÓÐÏÞ£¬ÄÑÃâç¢Â©ºÍ´íÎ󣬻¶Ó­¶à¶àÖ¸½Ì¡£
> >
> > лл¡£
>
>
>
> _______________________________________________
> python-chinese
> Post: send python-chinese在lists.python.cn
> Subscribe: send subscribe to python-chinese-request在lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>



-- 
Yours,
  fluke
fluke在sfcube.net
http://blog.ospattern.net
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20071017/c665cad1/attachment.htm 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年10月17日 星期三 13:13

Roc Zhou chowroc.z+l在gmail.com
星期三 十月 17 13:13:51 HKT 2007

ÄãºÃ£¬·Ç³£¸ÐлÄãµÄ½¨Òé¡£

²»¹ýÓм¸¸öÎÊÌâ²»ÊÇÌ«Çå³þ£¬ËäÈ»¸Õ²Å´óÖµÄä¯ÀÀÁËһϠZFS µÄ×ÊÁÏ¡£

µÚÒ»ÊÇÄã˵µÄÕâ¸ö¾µÏñÊÇÒ»¸öÔõÑùµÄ¾µÏñ£¬´ÓÎÒ¸Õ²ÅÁ˽âµÄÇé¿öÀ´¿´£¬ËƺõÖ÷Òª»¹ÊÇÕë¶ÔÓ²¼þ´ÅÅÌÕâЩµÄ¾µÏñ£¬µ«ÎÒ¿¼ÂǵÄÖ÷ÒªÊÇÔÚ²»Í¬µÄÖ÷»úÖ®¼äͨ¹ýÍøÂç×ö¾µÏñ£¬½«ÄÚÈݱ¸·Ýµ½Ò»¸öÔ¶¶ËµÄÖ÷»ú£¬Ò²ÐíÔÚµØÀíÉÏ»áÓбȽϴóµÄ¾àÀëµÄÇé¿öÒ²ÊÇ¿ÉÒÔÊÊÓõġ£Í¨¹ýÕâÖÖ·½·¨£¬ÎÒ²»ÔÙÐèÒªÖÜÆÚÐÔµÄÔÚ·þÎñÆ÷ÉÏÖÆÔìÒ»¸ö¶ÁÈ¡¸ß·åÀ´½øÐб¸·Ý(µ±È»ÔÚ±¸·ÝÖ÷»úÉÏ»áÓÐÒ»¸öÂÖת£¬µ«Õâ²¢²»ÏûºÄ·þÎñÆ÷µÄ×ÊÔ´)£¬ÕâÑùÎҾͽ«·þÎñÆ÷µÄ×ÊÔ´ÀûÓÃÔÚʱ¼ä·Ö²¼ÉÏƽ¾ù»¯ÁË¡£

µÚ¶þÊÇÎÒ¿¼ÂǵÄÊÇÔÚÈíÓ²¼þ×ÊÔ´ºÜÓÐÏÞµÄÇé¿öÏÂÔõô¸ü¾­¼ÃµÄ½â¾ö±¸·ÝµÄÎÊÌ⣬ÎÒ²»´ó¿ÉÄÜȥʹÓÃÄÇЩ°º¹óµÄÉÌÒµÈí¼þºÍÓ²¼þ£¬¶ø ZFS
Ëƺõ»¹ÊÇÕë¶Ô´óÐ͵ļ¯Öд洢À´Éè¼Æ£¬Òò´ËËƺõ»¹ÊÇÐèÒª±È½Ï´óµÄÉÌÒµ»¯µÄÈíÓ²¼þ£¬±ÈÈçÔÚËüµÄ FAQ ÀïÃæÌáµ½£º

   1. *Which third party backup products support ZFS?*
      - EMC Networker 7.3.2. backs up and restores ZFS file systems,
      including ZFS ACLs.
      - Veritas Netbackup will provide Netbackup support in version
      6.5, which is scheduled for release in the second half of 2007.
      Current versions of Netbackup can backup and restore ZFS file
systems, but
      ZFS ACLs are not preserved.
      - IBM Tivoli Storage Manager client software (5.4.1.2) backs up
      and restores ZFS file systems with both the CLI and the GUI. ZFS ACLs are
      also preserved.
      - Computer Associates' BrightStor ARCserve product backs up and
      restores ZFS file systems, but ZFS ACLs are not preserved.

±¾È˼ûʶÓÐÏÞ£¬Èç¹ûÀí½âÓÐÎÊÌ⣬»¹Íû²»ÁߴͽÌѽ :P

лл¡£

On 10/17/07, Jiahua Huang <jhuangjiahua在gmail.com> wrote:
>
> Ö±½ÓÓà zfs ×ö¾µÏñ :)
> _______________________________________________
> python-chinese
> Post: send python-chinese在lists.python.cn
> Subscribe: send subscribe to python-chinese-request在lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20071017/2581cfe1/attachment.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年10月17日 星期三 16:00

Bruce Wang number5在gmail.com
星期三 十月 17 16:00:40 HKT 2007

On 10/17/07, Roc Zhou <chowroc.z+l在gmail.com> wrote:
>
> 这是我最近在做的一个开源项目,放在 sourceforge 上面了。可以从这里找到并下载:
> https://sourceforge.net/projects/crablfs/
>
>
和 DRBD(http://www.drbd.org/) 相比有什么不同? 各自的优缺点?



-- 
simple is good
http://brucewang.net
http://twitter.com/number5
http://www.linkist.com
skype: number5
-------------- 下一部分 --------------
一个HTML附件被移除...
URL: http://python.cn/pipermail/python-chinese/attachments/20071017/6bec01e9/attachment.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年10月17日 星期三 16:44

Roc Zhou chowroc.z+l在gmail.com
星期三 十月 17 16:44:03 HKT 2007

ÄãºÃ£¬

ллÄãµÄ»Ø¸´¡£

Ó¦¸Ã˵ DRBD ¿ÉÒÔ˵ÊÇÍêȫʵʱµÄ¡¢bytes level µÄ·½°¸¡£²»¹ýÎÒ¾õµÃÎÒ»¹ÊÇÓÐ
¼¸¸ö·½ÃæµÄ¿¼ÂÇ£º

ÆäÒ»ÊǾ­¼Ã·½ÃæµÄ¿¼ÂÇ¡£ÔÚÎÒÏÖÔÚµÄÇé¿öÏ£¬ÎÒ¿ÉÒÔʵÏÖ¶à¶ÔÒ»£¬Òò´Ë¿ÉÒÔÓÃÒ»
µ½Á½Ì¨Ö÷»úÖ§³Å³¬¹ý3̨ÉõÖÁ¸ü¶àµÄÖ÷»úµÄ¸ß¿ÉÓÃ(µ±È»»¹ÓÐһЩϸ½ÚÐèÒªÍêÉƵÄ)£¬
¶øÇÒÒ»°ãµÄ PC »ú¾Í¿ÉÒÔÁË£¬²»ÐèÒª°º¹óµÄÉ豸ºÍ¸´ÔÓµÄÈíÓ²¼þÉèÖá£

Æä¶þÊǿɹÜÀíÐÔ£¬ÏÖÔÚ¿ÉÒÔʵÏÖÒ»¸ö°üº¬ºÍÅųýÉèÖ㬿ÉÒÔ°´ÕÕ ID ±¸·ÝÖ»ÐèÒª
µÄÄDz¿·Ö£¬Í¬Ê±ÓÖÅųýÆäÖÐûÓõÄÄÚÈÝ¡£

Ïó bytes level ¼¶±ðµÄ»°£¬Ëƺõ²»ÄÜÇø·ÖÏóĿ¼´´½¨¡¢Îļþ/Ŀ¼µÄɾ³ýºÍÒƶ¯£¬
ÕâЩ¶¼Ó¦¸Ã»áµ¼Ö±ȽϴóµÄÍøÂç´«Ê䣬¶øʵ¼ÊÉϱ¾À´Ó¦¸Ã¿ÉÒÔÔÚ±¸·ÝÖ÷»úÉÏÖ±½Ó
Íê³É¶ø²»±ØÏûºÄ·þÎñÆ÷ÉϵÄ×ÊÔ´µÄ¡£

µ±È»£¬ÁíÍâ¾ÍÊǼòµ¥¹¹½¨£¬²»Óøü¸ÄÄںˡ£

ÔÚÕߣ¬¾ÝÎÒÁ˽⣬DRBD ºÃÏñÖ»ÄÜÓÃÓڸ߿ÉÓã¬ÎÒÒ²ÔÚ¿¼ÂǹØÓÚ·Ö²¼Ê½µÄÓ¦ÓÃÊÇ·ñ
¿ÉÐУ¬ÆðÂë¿´¿´ÄÜ·ñһд¶à¶ÁµÄģʽ£¬µ±È»ÏÖÔÚ¿¼Âǵû¹²»ÊǺܳä·Ö£¬µ«ÎÒÏëÓ¦¸Ã
Ò²ÊÇ¿ÉÒÔʵÏֵġ£

µ±È» DRBD ÎÒ»¹Ã»ÓÐÉîÈëÑо¿¹ý£¬Èç¹ûÓв»µ±Ö®´¦£¬Ï£ÍûÖ¸³ö¡£

лл¡£


On 10/17/07, Bruce Wang <number5在gmail.com> wrote:
>
>
>
> On 10/17/07, Roc Zhou <chowroc.z+l在gmail.com> wrote:
> >
> > ÕâÊÇÎÒ×î½üÔÚ×öµÄÒ»¸ö¿ªÔ´ÏîÄ¿£¬·ÅÔÚ sourceforge ÉÏÃæÁË¡£¿ÉÒÔ´ÓÕâÀïÕÒµ½²¢ÏÂÔØ£º
> > https://sourceforge.net/projects/crablfs/
> >
> >
> ºÍ DRBD(http://www.drbd.org/) Ïà±ÈÓÐʲô²»Í¬£¿ ¸÷×ÔµÄÓÅȱµã£¿
>
>
>
> --
> simple is good
> http://brucewang.net
> http://twitter.com/number5
> http://www.linkist.com
> skype: number5
> _______________________________________________
> python-chinese
> Post: send python-chinese在lists.python.cn
> Subscribe: send subscribe to python-chinese-request在lists.python.cn
> Unsubscribe: send unsubscribe to  python-chinese-request在lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
>
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20071017/36838a5b/attachment.htm 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年10月17日 星期三 17:07

Roc Zhou chowroc.z+l在gmail.com
星期三 十月 17 17:07:12 HKT 2007

µ±È»ÎÒ¿ªÊ¼×öÕâ¸öÏîÄ¿µÄʱºò»¹²»ÖªµÀ DRBD¡£ÄÇʱºòÖ»ÖªµÀ IRIX ÏÂÓиö FAM£¬
±»ÒÆÖ²µ½ Linux Ï£¬µ«Ò²ÒѾ­Í£Á˺ܾÃÁË¡£ºóÀ´ÎÒ¾ÍÕÒ Linux µÄ¶ÔÓ¦µÄ¶«Î÷£¬
×îºóÕÒµ½ÁË inotify :P
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20071017/e23c9252/attachment.htm 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年10月22日 星期一 13:35

Roc Zhou chowroc.z+l在gmail.com
星期一 十月 22 13:35:42 HKT 2007

һλÍøÓѵķ´À¡£º

---------- Forwarded message ----------
From: Roc Zhou <chowroc.z在gmail.com>
Date: Oct 19, 2007 1:01 PM
Subject: Re: uLFSÖеı¸·Ý¹¦ÄÜ
To: ¿¡½Ü²Ì <yzcaijunjie在gmail.com>


Èç¹ûûÓÐ 2.6 Äںˣ¬Ò²ÐíÄã¿ÉÒÔ¿´¿´ Linux FAM£¬²»¹ýÕâ¸öÏîÄ¿ÒѾ­Í£Á˺ܳ¤Ê±¼äÁË£¬¶øÇÒÒ²ÊÇÐèÒª±àÒëÄں˵ġ£FAM ÊÇ´Ó IRIX
ÒÆÖ²¹ýÀ´µÄ¡£Ò²ÐíÖ±½Ó±àÒë 2.6 Äں˸üÖ±½ÓÄØ£¿ÎÒ²»Ì«Çå³þÄÜ·ñÔÚ 2.4 ÄÚºËÉϱàÒë inotify¡£

DRBD Ò²Ðí¿ÉÒÔ¹¤×÷ÔÚ 2.4 Äںˣ¬²»¹ýºÃÏñ¾µÏñ´ÅÅ̲»ÄܹÒÔØ¡£¾ßÌåÎÒûÓÐÊÔ¹ý¡£

¶ÔÁË£¬ÎÒÏëÄãÊÇ´Ó python.cn µÄÓʼþÁбíÀïÃæ¿´µ½Õâ¸öÏîÄ¿µÄ°É£¬ÎÒÏë°ÑÓʼþת¹ýÈ¥£¬ÒòΪ±ðÈËÒ²¿ÉÄÜ»áÓöµ½ÀàËƵÄÎÊÌ⣬ÐÐÂð£¿


On 10/19/07, ¿¡½Ü²Ì <yzcaijunjie在gmail.com> wrote:
> ÄúºÃ£º
>       ÎÒÄ¿Ç°ÔڱʼDZ¾ÉϲâÊÔ£¬ÏµÍ³Îªubuntu£¬°²×°libdb4.4£¬mirrord_config.pyÖÐÅäÖÃÈçÏ£º
>   1 import tree
>   2 options = tree.Tree('mirrord')
>   3 o = options
> ÎÒʹÓÃsudo mirrordÔËÐУ¬ÒÀÈ»»á³öÏÖÈçÉÏ´íÎó¡£
>
> ÁíÍ⣬ÎÒÏëÎÊÏ£¬ÓÉÓÚÄں˰汾ԭÒò£¬ÎÒÃÇÄ¿Ç°µÄÄÚºËûÓе½2.6£¬ËùÒÔûÓÐinotifyÌØÐÔ£¬ËùÒÔÈç¹ûÎÒÐèÒªÒÆÖ²£¬¾ÍÒªÕÒÆäËüµÄ¼¼ÊõÀ´´úÌ棬Äã¶Ô´Ë·½ÃæÓкν¨ÒéÄØ£¿
>
> лл
>
>
> ÔÚ07-10-18£¬Roc Zhou < chowroc.z在gmail.com> дµÀ£º
>
> > ÄúºÃ£º
> > Õâ¸öÎÊÌâÓ¦¸ÃÊÇ Berkeley DB Å׳öµÄÒì³££¬ÄúÏÈ¿´Ò»ÏÂÄúϵͳÖÐ BDB ÊÇ·ñ°²×°ÁË(Ó¦¸ÃÊǽÐ×ö db4 µÄÒ»¸ö°ü)£¬ËüµÄ°æ±¾ÊÇʲô¡£
> >
> > ÁíÍ⣬Äú¸øÎÒ¿´Ò»Ï /etc/python/mirrord_config.py ÅäÖÃÊÇÔõÑùµÄ£¬ÄúÉèÖÃµÄ o.datadir ÊÇ·ñÓÐдȨÏÞ£¿
> >
> > µ±È»ÏÖÔÚ mirrord/fs_mirror
»¹ÓÐÐí¶à¾ÖÏÞÐÔÐèҪȥÍêÉÆ£¬ÕâЩ¾ÖÏÞÐÔÔÚÎĵµÖÐÎÒҲ˵Ã÷ÁË¡£¶ÔÓÚÉÏ°Ų̀·þÎñÆ÷£¬ÄúÒ²¿ÉÒÔ¿´¿´ÆäËûµÄÏîÄ¿£¬±ÈÈç GFS£»¹ØÓÚ¾µÏñ£¬»¹ÓÐÏó BRDB
ÕâÑùµÄÏîÄ¿£¬ÎÒÔÚÎĵµÀïÃæÒ²Ìá¼°Á˵ģ¬ÒòΪ mirrord/fs_mirror ²»ÊʺÏƵ·±±ä¶¯µÄ´óÎļþ¡£
> >
> > Õâ¸öÏîÄ¿ÊÇ¿ªÔ´ÏîÄ¿£¬Ê¹ÓÃÁË GPL v2.0£¬Äúµ±È»¿ÉÒÔ×ÔÓÉÀ©Õ¹£¬Ö»Òª×ñÑ­ GPL ¾Í¿ÉÒÔÁË¡£µ±È»ÎÒÒ²ºÜ¸ßÐËÄúÄܸæËßÎÒ×öÁËÄÇЩ¸Ä½ø¡£
> >
> > лл¡£
> >
> >
> >
> > On 10/18/07, ¿¡½Ü²Ì < yzcaijunjie在gmail.com > wrote:
> > > ÄúºÃ£º
> > >
> >
>        ÎÒ¶ÔuLFSÖеı¸·Ý¹¦ÄܱȽϸÐÐËȤ£¬Ä¿Ç°ÎÒËù´ÓÊµĹ¤×÷ÊǹÜÀíÉÏ°Ų̀·þÎñÆ÷£¬ÆäÖб¸·Ý²ßÂԱȽϼòµ¥£¬ËäȻҲÓõ½Ò»Ð©Í¬²½¹¤¾ßºÍ×Ô¼ºÐ´µÄһЩ½Å±¾£¬µ«ÊÇûÓÐÒ»¸öÍêÕûµÄ±¸·Ý¼Ü¹¹¡£ËùÒÔ»¨Á˵ãʱ¼ä¿´ÁËÏÂÄ㱸·ÝµÄÔ­Àí£¬ºÜÇåÎú¡£²»¹ýÓÉÓÚÎÒÃDZ¸·ÝµÄÌØÊâÐÔ£¬²»ÄÜÖ±½ÓʹÓá£ÎÒÏëÎÊÏÂÊÇ·ñ¿ÉÒÔÔÚÄãµÄÏîÄ¿ÉÏ×÷ЩÀ©Õ¹£¿

> > >       ÁíÍ⣬ÎÒÏÂÔز¢°²×°Á˹¤¾ß£¬µ«ÎÞ·¨Õý³£ÔËÐУº±¨´íÈçÏÂ
> > > cjj在cjj-laptop:/var$ mirrord
> > > Traceback (most recent call last):
> > >   File "/usr/local/bin/mirrord", line 172, in 
> > >     md = mirrord.Mirrord(_identities, _datadir, _loglen)
> > >   File "/usr/lib/python2.5/site-packages/cutils/mirrord.py", line
1009, in __init__
> > >     self.shared.wdirs = Snapdb(path=path)
> > >   File "/usr/lib/python2.5/site-packages/cutils/fs_snap.py", line 394,
in __init__
> > >     self.dbfile = bsddb.btopen(path, 'n')
> > >   File "/usr/lib/python2.5/bsddb/__init__.py", line 323, in btopen
> > >     d.open(file, db.DB_BTREE, flags, mode)
> > > bsddb.db.DBNoSuchFileError: (2, 'No such file or directory')
> > > Daemon PID 6870
> > > cjj在cjj-laptop:/var$
> > >
> > > ÓÉÓÚpythonʹÓÃʱ¼ä²»ÊÇÌ«³¤£¬ËùÒÔÇë½ÌÒ»ÏÂÕâ¸öÎÊÌâ¡£
> > >
> > >
> > > лл
> > >
> >


-- 
------------------------------------------------------------------------
My Projects:
http://sourceforge.net/projects/crablfs
http://crablfs.sourceforge.net/
http://crablfs.sourceforge.net/#ru_data_man
http://crablfs.sourceforge.net/tree.html
http://cralbfs.sourceforge.net/sysadm_zh_CN.html
My Blog:
http://chowroc.blogspot.com/
http://hi.baidu.com/chowroc_z/
Looking for a space and platform to exert my originalities (for my
projects)...
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20071022/ad04758b/attachment.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年10月28日 星期日 17:09

Roc Zhou chowroc.z+l在gmail.com
星期日 十月 28 17:09:22 HKT 2007

Õâ¸öÎÊÌâÊÇÎÒ¶ÔÓÚ Berkeley DB µÄÒì³£´¦Àí»¹²»¹»µ½Î»¡£ÒòΪÎÒµ±Ê±Á½ÌìÖ®ÄÚÊÔÁ˺ü¸ÖÖ·½°¸£¬°üÀ¨ºÜ¶àÔ­ÐͺͲâÊԵŤ×÷£¬×îºó²ÅÑ¡ÔñÁË BDB
µÄ£¬Ê±¼äÓеã²Ö´Ù¡£

Èç¹ûÓöµ½ ImportError ÕâÑùµÄÒì³££¬Í¨³£ÊÇ˵Ã÷ûÓа²×° BDB£¬Ò²¾ÍÊÇ db4 Õâ¸ö°ü¡£¶øÉÏÃæµÄ±¨´íÊÇÒòΪ mirrord
²»»á×Ô¶¯´´½¨Ä¿Â¼£¬Õâ¸öĿ¼ÊÇÓÉ fs_info ½Å±¾´´½¨µÄ£¬¶øÎÒûÓжÔÕâ¸öÒì³£½øÐв¶×½²¢¸ø³öÕýÈ·µÄ˵Ã÷£¬ÒòΪ֮ǰÎÒ¶¼»áÏÈÔËÐÐ fs_info µÄ :P


-- 
------------------------------------------------------------------------
My Projects:
http://sourceforge.net/projects/crablfs
http://crablfs.sourceforge.net/
http://crablfs.sourceforge.net/#ru_data_man
http://crablfs.sourceforge.net/tree.html
http://cralbfs.sourceforge.net/sysadm_zh_CN.html
My Blog:
http://chowroc.blogspot.com/
http://hi.baidu.com/chowroc_z/
Looking for a space and platform to exert my originalities (for my
projects)...
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20071028/44498f9f/attachment.htm 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年10月28日 星期日 17:10

Roc Zhou chowroc.z+l在gmail.com
星期日 十月 28 17:10:37 HKT 2007

Óöµ½Ò»¸ö±È½ÏÆæ¹ÖµÄÎÊÌâ¡£

ÔÚ³õʼ»¯½×¶ÎÍê³ÉÖ®ºó£¬½øÈëʵʱͬ²½×´Ì¬¡£ÎÒÔÚ 3 ̨Ö÷»úÉ϶¼²¿ÊðÁ˵ģ¬¶øÇÒ¶¼ÔËÐÐÁ˽«½ü°ë¸öÔ£¬ÆäÖÐÓÐһ̨Ö÷»úÓÐÒ»Ìì²»ÖªµÀÔõô»ØÊ£¬ÎÒ·¢ÏÖ
fs_mirror ´Ó mirrord ½ÓÊܵ½Á˿ռǼ¡£Õý³£µÄÇé¿öÏ£¬Ó¦¸ÃµÃµ½ÕâÑùµÄÄÚÈÝ£º
"CREATE:/var/www/html"
"FWRITE:/var/www/html/index.php"
"DELETE:/var/www/html/temp"
"MOVE':('/var/www/html/aa', '/var/www/html/bb')"
...
µ«²»Ó¦¸ÃÓпռǼ¡£Õâµ¼Ö fs_mirror ½øÈëÁËËÀÑ­»·¡£

ÎÒÈà fs_mirror ´Ó¶ÏµãÖØÆô£¬µ«ÈÔÈ»»¹ÊÇÈç´Ë£¬¶øÇÒ DEBUG ·¢ÏÖÿ´Î³öÎÊÌⶼÔÚͬһ¸ö serial ºÅ(ÎÒʹÓà Berkeley DB
×÷ΪÈÕÖ¾¼Ç¼£¬serial ºÅ×÷ΪÆä key)£¬ËùÒÔÎÒ»³ÒÉÎÊÌâ³öÔÚ BDB£¬µ«²»ÖªµÀÔõô²âÊÔÒÔÈ·¶¨ÎÊÌâ¡£

ÎÒÊ×Ïȳ¢ÊÔÔÚ python ÖÐÖ±½Ó´ò¿ªÔ­À´µÄÊý¾Ý¿â£º
 PHP ´úÂë:
  >>> import bsddb
>>> x = bsddb .btopen("/var/mirrord/wmlog"
>>> len(x )
623748
>>> x["6854" ]
Traceback (most recent call last):
  File "", line 1 , in 
  File "/usr/lib/python2.5/bsddb/__init__.py",  line 223, in __getitem__
    return _DeadlockWrap(lambda : self.db[ key])  # self.db[key]
  File "/usr/lib/python2.5/bsddb/dbutils.py",  line 62, in DeadlockWrap
    return function(*_args, **_kwargs )
  File "/usr/lib/python2.5/bsddb/__init__.py",  line 223, in 
    return _DeadlockWrap(lambda:  self.db[ key])  # self.db[key]
KeyError: '6854'
>>> x[str (6854)]
Traceback (most recent call last):
  File "", line 1 , in 
  File "/usr/lib/python2.5/bsddb/__init__.py",  line 223, in __getitem__
    return _DeadlockWrap(lambda : self.db[ key])  # self.db[key]
  File "/usr/lib/python2.5/bsddb/dbutils.py",  line 62, in DeadlockWrap
    return function(*_args, **_kwargs )
  File "/usr/lib/python2.5/bsddb/__init__.py",  line 223, in 
    return _DeadlockWrap(lambda:  self.db[ key])  # self.db[key]
KeyError: '6854'
>>> x.first ()
Traceback (most recent call last):
  File "", line 1 , in 
  File "/usr/lib/python2.5/bsddb/__init__.py",  line 278, in first
    rv = _DeadlockWrap(self .dbc.first)
  File "/usr/lib/python2.5/bsddb/dbutils.py",  line 62, in DeadlockWrap
    return function(*_args, **_kwargs )
_bsddb.DBNotFoundError: (- 30990,
'DB_NOTFOUND: No matching key/data pair found')

¼´±ãÎÒ°Ñ mirrord Í£Ö¹Ö®ºó£¬ÈÔÈ»ÊÇÕâÑùµÄ´íÎó¡£

È»ºó£¬ÎÒ³¢ÊÔ°ÑÊý¾Ý¿â¿½±´ºÍÒƶ¯³öÀ´£¬È»ºó´ò¿ªÐµÄÊý¾Ý¿âÎļþ£º
 PHP ´úÂë:
  >>> import bsddb
>>> x = bsddb .btopen("/tmp/wmlog")
>>> len(x)
0
   ³¤¶ÈΪ 0£¬getitem ²Ù×÷ºÍÉÏÃ汨´íÒ»Ñù¡£

Ϊʲô°ÑÊý¾ÝÎļþ¿½±´³öÀ´ÒÔºó»áÓÐÕâÖÖÎÊÌâÄØ£¿ÓÈÆäÊÇ len() µÄ½á¹ûΪ 0£¿

ÎÒÖ»ºÃÖØÐÂÔËÐÐ mirrord£¬Öؽ¨ BDB Êý¾ÝÎļþ£¬µ½ÏÖÔÚûÓÐÔÙÓöµ½ÕâÖÖÎÊÌâ¡£

²»ÖªµÀÕâ¸öżȻÐÔµÄÎÊÌâÊÇÔõô»ØÊ£¿ÓÐÄÄλ¶Ô BDB ±È½ÏÁ˽âµÄÄܹ»´Í½ÌÒ»¶þÂð£¿


-- 
------------------------------------------------------------------------
My Projects:
http://sourceforge.net/projects/crablfs
http://crablfs.sourceforge.net/
http://crablfs.sourceforge.net/#ru_data_man
http://crablfs.sourceforge.net/tree.html
http://cralbfs.sourceforge.net/sysadm_zh_CN.html
My Blog:
http://chowroc.blogspot.com/
http://hi.baidu.com/chowroc_z/
Looking for a space and platform to exert my originalities (for my
projects)...
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20071028/42131dd9/attachment-0001.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年10月31日 星期三 15:04

Roc Zhou chowroc.z+l在gmail.com
星期三 十月 31 15:04:42 HKT 2007

mirrord/fs_mirror Éè¼Æ

֮ǰ½²µÄÊÇÈçºÎʹÓá£ÏÂÃæÎÒ˵һ˵Éè¼ÆÉϵÄһЩ˼·¡£

==mirrord/fs_mirror Éè¼Æ==[ru_data_man_design]
===inotify===
ΪÁËʵÏÖ¾µÏñ£¬Ó¦ÓóÌÐò±ØÐëÖªµÀ×ÔÉÏÒ»´Î´«ÊäÎļþ±ä¸üºóµ½ÏÖÔÚµÄÕâ¸ö¼ä¸ô
Ö®¼ä£¬ÓÖÓÐÄÄЩÄÚÈÝ·¢ÉúÁ˱仯£¬¶ø rsync ÐèÒª±éÀúÕâ¸öÎļþϵͳÀ´±È½Ïʱ¼ä´Á
£¬¶øÖ»ÊÇÒ»¸ö±È½ÏÏûºÄ×ÊÔ´ÇÒ²»¿ÉÄÜʵʱµÄ¹ý³Ì¡£

¶ø mirrord/fs_mirror Äܹ»±ÜÃâ±éÀúºÍ±È½Ï£¬Õâͨ¹ý×î½üµÄ Linux ÄÚºË(×Ô
2.6.12 Æð)ËùÌṩµÄÒ»¸öй¦ÄÜ£ºinotify À´ÊµÏÖ¡£

inotify ¿ÉÒÔ¼à¿ØÖ¸¶¨Ä¿Â¼µÄËùÓбä¸ü£¬Õâ¾ÍÊÇ˵£¬µ±Äã´´½¨¡¢É¾³ý¡¢Òƶ¯¡¢
¸Ä±äĿ¼/Îļþ£¬»ò¸Ä±äÔÚÕâЩĿ¼ÖеÄÆÕͨÎļþµÄÄÚÈÝʱ(·ÇµÝ¹é)£¬inotify
½«Å׳öʼþ£¬¶øÓ¦ÓóÌÐò¿ÉÒÔ²¶×½ºÍÅŶÓÕâЩʼþ£¬ÕÒ³öµ¼ÖÂÕâЩʼþµÄÎļþ
µÄÃû×Ö£¬²¢½øÐÐÏàÓ¦µÄ²Ù×÷(ÕâÀï mirrord ½«¼Ç¼Õâ¸ö¶¯×÷¼°ÆäÏàÓ¦µÄÎļþÃû£¬
²¢¸æÖª fs_mirror ´«ÊäÕâЩ¼Ç¼£¬fs_mirror ´Ëʱ×öÏàÓ¦µÄ´´½¨Ä¿Â¼¡¢É¾³ý¡¢
Òƶ¯»ò´«ÊäÎļþµÈ²Ù×÷)¡£

¾¡¹Ü inotify ²»ÌṩµÝ¹é¹¦ÄÜ£¬Ó¦ÓóÌÐòÈ´¿ÉÒԵݹéµØ½«Ä¿Â¼¼ÓÈëµ½ watches
ÁбíÖУ¬ÕâЩ watches ±íÃ÷ÁËÕâЩĿ¼ÐèÒª±» inotify ¼à¿Ø£¬ÕâЩ±êʶÔÚÄÚºË
ÖÐÖ»ÊÇһЩÊý×ÖÃèÊö·û£¬ËùÒÔ²»Õ¼¶àÉÙÄڴ棬²¢ÇÒÕâ¸ö¹¦ÄÜÓÐÄÚºËÌṩ£¬Òò´ËÊÇ
ÇáÁ¿¼¶µÄ¡£

¹ØÓÚ inotify µÄϸ½Ú£¬¿ÉÒÔÔÚ Internet ÉÏÕÒµ½Ò»Ð©½éÉÜ£º

[Kernel Korner - Intro to inotify #http://www.linuxjournal.com/article/8478]
[Monitor Linux file system events with inotify
#http://www-128.ibm.com/developer
... rary/l-inotify.html<http://www-128.ibm.com/developerworks/linux/library/l-inotify.html>
]
[Lightweight filesystem notifications #http://blog.printf.net/articles/ ...
ystem-notifications<http://blog.printf.net/articles/2006/03/25/lightweight-filesystem-notifications>
]

»òÕßÔĶÁ Linux ÄÚºËÖйØÓÚ inotify µÄÔ´´úÂ룺
```
./include/linux/inotify.h
./Documentation/filesystems/inotify.txt
./fs/inotify.c
```

ÔÚÕâ¸öÏîÄ¿£¬mirrord/fs_mirror ʹÓÃÁËÒ»¸ö Python °ü``pyinotify``£º
http://pyinotify.sourceforge.net/

-- 
------------------------------------------------------------------------
My Projects:
http://sourceforge.net/projects/crablfs
http://crablfs.sourceforge.net/
http://crablfs.sourceforge.net/#ru_data_man
http://crablfs.sourceforge.net/tree.html
http://cralbfs.sourceforge.net/sysadm_zh_CN.html
My Blog:
http://chowroc.blogspot.com/
http://hi.baidu.com/chowroc_z/
Looking for a space and platform to exert my originalities (for my
projects)...
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20071031/0bf6de83/attachment.html 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2007年10月31日 星期三 15:05

Roc Zhou chowroc.z+l在gmail.com
星期三 十月 31 15:05:43 HKT 2007

¹ÊÊÂÒ»

===¹ÊÊÂÒ»===
×î¼òµ¥µÄÒ»ÖÖ˼·À´×ÔÓÚÎÒµÄÒ»¸öͬÊ£¬ÄǾÍÊÇÀûÓÃÓ²Á´½ÓÀ´¼Ç¼ÕâЩÎļþϵͳ
µÄ±ä»¯£¬Í¨¹ý NFS µ¼³öÕâЩ°üº¬Ó²Á´½ÓµÄĿ¼¸øÔ¶³ÌÖ÷»ú£¬Í¬Ê±ÔÚ±¸·ÝÖ÷»úÉÏ
ÔËÐеÄÊØ»¤½ø³Ì¶¨ÆڵĽ«ÕâЩµ¼³ö¼Ç¼Òƶ¯µ½Ëü×Ô¼ºµÄ±¾µØĿ¼£¬ÏóÕâÑù£º
```
ʹÓõȿí×ÖÌåÏÔʾ£º

             (events)                              \
   [inotify] ----> [mirrord]           worker host \ rescue/backup host
       |               |(invoke)                   \
       |               |                           \
__original-fs__ == HardLink ==> __records__ == MoveOnNFS ==> [fs_mirror]
                                                   \
```

¾¡¹ÜÕâ¿´ÆðÀ´¼òµ¥£¬µ«ÕâÖÖģʽÊÇÓÐÎÊÌâµÄ¡£Óм¸¸öÎÊÌâÊÇÎÞ·¨Í¨¹ýÕâÖÖ"¼òµ¥
Ó²Á´½Ó"À´½â¾öµÄ£º
+ Ê×ÏÈÎÞ·¨ÖªµÀÄÄЩÄÚÈݱ»"ɾ³ý"ÁË£¬Òò´Ë fs_mirror ÎÞ·¨Í¬²½ÕâЩ"ɾ³ý"
²Ù×÷£¬"Òƶ¯"ͬÀíÒòΪ"Òƶ¯"Òþº¬×ÅijÖÖ"ɾ³ý"¡£

ÊÂʵÉÏ£¬ÔÚ inotify ÖУ¬"MOVE"ºÍ"DELETE"µÄÐÐΪÊDz»Í¬µÄ(ÔÚºóÃæµÄÕ½ÚÖÐ
ÌÖÂÛ)£¬¶ø¼òµ¥µÄÓ²Á´½ÓÎÞ·¨Çø·ÖÕâЩ²îÒì¡£

Äã¿ÉÄܻὨÒ齨Á¢Ò»¸ö"DELETE"Ŀ¼²¢Ö»¼Ç¼"DELETE"²Ù×÷£¿µ«Õâµ¼ÖÂÓ¦ÓÃÄ£ÐÍ
¹ýÓÚ¸´ÔÓ£¬²¢ÇÒ£º

+ ²Ù×÷µÄ˳ÐòÊǺÜÖØÒªµÄ(ÏÔÈ»²»¿ÉÄÜÔÚ´´½¨Ò»¸öÎļþ֮ǰ¾Íɾ³ýËü£¬»òÕßÔÚÆä
ÉϲãĿ¼¶¼²»´æÔÚµÄÇé¿öÏÂдһ¸öÎļþ£¬...)£¬¶ø"¼òµ¥Ó²Á´½Ó"ÎÞ·¨¼Ç¼ÕâЩ
²Ù×÷µÄ˳Ðò¡£

+ fs_mirror ±ØÐëͨ¹ý NFS ´Ó¼Ç¼Ŀ¼ÖÐÒƳöĿ¼/Îļþ£¬·ñÔò¼Ç¼Ŀ¼»á±äµÃ
Ô½À´Ô½´ó£¬Õ⽫µ¼ÖÂÐÔÄܵÄϽµ¡£

+ ÕâÀÓÉ fs_mirror ½øÐеÄÒƶ¯²Ù×÷ÊÇÓÐÎÊÌâµÄ£¬ÒòΪ£¬Ëü²»ÊÇÒ»¸öÔ­×Ó²Ù×÷
¡£ÏÔÈ»£¬"move"ÊÇÓÉ"copy"(ÊÂʵÉÏÕâÀï±ØÐëͨ¹ý NFS ½øÐÐ copy£¬Òò´Ë±È¼òµ¥µÄ
copy »¹Òª¸´ÔÓһЩ)ºÍËæºóµÄ"remove"×é³É£¬Òò´Ë²»¿ÉÄÜÔÚÒ»¸öϵͳµ÷ÓÃÖÐÍê³É
£¬¼´Ê¹ÊÇ"copy"Ò²¿ÉÄÜÒªµ÷Óúü¸´ÎÉõÖÁ¸ü¶àµÄ read/write ϵͳµ÷Óã¬ÕâЩ¶¼
¿ÉÄܵ¼Ö¼Ç¼µÄ¶ªÊ§¡£

ÓÃÒ»¸öÀý×ÓÀ´ËµÃ÷£º
```
ʹÓõȿí×ÖÌåÏÔʾ£º

    file1 <=== hardlink === file2
      A                       |
      |                       V
WRITE_CLOSE                 (mv)

  procedure:

      |                       |
      |                       |<-- COPY_COMPLETED
      |                       |
      |<-- WRITE_CLOSE        |
      |                       |
      |                       |<-- REMOVE
```
WRITE_CLOSE ÊÇÒ»¸öÔÚÎļþд²Ù×÷·¢Éúʱ²úÉúµÄʼþ£¬Èç¹ûÄãÒѾ­ÔĶÁ inotify
µÄÎĵµ£¬Õâ²»ÄÑÀí½â¡£µ±Õâ¸öʼþ²úÉúµÄʱºò£¬inotify ´¦ÀíÆ÷½øÐÐÏàÓ¦µÄ"Ó²
Á´½Ó"²Ù×÷£¬´Ó file1 µ½ file2£¬¼ÙÉèÕâ¸ö file2 ÒѾ­ÓÉÉÏÒ»´Î WRITE_CLOSE
²úÉú£¬Òò´ËÕâÒ»´Î WRITE_CLOSE Ó¦¸ÃºöÂÔ"OSError: file exists"ÕâÑùµÄÒì³££¬
ÕâÑùÔÚ"¿½±´"µÄʱºò£¬Ö»ÓÐÉÏÒ»´Î±ä¸üµÄÄÚÈݱ»´«Ê䣬¶ø"ɾ³ý"²Ù×÷Ö»ÊÇ
unlink ¸Õ¸Õ´´½¨µÄ(¿ÉÄÜÖ»Óм¸ºÁÃë)Õâ¸öÓ²Á´½ÓÎļþ file2£¬µ«²¢Ã»ÓÐͬ²½ÉÏ´Î
±ä¸üµÄÄÚÈÝ£¬Òò´ËÕâЩÄÚÈݱ»¶ªÊ§ÁË¡£Èç¹ûÕâ¸öÎļþÖ±µ½ÏµÍ³±ÀÀ£µÄʱºò¶¼Ã»ÓÐ
Ôٱ仯¹ý£¬ÄÇôËüµÄÕâ¸ö±ä¸ü¾ÍÓÀÔ¶¶ªÊ§ÁË¡£Ò»¸öÎļþ²»ÊÇʲô´óÎÊÌ⣬µ«ÊÇ
ûÓÐÈκα£Ö¤Ö»ÓÐÉÙÊýÎļþ»á±»ÕâÖÖ»úÖÆÓ°Ïì¡£¶øÎÒÃÇÖªµÀ£¬¼´Ê¹"¿½±´"±¾Éí
Ò²²»ÊÇÔ­×ӵģ¬Òò´ËÕâ»áµ¼ÖÂÄ¿±êÎļþϵͳ³öÏÖ´óÁ¿µÄ"©¶´"¡£

+ ¿ÉÄÜ»áÓÐijÖÖÐèÒª£¬½«Ò»¸öÎļþϵͳ¾µÏñµ½ºÃ¼¸Ì¨¿Í»§Ö÷»úÉÏ£¬»òÕß˵"¶à·
¾µÏñ"¡£¶ø¼òµ¥Ó²Á´½ÓÎÞ·¨´ïµ½Õâ¸öÄ¿µÄ£¬ÒòΪÔÚ fs_mirror "moved" Ó²Á´½Ó
ÎļþÖ®ºó£¬¼Ç¼¾ÍµÈÓÚ±»"Ĩ³ý"ÁË¡£

+ Õâ¿´ÉÏÈ¥¸üÏñÊÇÒ»Öֽű¾µÄ½â¾ö°ì·¨£¬¶ø²»ÊÇÒ»¸ö²úÆ·¼¶±ðµÄ½â¾ö·½°¸£¬¼ÈÈ»
backup ÊÇÒ»¸ö¹Ø¼üÓ¦Óã¬×îºÃÊÇʹÓþ­¹ýÑϸñ²âÊԵIJúÆ·£¬¶ø²»ÊǼ¸¸ö¼òµ¥µÄ
½Å±¾¡£

+ ¼òµ¥Ó²Á´½Ó²»¹»Áé»î£¬ÒòΪÄã±ØÐ뽫ËùÓÐÎļþ¶¼·ÅÔÚͬһ¸öÎļþϵͳÖУ¬Òò´Ë
Òâζ×ÅÄã±ØÐëµ÷Õûÿһ¸öÖ÷»ú¡£ÊÂʵÉÏ£¬ÔÚÿ̨¹¤×÷Ö÷»úÉ϶¼ÉèÖà NFS ÓÐЩ·³ÈË
£¬¶øÇÒÕâÖÖ"ÍÆ"ģʽ²»¹»°²È«¡ª¡ªÄã²»µÃ²»Í¨¹ý NFS µ¼³ö¹Ø¼üÊý¾Ý¡£

+ ×îºó£¬¼ÈÈ»ÄãÐèÒªÔÚÎïÀíÓ²ÅÌÉϽ¨Á¢½á¹¹£¬Õâ¿ÉÄܻᵼÖÂÐÔÄÜϽµ¡£

% EOL

Òò´ËÓ¦¸ÃʹÓÃÒ»¸ö¸üºÃµÄ²ßÂÔÀ´½ð·ÕâЩÎļþϵͳµÄ±ä¸ü¡£¼ÈÈ»ÏÖÔÚ mirrord
ʹÓà pyinotify£¬ÎÒ½¨ÒéÄã¿´Ò»¿´ËüµÄÎĵµ¡£

-- 
------------------------------------------------------------------------
My Projects:
http://sourceforge.net/projects/crablfs
http://crablfs.sourceforge.net/
http://crablfs.sourceforge.net/#ru_data_man
http://crablfs.sourceforge.net/tree.html
http://cralbfs.sourceforge.net/sysadm_zh_CN.html
My Blog:
http://chowroc.blogspot.com/
http://hi.baidu.com/chowroc_z/
Looking for a space and platform to exert my originalities (for my
projects)...
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20071031/f1e7dcb3/attachment.htm 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

如下红色区域有误,请重新填写。

    你的回复:

    请 登录 后回复。还没有在Zeuux哲思注册吗?现在 注册 !

    Zeuux © 2025

    京ICP备05028076号