• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

ZFS Question: Migrate pool to another pool

Joined
Dec 6, 2011
Messages
15
Hi there, im using ZFS now for a while, but now i need to expand the pool.
Currently im using Hitachi 7K3000 2TB drives (512b) and i allready have the new ones Hitachi 7K4000 (4k), now i want to copy/clone the complete pool to the new pool; cause i can't replace the old drive with a new one due to the sector allignment differance.
Is there a quick way to clone/copy the whole pool to the other pool (bigger, more drives).
Also im using ISCSI targets, NFS and CIFS, can i copy those settings aswell?

Thanks
 
You can use a zfs replication stream. Take a recursive snapshot (zfs snapshot -r oldpool@initialreplicate) and then use zfs send -R to transfer it to the new pool (zfs send -R oldpool@initialreplicate | zfs recv -vnF newpool). Take out the "n" part of the zfs recv when you're actually ready to do the replication.

Note that if you boot the system with both the old and the new pools imported at once, it'll probably cause problems; set the "canmount" property to "off" on all the datasets of one pool or the other to fix this.
 
Thanks!
Is it also possible to do an snapshot clone on a live system, and after that an incremental?
 
Yep. I do this for my SmartOS-based file server to replicate the "zones" pool. Here's my simple little script:
Code:
if [[ $# -lt 1 ]]; then
        echo "Usage: $0 <previous-snap-name>"
        exit 1
fi
DATE=`date '+%Y%m%d'`
PREVSNAP=$1

echo "$0 $DATE $PREVSNAP"
zfs snapshot -r zones@$DATE
zfs send -Ri zones@$PREVSNAP zones@$DATE | zfs recv -vF oldzones
This makes a new recursive snapshot and sends it over to the "oldzones" pool. It's pretty fragile as these things go, but it's good enough for me. You might want to look at something like this if you're just starting out.
 
Ok thanks for the information, but is it also possible to do this "offline" the last inceremental, don't want to have any changes in the meantime.
 
Back
Top