backup linked files
Christos Ricudis
ricudis at giwtoula.paiko.gr
Sat Mar 23 08:36:01 EET 2002
In article <mailman.1016804466.11555.linux-greek-users at lists.hellug.gr>, Alex Papadopoulos wrote:
> [1] To problhma einai oti den mporw na kanw hard link se directory. To
> man page tou ln leei oti o root mporei na to kanei, alla dokimasa kai h
> apanthsh htan:
>
> root at helios:/home/alex > ln -d docs/HOWTO/ HOWTO
> ln: creating hard link `HOWTO' to `docs/HOWTO/': Operation not permitted
>
> ..to idio kai xwris to -d, to idio kai me -F. Pws ginetai pleon ayto?
Den ginetai, kai yparxei poly kalos logos poy den ginetai. An epitrepotan
ta hard links se directory, to filesystem 8a mporouse na metatrapei apo dentro
se kykliko grafo:
Estw :
a/
a/b/
a/b/c/
kai mesa sto c/ kanoume ena hard link d poy deixnei pisw sto a/. Ti kaname?
Kaname mia domh h opoia :
1) ginetai traverse ep'apeiron (a/b/c/d/b/c/d/b/c/d/ ktl ktl)
kai
2) den mporei na sbhstei (exoume ena kyklo apo tria directories poy kanena
toys den mporei na apokthsei mhdeniko reference count wste na epitrapei h
diagrafh toy).
H lysh sou bebaia einai na kaneis duplicate to directory structure poy 8eleis
katw apo to backup subdir, kai na kaneis hard links mono sta actual files.
> [2] H anhsyxia einai h ekshs: (apo to man page tou mkisofs)
>
> BUGS
> o Any files that have hard links to files not in the
> tree being copied to the iso9660 filesystem will
> have an incorrect file reference count.
Mh se anhsyxei. To file reference count se ena read-only meso den exei
apolytws kammia xrhsimothta. Se read-write mediums, eksyphretei o,ti
kai ola ta object reference counts - oso to reference count den einai
mhdeniko, to object de ginetai deallocate :
Exoume ena arxeio kai dyo hard links poy deixnoun sto arxeio (praktika dhladh
exoume treia arxeia poy deixnoyn sto idio i-node, mia poy den yparxei
apolytws kammia diafora metaksy enos arxeiou kai enos hard link toy) :
manitari:[ricudis]~/test$ echo > kota ; ln kota rapanaki ; ln rapanaki pepperoni ; ls -l
total 3
-rw-r--r-- 3 ricudis users 1 Mar 23 00:35 kota
-rw-r--r-- 3 ricudis users 1 Mar 23 00:35 pepperoni
-rw-r--r-- 3 ricudis users 1 Mar 23 00:35 rapanaki
Parathroume oti kai ta 3 arxeia exoun file reference count 3. Trwme to
pepperoni :
manitari:[ricudis]~/test$ rm pepperoni ; ls -l
total 2
-rw-r--r-- 2 ricudis users 1 Mar 23 00:35 kota
-rw-r--r-- 2 ricudis users 1 Mar 23 00:35 rapanaki
manitari:[ricudis]~/test$
To file reference count toy i-node meiw8hke sto 2, alla to arxeio paramenei
profanws sth 8esh toy, den diagrafetai oso yparxoyn arxeia poy deixnoyn
sto sygkekrimeno i-node.
Trwme kai to rapanaki, meiwnontas to reference count sto 1 :
manitari:[ricudis]~/test$ rm rapanaki ; ls -l
total 1
-rw-r--r-- 1 ricudis users 1 Mar 23 00:35 kota
manitari:[ricudis]~/test$
To reference count exei meiw8ei sto 1. To epomeno rm sthn kota, 8a sbhsei to
arxeio kai mia poy to reference count toy i-node 8a mhdenistei, 8a diagrafei
KAI to i-node.
Ennoeitai oti ola ayta einai ligaki unapplicable se read-only filesystems
opws to ISO9660. De 8a to xarakthriza akribws 'bug'.
--
Christos Ricudis
ric-NOSPAM-udis at paiko.gr Remove -NOSPAM- to reply
spamoula at paiko.gr Send your spam here
More information about the Linux-greek-users
mailing list