cpdup will silently overwrite pfs

Matthew Dillon dillon at apollo.backplane.com
Mon Jul 28 07:50:02 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.
:..

    Yah, because PFS's are just softlinks.

    I think the same mount_null trick will solve this problem too.

						-Matt

: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.

    No, you can't.  'mv' may not fail, but it will be forced to
    copy the files instead of rename them.

: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?

    Correct.  Reblocking, pruning, and mirroring should work per-PFS.
    Note: This also means you need to prune and reblock each pfs
    independantly.

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

					-Matt
					Matthew Dillon 
					<dillon at backplane.com>





More information about the Users mailing list