* On 2016-09-29 at 13:29 BST, Rob Seastrom wrote:

> Of course, now you have a problem:  since you put the alias in ~root/.bashrc, 
> it will be gone after you reboot, because the SmartOS global zone is volatile 
> (filesystem is run from ram).  So what you need is an SMF service to copy 
> files out of persistent (zpool) storage into /root at boot time.  The details 
> on how to do that are here:  
> https://wiki.smartos.org/display/DOC/Administering+the+Global+Zone (search 
> for "Creating Persistent Services Using SMF").
> 
> Back when I was a novice at using SMF I decided that the most low-drag way to 
> handle this general case was to have a sparse-populated file hierarchy to tar 
> | tar over a running memory filesystem.  Although crude and a bit inelegant, 
> it's served me well for almost four years.  I used the xml in the wiki 
> (linked above) as a template and had it call /opt/custom/tar-root.sh which 
> contains this:

A simpler way to do this is to fetch jclulow's "rc.local" SMF:

  https://gist.github.com/jclulow/2606370

and then add:

  mount -O -F lofs /opt/custom/root /root

or similar to your postboot script.  You then have a persistent root
home directory.

-- 
Jonathan Perkin  -  Joyent, Inc.  -  www.joyent.com


-------------------------------------------
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