Jim Mauro wrote:
> So I'm really exposing my ignorance here, but...
> 
> You wrote "/... if you wish to keep your snapshots.../"...
> I never mentioned snapshots, thus you
> introduced the use of a ZFS snapshot as a method of doing what
> I wish to do. And yes, snapshots and send are in the manual, and
> I read about them.
> 
> I intially (and perhaps incorrectly) rejected the use of snapshots for
> my purposes since a snapshot is, by definition, a read-only copy
> of the file system. What I need to do is copy the file system in it's
> entirety, so I can mount the new file system read/write for online,
> production use. Perhaps I should have been clearer about that.
> 
> I will investigate using ZFS snapshots with ZFS send as a method
> for accomplishing my task. I'm not convinced it's the best way
> to acheive my goal, but if it's not, I'd like to make sure I understand
> why not.


Hi Jim,
I agree with Mattias - snapshots are the way to achieve this.
The bit you might, perhaps, have missed is the _clone_ requirement
so you can have read and write access:

# zfs snapshot sink/[EMAIL PROTECTED]
# zfs clone sink/[EMAIL PROTECTED] sink/newcopyofdata

Or if you do want to use zfs send/recv

# zfs snapshot sink/[EMAIL PROTECTED]
# zfs send -R sink/[EMAIL PROTECTED]  | zfs recv -d newzpool/dataset



> Mattias Pantzare wrote:
>> 2008/7/20 James Mauro <[EMAIL PROTECTED]>:
>>   
>>> Is there an optimal method of making a complete copy of a ZFS, aside from 
>>> the conventional methods (tar, cpio)?
>>>
>>> We have an existing ZFS that was not created with the optimal recordsize.
>>> We wish to create a new ZFS with the optimal recordsize (8k), and copy
>>> all the data from the existing ZFS to the new ZFS.
>>>
>>> Obviously, we know how to do this using conventional utilities and commands.
>>>
>>> Is there a ZFS-specific method for doing that beats the heck of out tar, 
>>> etc?
>>> (RTFM indicates there is not; I R'd the FM :^).
>>>     
>> Use zfs send | zfs receive if you wish to keep your snapshots or if
>> you will be doing the copy several times. You can send just the
>> changes between two snapshots.
>>
>> (zfs send is in the FM :-)
>>
>>   
>>> This may or may not be a copy to the same zpool, and I'd also be interested 
>>> in
>>> knowing of that makes a difference (I do not think it does)?
>>>     
>> It does not.



James C. McPherson
--
Senior Kernel Software Engineer, Solaris
Sun Microsystems
http://blogs.sun.com/jmcp       http://www.jmcp.homeunix.com/blog
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to