Re: [zfs-discuss] Moving dataset to another zpool but same mount?

2010-02-25 Thread Mark J Musante

On Wed, 24 Feb 2010, Gregory Gee wrote:


files
files/home
files/mail
files/VM

I want to move the files/VM to another zpool, but keep the same mount 
point.  What would be the right steps to create the new zpool, move the 
data and mount in the same spot?


Create the new pool, take a snapshot of files/VM, use zfs send|zfs recv to 
copy the snapshot over to the new pool.


Then you can unmount files/VM without losing any data, and set the 
mountpoint property of the new dataset to where files/VM was mounted.


e.g.:

# zfs umount files/VM
# zfs set mountpoint=/VM newpool/VM

If you want to have access to both datasets at the same time, just use an 
alternate mountpoint for the original dataset.  'zfs set 
mountpoint=/old-VM files/VM' would do the trick.


Also, to test this, if I mount to the same spot, will it hide the old 
dataset or destroy it.  I want to test the migration before destroying 
the old dataset. Or can I?


The old dataset will not be destroyed unless you use 'zfs destroy'.


Regards,
markm
___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] Moving dataset to another zpool but same mount?

2010-02-25 Thread Gregory Gee
So just to verify, from what you said and searching based on what you said, the 
following is the commands I would use?

# zpool create newpool mirror c8d0 c9d0
# zfs create newpool/VM
# zfs snapshot files/v...@beforemigration
# zfs send files/v...@beforemigration | zfs receive newpool/VM
# zfs umount files/VM
# zfs set mountpoint=/files/VM newpool/VM
# zfs set mountpoint=/old-VM files/VM

Then once all has been verified.

# zfs destroy files/VM

Thanks for the help.
Greg
-- 
This message posted from opensolaris.org
___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss