Macintosh- zfs "gotchas"

Moderators: jhartley, MSR734, nola

Re: Thanks

Post by mk01 » Sun Feb 03, 2013 10:25 am

grahamperrin wrote:Very interesting.

In my test, the move succeeded. Can you explain what is wrong?



why you think, that it succeeded ? if you want to test real move as here described, it's "rename". try it. will fail.
what mv is doing is that it tries rename first. ten it falls back to cp & rm.

check man mv.

Code: Select all
In its first form, the mv utility renames the file named by the source operand to the destination path named by the target operand.

and
Code: Select all
As the rename(2) call does not work across file systems, mv uses cp(1) and rm(1) to accomplish the move.


and because you tested with zero sized file, you could not see the time needed to do it. try on a 1gb file.

matus
mk01 Offline


 
Posts: 65
Joined: Mon Sep 17, 2012 1:16 am

Thanks again

Post by grahamperrin » Mon Feb 04, 2013 2:37 am

That's clearer to me now. I'm a bit dyslexic, sorry I didn't get it first time. I might re-test.
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom

Previous

Return to General Discussion

Who is online

Users browsing this forum: ilovezfs and 1 guest

cron