Hans,

> hello,
> can i create a image from ZFS with the DD command?

Yes, with restrictions.

First, a ZFS storage pool must be in the "zpool export" state to be  
copied, so that a write-order consistent set of data exists in the  
copy. ZFS does an excellent job of detecting inconsistencies in those  
volumes making up a single ZFS storage pool, so a copy of a imported  
storage pool is sure to be inconsistent, and thus unusable by ZFS.

Although there are various means to copy ZFS (actually copy the  
individual vdevs in a single ZFS storage pool), one can not "zpool  
import" this copy of ZFS on the same node as the original ZFS storage  
pool. Unlike other Solaris filesystems, ZFS maintains metadata on each  
vdev that is used to reconstruct a ZFS storage pool at "zpool import"  
time. The logic within "zpool import" processing will correctly find  
all constituent volumes (vdevs) of a single ZFS storage pool, but  
ultimately hides / excludes other volumes (the copies) from being  
considered as part of the current or any other "zpool import"  
operation. Only the original, nots its copy, can be seen or utilized  
by "zpool import"

If possible, the ZFS copy can be moved or accessed (using dual-ported  
disks, FC SAN, iSCSI SAN, Availability Suite, etc.) from another host,  
and then only there can the ZFS copy undergo a successful "zpool  
import".

As a slight segue, Availability Suite (AVS), can create an instantly  
accessible copy of the constituent volumes (vdevs) of a ZFS storage  
pool (in lieu of using DD which can take minutes, or hours). This is  
the Point-in-Time Copy, or II (Instant Image) part of AVS. This copy  
can also be replicated to a remote Solaris host where it can be  
imported. This is the Remote Copy, of SNDR (Network Data Replicator)  
part of AVS.  AVS also supports the ability to synchronously, or  
asynchronously replicate the actual ZFS storage pool to a another  
host, (no local copy needed), and then "zpool imported" the replica  
remotely.

See: opensolaris.org/os/project/avs/, plus the demos.


>
> when i work with linux i use partimage to create an image from one  
> partitino and store it on another. so i can restore it if an error.
> partimage do not work with zfs, so i must use the DD command.
> i think so:
> DD IF=/dev/sda1 OF=/backup/image
> can i create an image this way, and restore it the other:
> DD IF=/backup/image OF=/dev/sda1
> when i have two partitions with zfs, can i boot from the live cd,  
> mount one partition to use it as backup target?
> or is it possible to create a ext2 partition and use a linux rescue  
> cd to backup the zfs partition with dd ?
>
>
> This message posted from opensolaris.org
> _______________________________________________
> zfs-discuss mailing list
> zfs-discuss@opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

--
Jim Dunham
Engineering Manager
Storage Platform Software Group
Sun Microsystems, Inc.

_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to