Replicate ZVOL offiste

Status
Not open for further replies.

gzartman

Contributor
Joined
Nov 1, 2013
Messages
105
I am use FreeNAS to serve up iSCSI targets for my backup software to store backup images onsite. This is working great.

I have an offsite backup solution I'm not happy with. Instead, I'd like to be able to just replicate the FreeNAS ZVOL block devices offsite, as this would seem to keep things clean and consistent with what I'm doing onsite.

However, I've read some forum posts that say that replicating iscsi targets offsite is problematic when the target is in use.

I'd like to ask the question directly: Is it OK to use the freenas replication function to replicate a zvol block device offsite if I do it when I'm fairly sure the iscsi target is likely not to be in use. Given I'm using it for backup, I can make a pretty accurate estimate of the timeframe when the backup software isn't writing to the iscsi target.

Thanks,
Greg
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
I'd imagine that if you took a snapshot at a time you knew that the zvol wasn't in use, and replicated that offsite, that'd be fine.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
However, I've read some forum posts that say that replicating iscsi targets offsite is problematic when the target is in use.

I have no clue what "problems" develop when in use. Replication send snapshots, which are inconsequential to if they are "in use" (whatever that could possibly mean) versus "not in use".

I'm thinking you're confusing several different things and somehow have an incoherent thought as a result. ;)
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
I have no clue what "problems" develop when in use. Replication send snapshots, which are inconsequential to if they are "in use" (whatever that could possibly mean) versus "not in use".

I'm thinking you're confusing several different things and somehow have an incoherent thought as a result. ;)

It makes perfect sense, it's just a higher level problem than you are used to seeing. This is a common issue with ZFS snapshots and block devices.

Contriving a bit of a trite example, think of an iSCSI device that's been exported to a Windows system, upon which an NTFS filesystem has been placed. You're writing files to the NTFS. Then ZFS grabs a snapshot while that's happening. The NTFS filesystem image that's been snapshotted is almost certainly in an inconsistent state.

From a large service provider's point of view, snapshot-based backups are problematic because many of them are likely to be inconsistent, and it is entirely possible that all half dozen images you've got available for a VM a customer wants to restore are in varying states of unusability. This actually really does happen.

A lot of backup products that work with VMware attempt to quiesce activity on the virtual disk for a few moments, providing an opportunity for all data to be flushed from the OS buffers out to the image, at which point the snapshot you take has a much better chance of being in a coherent state.

Anyways, a simplistic strategy to cope with this is to take a snapshot when the volume is not in use. What @gzartman suggests is perfectly sensible and is one of the traditional solutions to the issue.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Actually, I'm very, very familiar with that issue (which is why we have the new vmware snapshot feature).

But, he said:
However, I've read some forum posts that say that replicating iscsi targets offsite is problematic when the target is in use.

He's saying that replication is problematic when the target is in use. The issue you are describing is the snapshot being taken when the target is in use. Totally different when you substitute replication with snapshot.

As I said.... I have not heard of any problems when replicating an iscsi target offsite.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Oh, fer chrissakes, being overly literal isn't helping here.
 
Status
Not open for further replies.
Top