Replication problem / Delete a cloned snapshot

Status
Not open for further replies.
Joined
Apr 2, 2012
Messages
2
So two servers (Both FreeNAS-8.0.3-RELEASE-x64 (9395)) , two datasets.

Replication of snapshots working between them for one dataset, but not the other

Code:
zfs list -t snapshot
NAME                                      USED  AVAIL  REFER  MOUNTPOINT
poolC/linuxBackup@auto-20120306.0400-2w  94.3M      -  20.5G  -

on the backup freenas server (PULL in documentation)

trying to do manual push on PUSH server:
Code:
zfs send poolA/linuxBackup@auto-20120402.0400-2w | ssh -i /data/ssh/replication 192.168.1.61 zfs receive -F poolC/linuxBackup@auto-20120402.0400-2w
cannot receive new filesystem stream: destination has snapshots (eg. poolC/linuxBackup@auto-20120306.0400-2w)
must destroy them to overwrite it
warning: cannot send 'poolA/linuxBackup@auto-20120402.0400-2w': Broken pipe


so go to PULL and try and delete:
Code:
# zfs destroy -R poolC/linuxBackup@auto-20120306.0400-2w
cannot destroy 'poolC/linuxBackup@auto-20120306.0400-2w': snapshot is cloned
no snapshots destroyed

# zfs destroy poolC/linuxBackup@auto-20120306.0400-2w
cannot destroy 'poolC/linuxBackup@auto-20120306.0400-2w': dataset already exists


So how does one proceed from here then? I find it very strange that the clones parent has somehow been deleted...
On the web interface (on PULL) I do get the option to 'rollback snapshot'. Delete just says 'Held by replication system'

Cheers
 

pvallee

Cadet
Joined
Jul 4, 2012
Messages
3
I have the exact same problem right now! It would be great to get a solution to that problem that seem kinda painful!

Thank you All!

Phil
 

martijn

Dabbler
Joined
Jun 10, 2011
Messages
13
A few months back i did have the same problem.
But with an older FreeNAS version.

The solution is:
1. Determine clone names:

# zdb -d <poolname> | grep %

2. Destroy identified clones:

# zfs destroy <clone-with-%-in-the-name>

It will complain that 'dataset does not exist', but you can check
again(see 1)

3. Destroy snapshot(s) that could not be destroyed previously

From: http://serverfault.com/questions/66414/cannot-destroy-zfs-snapshot-dataset-already-exists

If i remember correct ZFS will clone the last snapshot before replication.
So, if something goes wrong in the replication process that snapshot is still cloned. Clones can't be deleted like snapshots.
Maybe FreeNAS should use above commands if this bug/feature is detected.
 
Joined
Apr 2, 2012
Messages
2
Damn, knew I should have written down what I did....

If I remember correctly it was very very similar to the above, but I did have a problem with one of the commands if I remember correctly, but the solution was very very similar, and the above 'should' work.

Sorry for not writing down the problem and solution I had!
 

martijn

Dabbler
Joined
Jun 10, 2011
Messages
13
Did you do it in a SSH console?

If so, press arrow up of look at the bash history.
 
Status
Not open for further replies.
Top