On Jul 12, 2009, at 11:45 PM, Harry Putnam <rea...@newsguy.com> wrote:
Reading various bits of google output about send/receive I'm starting
to wonder if that process is maybe the wrong way to go at what I want
to do.
I have a filesystem z1/projects I want to remove it from the z1 pool
and put it in a z2 pool ending up with z2/projects. With all the same
data, same mountpoint (/) and same name (/projects).
The examples I see of send/receive end with a new data set but it has
the name format of a snapshot.
man zfs shows:
zfs receive [-vnF] filesystem|volume|snapshot
zfs receive [-vnF] -d filesystem
But it claims the second usage is for creating a backup.
The first usage appears it would result in a new dataset with an
unfortunate name as one finds in snapshosts with `@' character.
The example from Opensolaris Bible shows.
zfs send tank/f...@trip | zfs receive newpool/c...@trap
I don't want a name with a @ in it... so just a little confused as to
which of the two or neither is appropriate for my usage.
I want to destroy the z1/projects fs when done moving to z2 pool. So
do I simply zfs send z1/proje...@most_recent|
zfs receive z2/proje...@starter
Then zfs rename z2/proje...@starter z2/projects
zfs destroy z1/projects
I'm worried I'd end up with a read-only /projects or some other
unfortunate thing.
Or would it be best to go the lonq way.
zfs create z2/projects
zfs set mountpoint /new/projects
rsync/ or cp -a the contents of /projects to /new/projects
zfs destroy z1/projects
zfs set mountpoint=/projects z2/projects
It's not like that at all.
Zfs send/recv only works on static datasets, so you need to take a
snapshot and send that.
Once the data is copied you can delete the snapshots that will then
exist on both pools.
If you have mount options set use the -u option on the recv to have it
defer attempting mounting the conflicting datasets.
If you just want to rename a pool, then export it and the import it
under a new name.
-Ross
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss