This is the old XigmaNAS forum in read only mode,
it will taken offline by the end of march 2021!



I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!

ZFS send - moving data question

Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
danzi
Starter
Starter
Posts: 66
Joined: 11 Nov 2012 23:24
Location: Budapest
Status: Offline

ZFS send - moving data question

Post by danzi »

Hi All,

I have NAS A with 2x 1.5Tb mirror and NAS B with 2x 2Tb new disks. I'd like to move the data between them from NAS A to NAS B using zfs send/receive. For this I created a snapshot on NAS A which is now referencing ~700 gigs of data.

Q:can I receive the data on NAS B to a specific dataset that has different feature flags - e.g. compression is on?

Any other suggestions to move the data also welcome - e.g. configure NAS B as preferred and then move the data manually also an option, but wanted to take advantage of ZFS's send/receive feature :-)

Thank you
D.
----------------------------------------------
Dell T130 - 32Gb ECC - ESXi 6.7
VM Full Instal - 11.2.0.4 - Omnius (revision 6005)
HP/LSI 9121-4i SAS2008 Pass Through mode
2 x 2Tb ZFS mirror
1 x 3Tb UFS
----------------------------------------------

Onichan
Advanced User
Advanced User
Posts: 238
Joined: 04 Jul 2012 21:41
Status: Offline

Re: ZFS send - moving data question

Post by Onichan »

Pretty sure that's not possible.

Technically you could create a new dataset on the NAS B with compression on then zfs receive the source dataset and pipe it directly to a file within the new dataset. That would technically compress the source dataset, but it would be just a large stream dump and not really useful unless you wanted to directly restore it somewhere else at a later date.

Only real option is create a new dataset with compression on, cp all the data over to the new dataset and delete the old one.

User avatar
Princo
Forum Moderator
Forum Moderator
Posts: 1080
Joined: 15 Jul 2012 01:21
Location: Berlin, Germany
Status: Offline

Re: ZFS send - moving data question

Post by Princo »

It is possible, simple and easy.

First: set the desired attributes on the receiving Pool.

Example (assuming "tank" as the name of the receiving Pool):

Code: Select all

zfs set compression=lz4 tank
Then:

On the sending site (i am using netcat instead of ssh, bc it is faster):

Code: Select all

zfs send $YOURSNAPSHOT | nc -w 5 $IP_OF_NAS_B 9000
On the receiving site:

Code: Select all

nc -l 9000 | zfs receive -vdF tank
You had to replace $YOURSNAPSHOT and $IP_OF_NAS_B with your own values, and you have to adapt the name of the receiving pool.

Caution: you MUST NOT use the parameter "zfs send -R"!!!

Greetings
Princo
Meine Antworten beziehen sich immer auf die englischsprachige GUI. ECC-RAM ist Pflicht beim Einsatz von ZFS.

Onichan
Advanced User
Advanced User
Posts: 238
Joined: 04 Jul 2012 21:41
Status: Offline

Re: ZFS send - moving data question

Post by Onichan »

I thought zfs send retained all it's properties, looked into it more and it looks you're right https://docs.oracle.com/cd/E53394_01/ht ... gbchx.html.

Post Reply

Return to “ZFS (only!)”