Simultaneous read-only snapshot mount

Gary Palmer gpalmer at freebsd.org
Mon Feb 13 18:18:24 UTC 2012


On Mon, Feb 13, 2012 at 09:55:36AM -0600, Kevin Day wrote:
> 
> It's now possible/somewhat common for the ability to have two systems can see the same disk(s) at the same time (through iSCSI or storage systems that support dual controllers, etc). 
> 
> Suppose system A has a filesystem mounted RW, and takes a snapshot. Can system B access that snapshot via a read only mount, while system A continues to read/write to that filesystem? Or more basically, is everything needed to read a snapshot stable/unchanging enough that a second system can read from it while the filesystem is still being updated?

If the snapshot is taken on the filesystem, take the snapshot, mount it on
server 1 and export it over NFS (or other network filesystem of your choice)
to server 2.

Anything else will likely result in undefined behaviour.  I don't think any FS
guarantees that metadata related to files in a snapshot will not change as
the original read/write FS changes. If nothing else, most (all?) times you have
to have the original FS mounted to get to the snapshot, which leads to obvious
data consistency problems given the original FS is read/write on server1.

Alternatively, do a snapshot on the shared storage rather than at the
filesystem layer.  e.g. export a LUN via FC/iSCSI from a NetApp to server 1,
take a snapshot on the volume that contains server 1 and through some
commands that escape me right now you can use the LUN in the snapshot and
export it to server 2.  I'm sure other storage systems can do something 
similar, I just happen to know offhand NetApp can do it.

Gary


More information about the freebsd-fs mailing list