> On Tue, January 5, 2010 10:12, casper....@sun.com wrote:
>
>>>How about creating a new data set, moving the directory into it, and
>>> then
>>>destroying it?
>>>
>>>Assuming the directory in question is /opt/MYapp/data:
>>>  1. zfs create rpool/junk
>>>  2. mv /opt/MYapp/data /rpool/junk/
>>>  3. zfs destroy rpool/junk
>>
>> The "move" will create and remove the files; the "remove" by mv will be
>> as
>> inefficient removing them one by one.
>>
>> "rm -rf" would be at least as quick.
>
> Normally when you do a move with-in a 'regular' file system all that's
> usually done is the directory pointer is shuffled around. This is not the
> case with ZFS data sets, even though they're on the same pool?
>

You can also use star which may speed things up, safely.

star -copy -p -acl -sparse -dump -xdir -xdot -fs=96m -fifostats -time \
-C source_dir . destination_dir


that will buffer the transport of the data from source to dest via memory
and work to keep that buffer full as data is written on the output side.
Its probably at least as fast as mv and probably safer because you never
delete the original until after the copy is complete.


-- 
Dennis Clarke
dcla...@opensolaris.ca  <- Email related to the open source Solaris
dcla...@blastwave.org   <- Email related to open source for Solaris


_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to