in Oracle, Server_doc, Solaris

Solaris ZFS Snapshot (clone) to another host

About Solaris Snapshot :

snapshot is a read-only copy of a file system or volume. Snapshots can be created almost instantly, and they initially consume no additional disk space within the pool. However, as data within the active dataset changes, the snapshot consumes disk space by continuing to reference the old data, thus preventing the disk space from being freed.

ZFS snapshots include the following features:

  • The persist across system reboots.
  • The theoretical maximum number of snapshots is 264.
  • Snapshots use no separate backing store. Snapshots consume disk space directly from the same storage pool as the file system or volume from which they were created.
  • Recursive snapshots are created quickly as one atomic operation. The snapshots are created together (all at once) or not created at all. The benefit of atomic snapshot operations is that the snapshot data is always taken at one consistent time, even across descendent file systems.

Snapshots of volumes cannot be accessed directly, but they can be cloned, backed up, rolled back to, and so on. For information about backing up a ZFS snapshot, see Sending and Receiving ZFS Data.

Here’s  :

Solaris 10

# zfs snapshot test/data1@backup

# zfs send test/data1@backup | ssh root@ /usr/sbin/zfs receive  test/data1


Solaris 11

1) I want to backup/clone my zfs storage/oracle to storage2/oracle2 on another host.
2) First is i must  creating the zfs storage2 inside the second host.
3) And then give the zfs permission into storage2.
4) Snapshot the zfs from the first host i want to clone, and send it to the second host.

from the second host (target) :

root@nas2:~# zfs allow everyone mount,create,receive storage2/oracle2

from the first host (source) :

root@nas1:~# zfs snapshot storage/oracle@backup
root@nas1:~# zfs send storage/oracle@backup | ssh oracle@ /usr/sbin/zfs receive -F storage2/oracle2

Troubleshooting :

1) If you have busy device status, you must umount the storage2 zfs first, and after send the snapshot clone, you can mount the zfs again.