[request-sponsor] RFE - zoneadm clone should use zfs snapshot/clone
On Sun 19 Feb 2006 at 08:59PM, Jerry Jelinek wrote: Mike, There is already an RFE open for this: 6383119 RFE: add support for using zfs clones when cloning a zone and we are in the middle of active development on this feature already. The code we have will automatically create zfs filesystems when you install new zones, will destroy the zfs filesystem when you uninstall the zone and will automatically clone the zone using the appropriate technique based upon the source and target filesystems. We'll be starting the architectural review process for these new features shortly. Once those have been approved by the ARC process, the code should be available within the open solaris source tree. If you are interested, we can take this over to the zones-interest alias (zones-discuss, that is :) ) Jerry-- I think it'd make a lot of sense to rope Mike in on your writeup-- the one you passed to David and I, and get his feedback before we go to ARC; he's done a lot of thinking on this. And Mike-- if you are planning to work more on zones (which we would love) maybe we can coordinate with you, so we're not duplicating work? We'd also appreciate hearing your thoughts on what we could be doing to make zones more useful for you and your business. The zones team is meeting all week this week to work face to face (we are usually a distributed team) so we'll be planning out the next couple of months of enhancements-- now is a good time to influence our thinking :) -dp -- Daniel Price - Solaris Kernel Engineering - dp at eng.sun.com - blogs.sun.com/dp
[request-sponsor] RFE - zoneadm clone should use zfs snapshot/clone
On 2/20/06, Jerry Jelinek Gerald.Jelinek at sun.com wrote: Mike, Mike Gerdts wrote: There is already an RFE open for this: 6383119 RFE: add support for using zfs clones when cloning a zone Sigh... I so wish that RFE's (with relevant status information) were accessible outside of Sun. I thought the bugs and RFEs were all accessible on opensolaris? I was able to pull up 6383119 on the opensolaris bug screen but I am not sure how easy it is to search for bugs/rfes. When I put in zones zfs under Solaris/Utilities, I got almost 1300 hits so that isn't very helpful although 6383119 was the first one on the list. Ahh... my search was zoneadm AND clone AND zfs that yielded no results. Had it been zone instead of zoneadm I would have found it. (It looks like it is important to use AND rather than to narrow results.) I think we'll have a note posted about those discussions so everyone can see what kind of ideas we have internally and maybe get ideas for new projects that they want to start working themselves, if they are interested. I haven't actually sent out the formal announcement about the zfs cloning to the alias yet because we are still having some discussions about what the final design should be (what options to offer, how it will actually behave, etc.). I should be able to send that out later in the week though. I do have most of the first cut at the code changes done, modulo some of these minor tweaks like options and things, so it is really far along. We have been talking about talking about integrating zfs clones since we started the initial cloning changes last November which is why it is almost done. I look forward to this. FWIW, with S10 GA and update 1 I have been doing an (unsupported) version of cloning where I create an SVM soft partition for each zone, then use dd to copy the data. This has brought zone creation down from about 5 minutes with really fast disks to less than one with most any disk. Yes, that is a good technique too. The only worry is the manual editing of the zones index file that you have to do. That is guaranteed to break in the near future. We are working on a supported technique for that using the attach/detach -F option. I emailed that proposal out to zones-discuss a while back. The code is in final review and should be integrating any day now. Yeah, I kinda expected that it would break at some point in time. The hope was that the ability to clone using zfs or some other improvement would help out when that breakage happened. We are really interested in you (and others) getting involved with new ideas and features for zones and solaris in general. I sure hope this hasn't put you off in any way. We would be really interested to hear what things you are doing and what other ideas you have for new features for zones. If would be great to see those posted on zones-discuss so we can all see what needs to be done and who wants to work on it. Before I get into what is good for my business, I feel I need a bit of a disclaimer. Code that I contribute to OpenSolaris is based upon personal interest and is a separate pursuit from the work that I perform for my employer. My employer does not endorse or support my development activity with OpenSolaris. All equipment used to develop OpenSolaris is my own. Now, here is what makes sense for my business. I would be happy to provide you with an LSDC contract number to tip the scales in favor of developing these features. 1. Currently the creation of the first zone on a machine (inheriting /usr and /opt) takes longer than a jumpstart that installs a flar of SUNWCXall. This, of course, is only counting the actual install time, not the POST and OS boot. It would be helpful to be able to have flars of standard zones that can be deployed as template or standard zones. These would likely contain the /etc/zones/zone/template name.xml file. Of course, there needs to be patch and package compatibility between the OS that is running and the zone flar that is applied. This could be tricky, but I am confident it is not insurmountable. zonecfg and/or zoneadm should be enhanced to support this. 2. If copying a zone happens using a cpio mechanism, it should use the same options as flash archives. This would allow me to exclude particular directories or files. This is especially important to be able to exclude any sparse files (e.g. /var/adm/lastlog), tmp files, etc. Bug 4480319 3. If cpio is used to clone zones, cpio should be enhanced to preserve sparse files. In my business, there are UIDs clustered at 0 - 64k, 100 million, 212 million, 500 million, and 900 million. This causes lastlog to increase in disk usage from negligible to gigabytes. Similar things would likely happen with ufs quotas files. This problem currently affects live upgrade, flash archives, and the nevada b33 implementation of zoneadm clone. At one point I filed an RFE to use GNU cpio
[request-sponsor] RFE - zoneadm clone should use zfs snapshot/clone
I opened an RFE related to this earlier today, but I have not received any indication what the RFE number is. Here is a what the RFE says: zoneadm clone is a great feature However, it could be faster and more space efficient if it were to bring in the zfs feature set. Currently the command zoneadm -z target clone template performs a find | cpio to copy the data. However, it would be much more time, space, and performance efficient for it to have a zfsclone method. The general algorithm for the new copy_zone_zfs() would be: zfs snapshot fs mounted at zonepath of source_zone@zone-SUNWzone-newzone zfs clone snapshot from above pool/SUNWzone-newzone zfs setmountpoint=zonepath of newzone pool/SUNWzone-newzone Presumably the zfs commands above would really be implemented through the zfs API. I have implemented what I describe above, using the appropriate calls to libzfs. Here is a zone creation in less than 1 second on an Ultra 2: # time ksh -x /var/tmp/clone + newzone=fast + template=template + zoneadm=/ws/usr/src/cmd/zoneadm/zoneadm + PATH=/usr/bin:/usr/sbin + zonecfg -z fast create -t template + zonecfg -z fast set zonepath=/zones/fast + /ws/usr/src/cmd/zoneadm/zoneadm -z fast clone -m zfsclone template Cloning zonepath /zones/template... real0m0.922s user0m0.128s sys 0m0.171s I have a little bit of cleaning before it is ready for others. Also, I would like to get zoneadm uninstall to be smart enough to just destory the clone and snapshot if it was created with this mechanism. Mike -- Mike Gerdts http://mgerdts.blogspot.com/ -- next part -- An HTML attachment was scrubbed... URL: http://mail.opensolaris.org/pipermail/request-sponsor/attachments/20060219/96450f73/attachment.html
[request-sponsor] RFE - zoneadm clone should use zfs snapshot/clone
Mike, There is already an RFE open for this: 6383119 RFE: add support for using zfs clones when cloning a zone and we are in the middle of active development on this feature already. The code we have will automatically create zfs filesystems when you install new zones, will destroy the zfs filesystem when you uninstall the zone and will automatically clone the zone using the appropriate technique based upon the source and target filesystems. We'll be starting the architectural review process for these new features shortly. Once those have been approved by the ARC process, the code should be available within the open solaris source tree. If you are interested, we can take this over to the zones-interest alias for further discussion. Maybe you would be interested in taking a look at the code we already have and seeing how it fits with what you have been doing. Thanks, Jerry Mike Gerdts wrote: I opened an RFE related to this earlier today, but I have not received any indication what the RFE number is. Here is a what the RFE says: zoneadm clone is a great feature However, it could be faster and more space efficient if it were to bring in the zfs feature set. Currently the command zoneadm -z target clone template performs a find | cpio to copy the data. However, it would be much more time, space, and performance efficient for it to have a zfsclone method. The general algorithm for the new copy_zone_zfs() would be: zfs snapshot fs mounted at zonepath of source_zone@zone-SUNWzone-newzone zfs clone snapshot from above pool/SUNWzone-newzone zfs setmountpoint=zonepath of newzone pool/SUNWzone-newzone Presumably the zfs commands above would really be implemented through the zfs API. I have implemented what I describe above, using the appropriate calls to libzfs. Here is a zone creation in less than 1 second on an Ultra 2: # time ksh -x /var/tmp/clone + newzone=fast + template=template + zoneadm=/ws/usr/src/cmd/zoneadm/zoneadm + PATH=/usr/bin:/usr/sbin + zonecfg -z fast create -t template + zonecfg -z fast set zonepath=/zones/fast + /ws/usr/src/cmd/zoneadm/zoneadm -z fast clone -m zfsclone template Cloning zonepath /zones/template... real0m0.922s user0m0.128s sys 0m0.171s I have a little bit of cleaning before it is ready for others. Also, I would like to get zoneadm uninstall to be smart enough to just destory the clone and snapshot if it was created with this mechanism. Mike -- Mike Gerdts http://mgerdts.blogspot.com/ ___ request-sponsor mailing list request-sponsor at opensolaris.org