On Wed, April 21, 2010 02:41, Schachar Levin wrote: > Hi, > We are currently using NetApp file clone option to clone multiple VMs on > our FS. > > ZFS dedup feature is great storage space wise but when we need to clone > allot of VMs it just takes allot of time. > > Is there a way (or a planned way) to clone a file without going through > the process of actually copying the blocks, but just duplicating its meta > data like NetApp does?
You mean like the ZFS "clone" command? zfs clone [-p] [-o property=value] ... snapshot filesystem|volume >From zfs(1M): [...] Clones A clone is a writable volume or file system whose initial contents are the same as another dataset. As with snapshots, creating a clone is nearly instantaneous, and initially con- sumes no additional space. Clones can only be created from a snapshot. When a snapshot is cloned, it creates an implicit dependency between the parent and child. Even though the clone is created somewhere else in the dataset hierarchy, the original snapshot cannot be destroyed as long as a clone exists. The origin property exposes this dependency, and the destroy command lists any such dependencies, if they exist. [...] So you'd have something like the following: # zfs create /mypool/machine00 [ Create VMDK stuff. ] # zfs snapshot /mypool/machin...@template # for i in 01 02 03 04 05 \ do \ zfs mypool/machin...@template mypool/machine${i} \ done # This should work for both regular file systems (shared via NFS) and zvols (via iSCSI); at $WORK we've used the latter to clone LDoms vdisks. _______________________________________________ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss