ZFS Send & Receive to local drive. only empty folders received!

Status
Not open for further replies.

markpat3rson

Cadet
Joined
Jul 22, 2012
Messages
9
Greetings. I am using FreeNAS-8.2.0-RELEASE-p1-x64 (r11950).

I am new, not only to this forum, but to ZFS and FreeNAS too. So please go easy on me!

I'm currently testing out FreeNAS on Parallels Desktop 7.0 on OS X Lion. My intention is to play around with it until I feel comfortable, and then purchase a server, possibly a HP ProLiant ML110 G7 E3-1220, with 4x 3TB WD Green drives. I want to offload the majority of my files to this, and have a more lean, mean desktop machine.

In Parallels, I have created 6 virtual hard disks for testing purposes. In FreeNAS I have created 2 zpools with them…

NAME SIZE USED AVAIL CAP HEALTH ALTROOT
Backup 185G 2.80M 185G 0% ONLINE /mnt
Splash 185G 139M 185G 0% ONLINE /mnt

Inside 'Splash' I have a dataset called 'Data' which has a few files inside, for testing purposes.

I want to see if it's possible, using ZFS send / receive to copy my files from 'Splash' onto 'Backup'.

So, after some research I found out that I needed to create a snapshot first.

I ssh'd into FreeNAS as root, and ran the command…

# zfs snapshot -r Splash@001

Then I ran the command…

# zfs send Splash@001 | zfs recv -F Backup

This created a subfolder on Backup called 'Data'. I'm not sure if this is a true 'dataset' or just a normal folder, but either way, the folder is EMPTY. The snapshot was created AFTER i copied the files over, so I have no idea why they are not being copied over.

zfs list reveals this…

NAME USED AVAIL REFER MOUNTPOINT
Backup 1.79M 121G 1.29M /mnt/Backup
Splash 92.5M 121G 160K /mnt/Splash
Splash/Data 91.9M 121G 91.8M /mnt/Splash/Data

What am I doing wrong?

Ultimately, the goal here (for when I have my real life server) I to use 'Backup' as an offsite backup, so I can bring the disks home, plug them into the spare SATA slots, do the send/receive to update my Backup to the latest snapshot, then unplug the drives again.

I know I could send individual Datasets, but my intention is to have several, and I'd rather send them all in one go.
 

markpat3rson

Cadet
Joined
Jul 22, 2012
Messages
9
Ok, so i've been doing further testing while waiting for any replies, and I've found out that if I do a snapshot of the Dataset…

# zfs snapshot Splash/Data@001

and send that, like this

# zfs send Splash/Data@001 | zfs recv Backup/test

Then the files ARE copied. But it's not the solution I'm seeking. I'd like to send the entire pool in one go.

As a workaround, I thought then about nesting all my datasets *inside* the main 'Data' dataset to see if I could send multiple datasets by simply sending the 'Data'. But I ran into another problem. When I try to move a file from 'Data' into my new sub dataset 'testdata', using AFP, it says that the file already exists, yet the folder is empty. I'm sure that's another problem for another thread, but thought i'd throw that in there.
 
S

sef

Guest
Use "zfs send -R Splash@001". That will recurse, just as "zfs snapshot -r" does.
 

STRAMIGIOLIS

Dabbler
Joined
Dec 31, 2012
Messages
14
I have a similar problem here and I have been looking allover the place for an answer.

PROBLEM: I have at the moment a pool of 2 mirrors of 2 time 300G and 2 times 1T. The last two are USB external drives and I have found out this should be avoided. I bought 2 3T WD Red and would like to subsitute the complete previous pool (4 HDs) with the new mirror (2 HDs). This is because from an energetical point of view 2 drives spinning is better than 4 and I have enough storage with 3T in mirror).
QUESTION: How can I port all data including jails and everything to the new pool and get rid of the the old 4 drives in such a way that the FreeNAS and all jails will still work?

SOLUTION ?? :

1) Stopped all services
2) Stopped all jails
3) Created a snapshot with: "zfs snapshot -r NAME-OLD-POOL@NAME-SNAPSHOT
4) Transfer data to new pool with "zfs send -R NAME-OLD-POOL@NAME-SNAPHOT | zfs recv -F NAME-NEW-POOL"
5) Disconnect old pool
6) Change name of new pool to the old one
7) restart jails and services
8) Remove the old HDs

I have been implementing it until point 4) and this is still running.

Is this the right way of doing it? Thanks in advance for an expert help
 

STRAMIGIOLIS

Dabbler
Joined
Dec 31, 2012
Messages
14
Migrating a pool content to a new one which can be completely different within the same system. The way I described before it works with some little changes.

1) Stop all services
2) Stop all jails
3) Create a snapshot with: "zfs snapshot -r NAME-OLD-POOL@NAME-SNAPSHOT". Do not forget "-r" to do things recursevly !!!
4) Transfer data to new pool with "zfs send -R NAME-OLD-POOL@NAME-SNAPHOT | zfs recv -F NAME-NEW-POOL"
5) Force Export old pool "zpool export -f NAME-OLD-POOL"
6) Export New pool "zpool export NAME-NEW-POOL"
7) Import New pool with old name to substitute old one: "zpool import NAME-NEW-POOL NAME-OLD-POOL". I got some errors here in the mounting, but when rebooting things turned out ok
8) Shutdown the machine
9) Physically remove all drives
10) Reboot
11) Restart Services
12) In FReeNAS under storage I got some inconsistency because it saw that a pool was unreachable. I disconnected the pool and everything works like a charme!

I hope this will help somebody else with the same problem I had.
 
Status
Not open for further replies.
Top