Re: [zones-discuss] solaris10 branded zone in b127

2009-10-26 Thread Trevor Pretty




Jerry

That link did not work for me, just takes me to the main page.

This link works:-
http://hub.opensolaris.org/bin/view/Community+Group+on/2009102201


Jerry Jelinek wrote:

  Jerry Jelinek wrote:
  
  
Yesterday we integrated support for solaris10
branded zones into ON.  In case you're not
watching the putback notifications, the heads-up
message is here:

http://onnv.sfbay.sun.com/links/flagdays/pages/2009102201.html

  
  
Sorry, I posted an internal link here.  The external
link is:

http://opensolaris.org/os/community/on/flag-days/pages/2009102201/

Jerry


___
zones-discuss mailing list
zones-discuss@opensolaris.org
  




www.eagle.co.nz
This email is confidential and may be legally 
privileged. If received in error please destroy and immediately notify 
us.


___
zones-discuss mailing list
zones-discuss@opensolaris.org

Re: [zones-discuss] Solaris 10 U8 Zone Problem with LU and PCA

2009-10-20 Thread Trevor Pretty





Check the permissions on the non-global zone directory. They have to be
very specific and

must not be group readable.
must not be group executable.
must not be world readable.
must not be world executable.


This is know
to trip up LU.




deniz rende wrote:

  Hi Folks,

I've been regularly patching my Solaris 10 U8 with Liveupgrade and PCA. I had a zone running on the system which I ended up changing its name. Then I wanted to create a new LU ABE and got the following error:

# lustatus

Boot Environment   Is   Active ActiveCanCopy
Name   Complete NowOn Reboot Delete Status
--  -- - -- --
Solaris10U8PCA yes  yesyes   no -
# lucreate -n Solaris10U8PCA01
Checking GRUB menu...
System has findroot enabled GRUB
Analyzing system configuration.
Comparing source boot environment Solaris10U8PCA file systems with the
file system(s) you specified for the new boot environment. Determining
which file systems should be in the new boot environment.
Updating boot environment description database on all BEs.
Updating system configuration files.
Creating configuration for boot environment Solaris10U8PCA01.
Source boot environment is Solaris10U8PCA.
Creating boot environment Solaris10U8PCA01.
Cloning file systems from boot environment Solaris10U8PCA to create boot environment Solaris10U8PCA01.
Creating snapshot for rpool/ROOT/Solaris10U8PCA on rpool/ROOT/solaris10u8...@solaris10u8pca01.
Creating clone for rpool/ROOT/solaris10u8...@solaris10u8pca01 on rpool/ROOT/Solaris10U8PCA01.
Setting canmount=noauto for / in zone global on rpool/ROOT/Solaris10U8PCA01.
zperl: Miscellaneous file system error
Configuration not saved.
ERROR: Unable to set zonepath to /.alt.tmp.b-t1b.mnt/zoneds/zperl-Solaris10U8PCA01 for zone zperl
Saving existing file /boot/grub/menu.lst in top level dataset for BE Solaris10U8PCA01 as mount-point//boot/grub/menu.lst.prev.
File /boot/grub/menu.lst propagation successful
Copied GRUB menu from PBE to ABE
No entry for BE Solaris10U8PCA01 in GRUB menu
Population of boot environment Solaris10U8PCA01 successful.
Creation of boot environment Solaris10U8PCA01 successful.

Although it created the LU environmet, It's got some errors mentioned above. The name of the zone originally was and I changed it to zperl by using zfs rename, and editing zonepath files (index and zperl.xml)

I tried to mount this into a temp directory called /b:

r...@solix# lustatus
Boot Environment   Is   Active ActiveCanCopy
Name   Complete NowOn Reboot Delete Status
--  -- - -- --
Solaris10U8PCA yes  yesyes   no -
Solaris10U8PCA01   yes  no noyes-
r...@solix# lumount Solaris10U8PCA01 /b
ERROR: unable to mount zones:
/b/zonepool/zperl must not be group readable.
/b/zonepool/zperl must not be group executable.
/b/zonepool/zperl must not be world readable.
/b/zonepool/zperl must not be world executable.
could not verify zonepath /b/zonepool/zperl because of the above errors.
zoneadm: zone zperl failed to verify
ERROR: unable to mount zone zperl in /b
ERROR: unmounting partially mounted boot environment file systems
ERROR: No such file or directory: error unmounting rpool/ROOT/Solaris10U8PCA01ERROR: cannot mount boot environment by name Solaris10U8PCA01

