On Tue, Feb 17, 2015 at 11:04:00AM -0600, Jason Lawrence via smartos-discuss 
wrote:
> Is there a recommended method to simplify the act of reprovisioining zones 
> while maintaining setup? I have a single, standalone SmartOS node but would 
> like to migrate to more recent image sets. I considered just doing a 'zfs 
> diff' from the image to the current snapshot, but that leaves me ~32k files 
> to sort through.
> 
> I feel like I’m doing this the wrong way, but don’t know where to start. Do I 
> need to bite the bullet, start over with a blank image, and learn chef or 
> something similar to make this easier in the future?

FWIW what I do is that I have some datasets in the GZ that I mount with lofs in 
my smartos zones that contain the data I want to keep (each dataset belongs to 
one zone only).
e.g.
/export/${UID}-pgsql
/export/${UID}-foo

"Updating" (re-creating really) the zone with the updated image is just a 
matter of vmadm create foo.json and a run of whatever cfg management tool you 
use (or even rsync/scp).
My json file contains things like:
  "filesystems": [
    {
      "source": "/export/${UID}-foo",
      "target": "/mydata",
      "type": "lofs"
    }


There're probably more|better ways to achieve what you want but but this one is 
easy and works for my needs.

-- 
Antoine


-------------------------------------------
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=25769125&id_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com

Reply via email to