FreeBSD10: iSCSI and ZFS snapshots

Hi,

Running a FreeBSD 10-RELEASE server with two sets of disk pools. The plan is to share volumes over iSCSI to other hosts on my local network from one pool, while using the second pool for snapshots. The hosts connecting to the iSCSI shares on my server is a mix of various Linux machines, so I'll be using EXT4 on those. I'm using ctld to share my volumes, maintank/drives/$HOST to $HOST. My speculation now is primarily on the best practice for snapshots of iSCSI volumes. And in case of disaster, perform a restoration to the previous snapshot for example.

While running some tests with only one machine connected through iSCSI, I ran into some trouble trying to restore an old snapshot back to the original volume. Getting the error
Code:
cannot restore...dataset is busy
got me concerned, since the only way around it at that time was to completely stop the ctld service. This would cause the need to stop every connection between my FreeBSD host and my other servers. Shouldn't it be possible to only stop a specific ctl device? Note that I'm very new to both iSCSI and ctld() in FreeBSD and I'm happy to hear your suggestions :).
 
Hi, what about simply commenting out the LUN you are restoring in the ctl.conf and running a kill -HUP against the ctld process?
 
AndyUKG said:
Hi, what about simply commenting out the LUN you are restoring in the ctl.conf and running a kill -HUP against the ctld process?
Sure.. But that seems like a backwards way to go actually.
 
Hi @Norrland!

What´s backwards is trying to restore a filesystem to a different state than what the initiator is expecting, you´re pulling the rug out from beneath it´s feet essentially, trying to modify a filesystem when the "user" isn´t aware. I think the solution @AndyUKG provided is the fastest option, otherwise you´d need to have another system that acually makes the backups for you, like MS DPM, that can restore a point in time without the need of disconnecting any LUNs from the storage. There are other benefits of that as well, MS apps registering with MS VSS e.g, to have also application consistent points in time. With ZFS snapshots, your applications running won´t be aware that a snapshot has been taken.

/Sebulon
 
Last edited by a moderator:
Back
Top