Also I have a strange error in df -h as well.
# df -h
Filesystem size   used  avail capacity  Mounted on
rpool/ROOT/Solaris10U8PCA
67G   7.5G56G12%/
/devices 0K 0K 0K 0%/devices
ctfs 0K 0K 0K 0%/system/contract
proc 0K 0K 0K 0%/proc
mnttab   0K 0K 0K 0%/etc/mnttab
swap   1.9G   412K   1.9G 1%/etc/svc/volatile
objfs0K 0K 0K 0%/system/object
sharefs  0K 0K 0K 0%/etc/dfs/sharetab
/usr/lib/libc/libc_hwcap2.so.1
64G   7.5G56G12%/lib/libc.so.1
fd   0K 0K 0K 0%/dev/fd
swap   1.9G   100K   1.9G 1%/tmp
swap   1.9G32K   1.9G 1%/var/run
rpool/export67G21K56G 1%/export
rpool/export/home   67G18K56G 1%/export/home
rpool   67G43K56G 1%/rpool
zonepool67G21K63G 1%/zonepool
/vol/dev/dsk/c0t0d0/unnamed_rmdisk:c
   1.9G   767M   1.1G41%/rmdisk/unnamed_rmdisk
rpool/iscsi_luns67G21K56G 1%/rpool/iscsi_luns
df: cannot statvfs /zonepool/zruby: No such file or directory
rpool/ROOT/Solaris10U8PCA01/zoneds
67G21K56G 1%

Re: [zones-discuss] svnserve

2009-10-06 Thread Trevor Pretty





If it does not come with a manifest for SMF you need to write one. If
it does then use it! or just use an rc script. However using the rc
scrpt ans making a service run under SMF is not hard. Attached is what
I wrote as a demo before postgress got an SMF service by default.

Look at "demo 2" in the self running ksh script where I demo my newly
created service.

The Defiant wrote:

  Hi All,

Another newbie question. I've just configured a seprate contaniner to serve as a seprate svn repository and configured svnserve as the default svn server. Everything works fine, except svnserve wont autostart after rebooting ;(

Can someone point me to adding svnserve to autostart. I guess we would be using SMF service and not the autostart.sh

Thx in advance!
  












www.eagle.co.nz
This email is confidential and may be legally 
privileged. If received in error please destroy and immediately notify 
us.


#!/usr/bin/ksh
#
#
#Note: The presentation is:- 
#
#http://webhome.singapore/trevor/Standard_Pressos/Solaris10_Demos/Sol10_demo_Overview/Solaris10_demo_SMF_CONTAINERS_ZFS.odp
#
#
#
# NOTE: This one use apache22 the older version use apache2
#
#http://webhome.singapore/trevor/Standard_Pressos/Solaris10_Demos/Sol10_demo_Overview/smf_demo_self_running.ksh_apache2
#
#
#--Setup---
#
#get the two files you need:-
#
#http://webhome.singapore/trevor/Standard_Pressos/Solaris10_Demos/Sol10_demo_Overview/pgsql
#http://webhome.singapore/trevor/Standard_Pressos/Solaris10_Demos/Sol10_demo_Overview/pgsql.xml
#
#copy these to (or anywhere else you prefer):
#
#/lib/svc/method/pgsql 
#/var/svc/manifest/application/pgsql.xml
#
#Setup pgsql if you have not already.
# 
#NOTE: This may be already under SMF conrol in later NV builds you will need to 
check when 
#  I wrote this it was not under SMF control. This was what I did on S10 
many moons 
#  ago to setup postgres, it's survived many LUs
# svcs -a | grep sql
# disabled   11:08:53 svc:/application/database/postgresql:version_81
# disabled   11:08:53 svc:/application/database/postgresql_83:default_32bit
# disabled   11:08:53 svc:/application/database/postgresql:version_82_64bit
# disabled   11:08:53 svc:/application/database/postgresql:version_82
# disabled   11:08:53 svc:/application/database/postgresql_83:default_64bit
# disabled   11:08:54 svc:/application/database/mysql:version_50
# 
#
#file:///usr/share/doc/pgsql/8.1.3/html/installation.html
#
#su -
#DATA=/var/lib/pgsql/data
#mkdir $DATA   #This should exist it is the default
#useradd -d /home/postgres postgres
#mkdir ~postgres
#chown postgres ~postgres
#chown postgres $DATA 
#
#su - postgres
#DATA=/var/lib/pgsql/data
#/bin/initdb -D $DATA
#/bin/createdb test#Optional
#/bin/psql -l
#
#su -
#svccfg delete -f pgsql
#cd /home/tp47565/Software/PostgreSQL
#cp ./pgsql.xml /var/svc/manifest/application
#cp ./pgsql /lib/svc/method
#chmod a+r /lib/svc/method/pgsql
#svccfg validate /var/svc/manifest/application/pgsql.xml
#svccfg import /var/svc/manifest/application/pgsql.xml
#svcadm enable pgsql 
#svcs pgsql
#su - postgres -c /bin/psql -l
# Note: I've setup the postgres user to run /bin/psql -l
#   and then logout
#***


## Press return to continue (so you can talk!)
#
press_return()
{
echo \n\t-- Press RETURN to continue --\c
read ANS
echo 
clear
}

## Do the commands given appending with  so they show up
#
do_command()
{
echo 
echo -- $*
eval $*
}

## I should check if you have the role but I don't - too lazy!
#
UID=`/usr/xpg4/bin/id -u`
if [ ! $UID -eq 0 ]; then
echo You must be root to run this script
press_return
exit 1
fi


##
## DEMO START 
##

#--- demo 1 simple commands 

# Have a browser Running to show that apache stops and starts
# /home/tp47565/bin/browser.sh norton/~tp47565 

svcadm disable apache22 #Just in case it is turned off
sleep 2 
svcadm enable apache22
sleep 3 
cd /tmp
clear
echo 
echo Is apache22 running, a simple ps to find out
echo 
echo 
do_command ps -ef | grep apache | grep -v grep
echo 
echo I can also see it is via the Browser
press_return
echo 
echo  So lets send the processes a kill -9
echo 
do_command kill -9 `pgrep httpd `
echo 
echo Is apache22 running, a simple ps to find out
echo 
do_command sleep 5
echo 
do_command ps -ef | grep apache | grep -v grep
echo 
echo I can also see it is via the Browser
echo 
echo But did you Notice the PIDs have changed?
press_return
echo 
echo 
echo In Solaris 10 most things have been turned into Services
echo Lets look into /etc/init.d
do_command ls /etc/init.d
echo 
echo 
echo There seems to be a lot less than I remember?
press_return
echo 
echo 
echo 

Re: [zones-discuss] Solaris Zone errors

2009-09-29 Thread Trevor Pretty







Nicholas Senedzuk wrote:
Sounds like there is a problem writing the to the log file
for the services. I would check you disks and make sure you have none
failing. If you do a svcs -l service_name you it will tell you where
the log file is located.

Or where the service is
trying to write is mounted read only from the global zone.


  On Tue, Sep 29, 2009 at 5:44 AM, Ketan techie...@gmail.com
wrote:
  after
booting up my zone i get following error

Code:
# zlogin -C DB_zone
[Connected to zone 'DB_zone' console]
Sep 29 09:18:46 svc.startd[5680]: Could not log for
svc:/system/filesystem/root:default: write(51) failed with I/O error.

Sep 29 09:18:47 svc.startd[5680]: Could not log for
svc:/system/installupdates:default: write(17) failed with I/O error.
Sep 29 09:18:47 svc.startd[5680]: Could not log for
svc:/network/physical:default: write(10) failed with I/O error.
Sep 29 09:18:47 svc.startd[5680]: Could not log for
svc:/network/physical:default: write(10) failed with I/O error.
Sep 29 09:18:48 svc.startd[5680]: Could not log for
svc:/system/boot-archive:default: write(10) failed with I/O error.
Sep 29 09:18:49 svc.startd[5680]: Could not log for
svc:/milestone/network:default: write(20) failed with I/O error. what
could be the reason for this ?
--
This message posted from opensolaris.org
___
zones-discuss mailing list
zones-discuss@opensolaris.org

  
  









www.eagle.co.nz
This email is confidential and may be legally 
privileged. If received in error please destroy and immediately notify 
us.


___
zones-discuss mailing list
zones-discuss@opensolaris.org

Re: [zones-discuss] How to enable a service of a zone that is not running...

2009-09-27 Thread Trevor Pretty





Do you mean you mean from the global zone like this?

zlogin $ZONE_NAME svcadm enable svc:/system/foo

Brad Diggs wrote:
I would like to svcadm enable a service of a non-global
zone who's state is not 'running'.
  Is that possible? If so, how?
  
  
  
  Thanks in advance,
  Brad
   
  
  
  
  

  

Brad Diggs
Principal Field
Technologist



Sun Microsystems, Inc.
Phone x52957/+1 972-992-0002
Mailbradley.di...@sun.com
Bloghttp://TheZoneManager.com
Bloghttp://BradDiggs.com

  

  
  
  
  
   
  
  
  
  


-- 





Trevor
Pretty |
Technical Account Manager
|
+64
9 639 0652 |
+64
21 666 161
Eagle
Technology Group Ltd. 
Gate
D, Alexandra Park, Greenlane West, Epsom
Private Bag 93211,
Parnell, Auckland










www.eagle.co.nz
This email is confidential and may be legally 
privileged. If received in error please destroy and immediately notify 
us.


___
zones-discuss mailing list
zones-discuss@opensolaris.org

Re: [zones-discuss] Starting Samba in Open Solaris Non Global Zone

2009-08-16 Thread Trevor Pretty

Wes

Do you have /var (or some part of the /var/samba/locks/s... tree) 
mounted read only?


Trevor


Wes Mauer wrote:

OpenSolaris 0609.
I've managed to get Samba installed in a non global zone, but it will not start. 


When I run svcadm enable samba, I get the following message:

r...@zone1:~# Aug 15 00:37:09 zone1 svc.startd[2938]: network/samba:default 
failed: transitioned to maintenance (see 'svcs -xv' for details)

Here is the output of svcs -xv:
svc:/network/samba:default (SMB file server)
 State: maintenance since Sat Aug 15 00:37:09 2009
Reason: Method failed repeatedly.
   See: http://sun.com/msg/SMF-8000-8Q
   See: man -M /usr/sfw/man -s 1m smbd
   See: man -M /usr/sfw/man -s 4 smb.conf
   See: /var/svc/log/network-samba:default.log
Impact: This service is not running.

Here is /var/svc/log/network-samba:default.log:
[ Aug 15 00:03:08 Enabled. ]
[ Aug 15 00:03:25 Executing start method (/usr/sfw/sbin/smbd -D). ]
[ Aug 15 00:03:29 Method start exited with status 0. ]
[ Aug 15 00:03:29 Stopping because all processes in service exited. ]
bd.pid`). ]03:29 Executing stop method (/usr/bin/kill `cat /var/samba/locks/sm
kill: 3038: no such process
[ Aug 15 00:03:30 Method stop exited with status 1. ]
bd.pid`). ]03:31 Executing stop method (/usr/bin/kill `cat /var/samba/locks/sm
kill: 3038: no such process
[ Aug 15 00:03:32 Method stop exited with status 1. ]

Any help would be greatly appreciated.
  






===
www.eagle.co.nz 


This email is confidential and may be legally privileged.
If received in error please destroy and immediately notify us.
___
zones-discuss mailing list
zones-discuss@opensolaris.org


Re: [zones-discuss] getting around live upgrade?

2009-08-03 Thread Trevor Pretty




This is two ways. I've use
method 1 a lot (because you had to). Method 2 "should work"

1. Delete them before you start and recreate them afterwards.This
should be quicker on ZFS but I've never tried. It depends on how well
the zone configuration is documented and what it does i.e how much
undocumented "customization" has happened.

2. Detach them. Then do the upgrade. Then attach -u them zoneadm(1M).
Thise may not improve the "overall time" buts get the global zone back
quicker. Again I've never tried this.

Why? 

The machine is usable whilst the LU is happening I use to start it off
and go home. Just let it run overnight. However I've heard on systems
with lots of zones overnight can not be long enough :-(

Katelin Bailey wrote:

  Is there any known way of bypassing or trimming down what liveupgrade does during zone installation? I'd like to speed up the process, which seems lengthy for such "lightweight" zones.
  












www.eagle.co.nz
This email is confidential and may be legally 
privileged. If received in error please destroy and immediately notify 
us.


___
zones-discuss mailing list
zones-discuss@opensolaris.org