📄 nnfs.txt
字号:
ADVANCED USAGEAlias If you run nnfs2 on several hosts using NFS, you must indicate to nnfs2 that the hosts use the same file system. The mirrored directory must have the same name on all aliased host Assuming that the medium is ready, adding an alias with X11 interface. * You click on: Continue the update * you click on: +Nickname, * You click on: Continue the update * you click on: Quit Assuming that the medium is ready, adding an alias with text interface. * You type: nnfs2 --add-nickname hostname-yet-known-by-nnfs * You answer: c return to continue the updateConfiguration The configuration file is .nnfs/nnfsrc, it is created the first time you run nnfs2. It is a hugely commented shell script you can edit. It is a shell script to allow some default values to be computed from the system. If you find this configuration file too complex to edit, you can use the nnfs2 X11 interface to edit the file. There is many tips to help you configure. The more useful options are : * READ_MEDIUM shell script called by nnfs2 to read from the medium * WRITE_MEDIUM shell script called by nnfs2 to write on the medium * COMPRESS_FILTER shell script filter called by nnfs2 to compress * UNCOMPRESS_FILTER shell script filter called by nnfs2 to uncompress * MEDIUM_SIZE size of the medium in bytes * OUTPUT_FILTER indicate which files should not be mirrored * CONFIRMATION choose which questions nnfs2 will ask you * AUTO_START if true, nnfs2 X11 interface start update without user intervantion. * TMP_FILE set this to none if you use nnfs2 with a big medium * CROSS_MOUNT_POINT if true nnfs2 will synchronise all the files even if they are on several file systems. The default is false so the mount points are not crossed. * COPY_HARD_LINK if true nnfs2 will copy hard links as several files not hard linked, this is dangerous so the default is false and the hard linked files are not copied at all. The option hard to configure is OUTPUT_FILTER. The default value is fine for me but certainly not for you. The minimal filter must stop the copy of nnfs2 history and all backup files. Example 3. Required minimal filter-regex=~$-regex=^\.nnfs/history/ But, to run nnfs2 you must be connected, and the connection modify some file you don't want to copy on other hosts because it is a security breach or it is a non-sense. For example, any dot file in connection directory ending by history or authority Example 4. Filter files modified by the connection-regex=^\.[^/]*(history|authority)$ If the medium is small, you need to filter the files that are garbage as core, the executable files or the results of compilation as .o files. I assume here that executables biggers than 50k are not scripts shell or perl. Example 5. Filter garbage files-type=f size=+50k perm=+111-regex=(\.(o|a|so|sl|aux|log|dvi|summary|old)|/(core|a\.out))$ The big shell or perl script are filtered, if you don't want this. Tell nnfs2 to not filter them. Example 6. Do not filter scripts+regex=\.(pl|sh|tcl)$+regex=/configure$Reference of the filter description Each line starts by - or +, to remove or add to the file set the files verifying all the conditions in the line. The conditions are: * perm=+xxx: The condition is verified if any bit indicated in octal are in the file mode. If you indicate 0111 the file mode 0100, 0111, 0750 are verified. * perm=-xxx: The condition is verified if all the bits indicated in octal are in the file mode. If you indicate 0111 the file mode 0755 is verified but not 0750. * perm=xxx: The condition is verified if the file mode is exactly equal to the value indicated in octal. * size=+xxx: The condition is verified if the file size if bigger than the size specified. A size in kilo-bytes may be specified as 56k and in mega-bytes as 2m * size=-xxx: same as above, but the file size must be smaller. The two conditions may appear on the same line. * type=dfl: The type is regular file (f), directory (d) or symbolic link (l) * regex=aregularexpression: If you want the expression to match the full name, add ^ at the begin and $ at the end. This condition must be at the end of the line.Synchronisation of UID and GID If you want to synchonise the files with there UID and GID you need to be root and to run the rootnnfs2. This command had never been used in real cases. So use it with care.FILES ~/.nnfs/nnfsrc nnfs2 configuration ~/.nnfs/gtkrc nnfs2 GTK configuration ~/.nnfs/history Directory where modified or deleted files are saved ~/.nnfs/log~ Some log about nnfs2 last workBUGS Limitations: * Directories must contains less than 65536 files (need to recompile). * Less than 16 hosts to synchronise (need to recompile). * No mirroring of 000 mode file (it is more a feature than a bug). * No mirroring of hard links (will not be corrected). * A file may be not mirrored if it is modified in the same second that nnfs2 modify it (will not be corrected). * If A, B and C are 3 hosts, B filter some files. nnfs2 runs on A, B, C, A, B, C, A, B, C, A, B, C, ... The modified files on A are filtered by B and are not copied on C. (very difficult to correct) * When adding an host to nnfs2, symbolics links are copied because the NNFS medium doesn't contain the content of the link. The real problem is that you can't create a symbolic link with all the good attributes (modification time, mode and on some systems UID and GID). So it is impossible to fully mirror symbolic links * In g_file.h should use off_t in place of long but it doesn't compile on IRIX MIPS IP30 gcc. So files are limited to 2GB. * On Mac OS X the symbolic links are often copied because the file system does not store modification date of symbolic links. * On Mac OS X is nnfs2 is unpredictable if only the case is different between two file names as with README and Readme Bugs: * In some cases, the GTK progress bar go over 100%.NO WARRANTY This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. It is nearly impossible that nnfs2 do an irrecoverable error. In the worst case, nnfs2 will stop. The returned value (error) of all the system calls are verified and the program tries to analyse the error. The parameters of the more stressing test on nnfs2 are the following: * 4 hosts * On each host a program create/delete/modify file/links/directories at the maximum speed. * nnfs2 runs continuously on each of the host randomly. So, while nnfs2 runs, files are modified while it is reading/writing them. Or worstly, directories are deleted while nnfs2 analyse the content, or files are created in directories that nnfs2 tries to delete Incredibly, nnfs2 works in this case thousands of time on a Linux 386 Debian host. nnfs2 had been compiled and tested on HPPA 1.1 HPUX 10.20 and MIPS IP30 IRIX 6.5 On Mac OS X it does not work optimaly with symbolic links (see BUGS).SEE ALSO gzip(1) mcopy(1)AUTHOR Author: Thierry EXCOFFIER, Author Home Page: http://www710.univ-lyon1.fr/~exco nnfs2 home page: http://www710.univ-lyon1.fr/~exco/nnfs.html
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -