Schachar Levin
2010-Apr-21 06:41 UTC
[zfs-discuss] Is file cloning anywhere on ZFS roadmap
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? TIA, -- Schachar -- This message posted from opensolaris.org
Robert Milkowski
2010-Apr-21 08:57 UTC
[zfs-discuss] Is file cloning anywhere on ZFS roadmap
On 21/04/2010 07: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? > >I don''t know about file cloning but why not put each VM on top of a zvol - then you can clone a zvol. ? -- Robert Milkowski http://milek.blogspot.com
You''d run out of LUN IDs on the VMware side pretty quickly (255 from what I remember). It''s also not really VMware best practice for block. -marc On 4/21/10, Robert Milkowski <milek at task.gda.pl> wrote:> On 21/04/2010 07: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? >> >> > > I don''t know about file cloning but why not put each VM on top of a zvol > - then you can clone a zvol. ? > > > -- > Robert Milkowski > http://milek.blogspot.com > > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss >-- Sent from my mobile device
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/machine00 at template # for i in 01 02 03 04 05 \ do \ zfs mypool/machine00 at 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.
Schachar Levin
2010-Apr-21 13:15 UTC
[zfs-discuss] Is file cloning anywhere on ZFS roadmap
f I could mount unlimited NFS mounts on ESX it would be good for me, but there is a 64 nfs datastore limit. Right now if I copy a big file it can take several minutes. I already tried having one VM per zfs file system, and snapshot & clone works great, as long as I stay below 64 NFS mounts. Note that VMWARE doesn''t support NFS v4 or else doing something like mypool/xxx/m1 mypool/xxx/m2 etc. would work, but on the ESX if I mount xxx I just see empty directories for m1 and m2 as it only works with NFS v3 which does not support automatic cross mounts. NetApp has the ability to instantly clone single files and that would also solve our problem if its somewhere in ZFS road-map (unless the issues we have above can be resolved) Thanks, -- Schachar On Wed, Apr 21, 2010 at 3:42 PM, David Magda <dmagda at ee.ryerson.ca> wrote:> 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/machine00 at template > # for i in 01 02 03 04 05 \ > do \ > zfs mypool/machine00 at 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. > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20100421/b46ddb38/attachment.html>
Schachar Levin
2010-Apr-21 13:18 UTC
[zfs-discuss] Is file cloning anywhere on ZFS roadmap
If I could mount unlimited NFS mounts on ESX it would be good for me, but there is a 64 nfs datastore limit. Right now if I copy a big file it can take several minutes. I already tried having one VM per zfs file system, and snapshot & clone works great, as long as I stay below 64 NFS mounts. Note that VMWARE doesn''t support NFS v4 or else doing something like mypool/xxx/m1 mypool/xxx/m2 etc. would work, but on the ESX if I mount xxx I just see empty directories for m1 and m2 as it only works with NFS v3 which does not support automatic cross mounts. NetApp has the ability to instantly clone single files and that would also solve our problem if its somewhere in ZFS road-map (unless the issues we have above can be resolved) Thanks, -- Schachar -- This message posted from opensolaris.org
On Wed, April 21, 2010 09:18, Schachar Levin wrote:> NetApp has the ability to instantly clone single files and that would also > solve our problem if its somewhere in ZFS road-map (unless the issues we > have above can be resolved)Beyond things like dedupe (and compression), ZFS currently does not have a per-file capability like that. ZFS is generally designed to work at either either the pool-level (for dedupe) or dataset-level (snapshots, cloning, attributes, etc.).
Richard Elling
2010-Apr-21 15:06 UTC
[zfs-discuss] Is file cloning anywhere on ZFS roadmap
On Apr 20, 2010, at 11:41 PM, Schachar Levin wrote:> Hi, > We are currently using NetApp file clone option to clone multiple VMs on our FS.In your use case, how do you isolate one VM from another? If they are both in the same file system, then they are not isolated. If they are not isolated, how do you manage multi-tenancy? -- richard ZFS storage and performance consulting at http://www.RichardElling.com ZFS training on deduplication, NexentaStor, and NAS performance Las Vegas, April 29-30, 2010 http://nexenta-vegas.eventbrite.com