cpdup will silently overwrite pfs

Michael Neumann mneumann at ntecs.de
Mon Jul 28 04:10:13 PDT 2008


Hi,

I just noticed that the following:

  hammer pfs-master /hammer
  cpdup /something /hammer
will not behave as I initially assumed.

I will not copy the contents of /adirectory into
the pfs /hammer. Instead, it will remove the PFS symlink /hammer
and create a directory /hammer.
So the following:

  hammer pfs-status /hammer

will show PFS#0 (the root PFS) instead of the newly created.

So users should be warned when using cpdup together with PFS.
Maybe we can do something about it (e.g. introducing a warning into cpdup).
It's easy to recreate the original PFS if you know it's number (#1 in my 
case):

  ln -s "@@0xffffffffffffffff:00001" /hammer

Or maybe it's wise to let hammer pfs-master/slave do a "chflags noschg" 
by default on the symlink?

BTW, now that I moved my 40GB into a directory on the root PFS instead 
of PFS #1, can I simply "mv" it to PFS #1? I assume I can just do that.

2nd BTW: I have now a "/" PFS and a "/data" PFS which I'd like to mirror 
separately. I assume that when I mirror "/", it will not include the
"/data" PFS. Is that correct?

Nevertheless, hammer and cpdup are extremely practical and great tools, 
I'd never ever want to miss again.

Regards,

  Michael





More information about the Users mailing list