nnfs.sgml

来自「Non-Networked File System在几个非网络的(或慢网络的)U」· SGML 代码 · 共 738 行 · 第 1/2 页

SGML
738
字号
<!DOCTYPE RefEntry PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [<!ENTITY nnfs "<Command>nnfs2</Command>"><!ENTITY medium "<Emphasis>NNFS medium</Emphasis>"><!ENTITY fs "<Emphasis>NNFS filesystem</Emphasis>"><!ENTITY % paper-type "A4">]><RefEntry><DocInfo>    <address>      <email>exco@ligim.univ-lyon1.fr</email>    </address>    <author>      <firstname>Thierry</firstname>      <surname>EXCOFFIER</surname>    </author><Date>2002 november 3</Date></DocInfo><RefMeta><RefEntryTitle>nnfs2</RefEntryTitle><ManVolNum>1</ManVolNum></RefMeta><RefNameDiv><RefName>nnfs2</RefName><RefPurpose>Synchronise filesystems between Non-Networked hosts</RefPurpose></RefNameDiv><RefSynopsisDiv><CmdSynopsis><Command>nnfs2</command><Arg Choice=Req> <Option>--no-x11</Option></Arg><Group><Arg><Option>--add-first <Replaceable/directory-name/</Option></Arg><Arg><Option>--add <Replaceable/directory-name/</Option></Arg><Arg><Option>--add-nickname <Replaceable/directory-name/</Option></Arg></Group></CmdSynopsis><CmdSynopsis><Command/nnfs2/<Group><Arg><Option>--help</Option></Arg><Arg><Option>--licence</Option></Arg></Group></CmdSynopsis></RefSynopsisDiv><!-- ********************************************************************** --><!-- ********************************************************************** --><RefSect1><Title>INTRODUCTION</Title><!-- ********************************************************************** --><!-- ********************************************************************** --><Para>The NNFS goal is to provide to ``one'' user a consistent file systemover all the hosts used by the user.</Para><Para>With hosts connected on a LAN you must use NFS instead of NNFS.In the case of hosts not connected by a network orconnected by a slow network (modem) NFS is not the answer.</Para><Para>With NNFS, the files are duplicated on all the computers.The up to date files are on the computer on which the user works.The &fs; is stored on the &medium;.Usually the &medium; is a floppy disk,it could be whatever you want (easily customisable),if there is much data, several floppies will be asked.</Para><Para>When the user stops his work on a computer,he runs as last command: &nnfs;.Then all his modifications (change, creation, deletion)are recorded on the &medium;.</Para><Para>When the user starts to work on a computer,he runs as first command: &nnfs;.Then all modifications (change, creation, deletion)stored on the &medium; are retrieved on current system.</Para><Para>If the user forgot to run an update, &nnfs; will nevertheless optimally work.The only drawback is that some files will not be up to date onthe host used by the user.</Para><Para>It is also possible to have a numbered backup of modified/deleted files.So you cannot lose a file when you run &nnfs;(because the file is modified/deleted on another host)</Para></RefSect1><!-- ********************************************************************** --><!-- ********************************************************************** --><RefSect1><Title>USAGE</Title><!-- ********************************************************************** --><!-- ********************************************************************** --><Para>&nnfs; has a text and a graphical user interface.If you run the command for the first time or with a &medium;formatted or not, the command will provide contextual informations and helpand will ask contextual questions.The graphical user interface allows you to edit the configuration.</Para><Para>The interactive help is extensive and guide the user.This documentation is here to give general principles.</Para><Para>By default the &nnfs; works with standards tools: floppy diskand <Command>gzip</Command>. The floppy disk access is done<FOREIGNPHRASE>via</FOREIGNPHRASE> system dependent commands(IRIX, AIX, HPUX and <Command>mcopy</Command> in the other cases).If you want to change these defaults, see the configuration section.</Para><Para>As the default configurations use floppy disk, the &nnfs;default filter does not synchronise big files or ``garbage'' files.If you want to change these defaults, see the configuration section.</Para><para>It is not recommended to continue to modify files while &nnfs;is running. It is not dangerous but the result is unpredictable.</para><para>Be carefull, some applications wrote their data on disk onlywhen you stop them. So you must stop these applications beforerunning &nnfs;. For example <command>netscape</command> wrotesome folder information only when you quit the program, so youmust run &nnfs; only if <command>netscape</command> is not running.To avoid this you can create a shell script killing these applicationsand cleaning some file before launching &nnfs;.</para><!-- ********************************************************************** --><RefSect2><Title>To do before using &nnfs;</Title><!-- ********************************************************************** --><Para>If the file hierarchy you want to synchronise is yet identicalon all the hosts you can go to the next section.The root of the file hierarchy may have a different name on each host.To avoid problems you should use only relative internal symbolic links,so the links are correct on all the hosts.</Para><Para>If the files hierarchy are not identical, you have two solutions:<Itemizedlist><Listitem><Para>You create yourself an identical hierarchy on all the hosts.<Emphasis>The file modification date should be identical on all thehosts.</Emphasis></Para></listitem><Listitem><Para>Or, you let &nnfs; create the identical hierarchy on allthe hosts. In this case, a hierarchy made of the union of all thefiles is created, conflicts are solved using the modification date.It is the only case where the modification date is used to solve conflicts.</Para></listitem></Itemizedlist></Para></RefSect2><!-- ********************************************************************** --><RefSect2><Title>Initialisations</Title><!-- ********************************************************************** --><Para>When you run the &nnfs; command on an host not known by the &fs;it will explain you how to add the host in the &fs;.</Para><para>If the &fs; does not fit in one medium, you will be askedto introduce medium.</para><Para>Now, the initialisation for 2 hosts named A and B will be detailedfor the 2 user interfaces.</Para><RefSect3><Title>Initialisations with X11 interface</Title><para>First run on host A.<Itemizedlist><listitem><para>You click on: <GUIBUTTON>Continue without reading the medium</GUIBUTTON></para></listitem><listitem><para>you enter the local name of the hierarchy to synchronise,</para></listitem><listitem><para>you click on: <GUIBUTTON>Continue the update</GUIBUTTON>,</para></listitem><listitem><para>you click on: <GUIBUTTON>Medium AAA is ready for writing</GUIBUTTON>,</para></listitem><listitem><para>you click on: <GUIBUTTON>Quit</GUIBUTTON></para></listitem></Itemizedlist></para><para>Second run on host B, assuming medium is ready.<Itemizedlist><listitem><para>You click on: <GUIBUTTON>Continue the update</GUIBUTTON></para></listitem><listitem><para>you enter the local name of the hierarchy to synchronise,</para></listitem><listitem><para>you click on: <GUIBUTTON>Continue the update</GUIBUTTON>,</para></listitem><listitem><para>you click on: <GUIBUTTON>Quit</GUIBUTTON></para></listitem></Itemizedlist></para><para>Normal run when initialisations are done, assuming medium is ready.<Itemizedlist><listitem><para>You click on: <GUIBUTTON>Continue the update</GUIBUTTON></para></listitem><listitem><para>you click on: <GUIBUTTON>Continue the update</GUIBUTTON>,</para></listitem><listitem><para>you click on: <GUIBUTTON>Quit</GUIBUTTON></para></listitem></Itemizedlist></para></RefSect3><RefSect3><Title>Initialisations with text interface</Title><para>First run on host A.<Itemizedlist><listitem><para>You type: &nnfs; <option>--add-first</option> <replaceable>dirname</replaceable></para></listitem><listitem><para>You answer: <keycap>c</keycap> <keycap>return</keycap> to continue the update</para></listitem><listitem><para>You hit : <keycap>return</keycap> when medium is ready</para></listitem></Itemizedlist></para><para>Second run on host B, assuming medium is ready.<Itemizedlist><listitem><para>You type: &nnfs; <option>--add</option> <replaceable>dirname</replaceable></para></listitem><listitem><para>You answer: <keycap>c</keycap> <keycap>return</keycap> to continue the update</para></listitem></Itemizedlist></para><para>Normal run when initialisations are done, assuming medium is ready.<Itemizedlist><listitem><para>You type: &nnfs;</para></listitem><listitem><para>You answer: <keycap>c</keycap> <keycap>return</keycap> to continue the update</para></listitem></Itemizedlist></para></RefSect3></RefSect2><!-- ********************************************************************** --><RefSect2><Title>How to recover from &medium; read failure</Title><!-- ********************************************************************** --><para>If there is a read error you can rerun &nnfs; a few times with thehope that the error will vanish. If it is not the case, put thebad medium in a trash, take a new one and create immediatelya new &fs; with the current host.</para><Para>If the read error is before you start to work on an host.Try to not work on non-synchronized file in order to avoid futureconflicts. Run &nnfs; as always before stopping to work on the host.</Para><para>If the read error is before you leave an host. You will want to copythe file modified by your session on the other host. To do so,modify all the file you want to synchronise and rerun &nnfs; on the host.For example by running <command>find . -mtime -1 -print | xargs touch</command>.If you do not do this, these files will be synchronised but onlyafter adding the other host on &fs;, a run on local the host and a run on the otherhost.</para><para>My experience about floppies is that there is floppies usableonly 2 or 3 times and some usable hundreds of time.<emphasis>Even if they are from the same box</emphasis>.</para></RefSect2><!-- ********************************************************************** --><RefSect2><Title>Historised backups</Title><!-- ********************************************************************** --><Para>Each time you run &nnfs; the files deleted or modified aremoved in a directory. This directory is not mirrored!<example><title>Archiving modified files in default directory</title><para>Current date: Sun Sep 16 14:57:47 CEST 2001</para><para>Modified file: <filename>foo/bar/Makefile</filename></para><para>Historised file: <filename>.nnfs/history/2001_09/16_14:57.47/foo/bar/Makefile</filename></para></example></Para><para>So you can easily remove old historised files by date.</para></RefSect2><!-- ********************************************************************** --><RefSect2><Title>Conflicts</Title><!-- ********************************************************************** --><Para>If you don't run &nnfs; before and after working, some update conflictsmay be raised if you work on the same files.<example><title>A simple conflict</title><Itemizedlist><listitem><para>You run &nnfs; on host A</para></listitem><listitem><para>You modify <filename>foo</filename> on host A</para></listitem>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?