Thursday 28 March 2013

Oracle Database 11gR2 Installation On Solaris 11.1 (x86-64)

Hey, this dude chose the same theme as me!

http://dbarohit.blogspot.com/2012/12/oracle-database-11g-release-2-11201.html

Pure coincidence but I think I might change my theme down the line. Anyway, I needed the info but for SPARC. I'll post my own SPARC version once I've got a procedure that I'm happy with.

Edit: Changed my blog theme.

Loads of "wrong magic number" disk errors in /var/adm/messages

If you're getting lots of the "wrong magic number" on your console:

Jun 29 20:38:11 HOSTNAME scsi: [ID 107833 kern.warning] WARNING: /scsi_vhci/disk@g5000c50017c1704b (sd33):
Jun 29 20:38:11 HOSTNAME Corrupt label; wrong magic number
Jun 29 20:38:11 HOSTNAME scsi: [ID 107833 kern.warning] WARNING: 

Then you might want to try labeling the disk in format. Worked for me. They were gatekeeper disks from the SAN so I wasn't too worried about the data on them but if you are (I'm not sure how labeling affects data), you might want to follow this dude's procedure (I haven't tried it): http://unix.lofland.net/2011/06/30/corrupt-label-wrong-magic-number-errors/

Wednesday 27 March 2013

Copying a Solaris 11 Zone

Sidenote: While looking for some other info, a post I read said that Oracle was starting to use the word "zone" instead of "container" going forward. I don't know how official that is but I'm going to start doing the same - it's less to type!

 Okay, so one of my regular tasks in Solaris 10 is to copy a zone. My regular Solaris 10 procedure is like:

  1. Make a copy of the zone config (zonecfg -z zone export -f zone.cfg)
  2. Make a copy of the zonepath zfs filesystem (using zfs send and receive)
  3. Make a copy of any other filesystems  (using zfs send and receive)
  4. Edit the zone.cfg file to reference the copied zonepath and filesystems instead of the original ones. Also change the IP.
  5. Create the zone using the zone.cfg file (zonecfg -z zone1 -f zone.cfg)
  6. Attach the new zone (with -u)
  7. Boot the new zone and correct the hostname (using sys-unconfig).
For Solaris 11, points 2 and 7 have changed:
  1. Make a copy of the zone config (zonecfg -z zone export -f zone.cfg)
  2. Make a copy of the zonepath zfs filesystem (using zfs send and receive) including the zonepath's child filesystems but excluding the VARSHARE filesystem*
  3. Make a copy of any other filesystems  (using zfs send and receive)
  4. Edit the zone.cfg file to reference the copied zonepath and filesystems instead of the original ones. Also change the IP.
  5. Create the zone using the zone.cfg file (zonecfg -z zone1 -f zone.cfg)
  6. Attach the new zone (with -u)
  7. Boot the new zone, make sure export's mountpoint is /export and not /rpool/export and correct the hostname (using sysconfig configure -s).
---

*If you copied the zone and you included the VARSHARE filesystem, you're going to have problems when starting the zone. To fix this, log into the zone and do the following commands:
  zfs set canmount=noauto rpool/VARSHARE
  zfs set mountpoint=/var/share rpool/VARSHARE
  svcadm clear svc:/system/filesystem/minimal:default
  zfs set mountpoint=/export rpool/export

---

Tuesday 19 March 2013

Mounting filesystems on /var

If you trying to mount filesystems below /var, you're going to have a bad time.

The container won't boot because it mounts the filesystems first and then /var after.

I have an application that likes to put stuff in directories under /var so I made it filesystems under /var. I'm first going to reinstall the application to see if I can specify directories in other places. Barring that I will probably just put a link to some other place under /var. It's kinda avoiding the issue but I'm pressed for time, will try to solve the actual issue at a later stage.

Tuesday 12 March 2013

Solaris 11 Network Aggregation

Should be rather simple to set up:

dladm create-aggr -l net1 -l net3 aggr1
ipadm delete-ip aggr1
ipadm create-ip aggr1
ipadm create-addr -T static -a 192.168.100.172/24 aggr1

Source: http://blog.allanglesit.com/2011/03/solaris-11-network-configuration-advanced/

Monday 11 March 2013

Configuration for lockd server threads is suboptimal. Default value is 1024, configured value is 20

When you get this error in your messages:

Mar  1 10:39:07 machinename rpcmod: [ID 514475 kern.warning] WARNING: Configuration for lockd server threads is suboptimal. Default value is 1024, configured value is 20

This message is being generated by a Solaris 10 branded container. The default on on Solaris 11 is 1024 and somehow the message comes up on the global zone instead of the container. Log onto the container and change the value in /etc/default/nfs.

Saturday 9 March 2013

Solaris 10 branded zone - NIC vanishes after reboot


I’ve migrated a non-global Solaris 10 zone to a Solaris 10 branded zone. I made the zone an exclusive IP zone (samba’s AD integration i.e. winbind doesn’t work if I use a shared IP). However, when I rebooted the container, the NIC configuration got lost. I have to reconfigure it with ifconfig. Using /etc/hostname.net0 does not work. Seems to be no way to keep the config across reboots.

The problem is consistent across all the Solaris10 zones I’ve migrated.

Other symptoms: Physical network service doesn't start:

bash-3.2# svcs -xv
svc:/network/physical:default (physical network interfaces)
 State: maintenance since Wed Feb 27 13:31:54 2013
Reason: Start method exited with $SMF_EXIT_ERR_CONFIG.
   See: http://sun.com/msg/SMF-8000-KS
   See: man -M /usr/share/man -s 1M ifconfig
   See: /var/svc/log/network-physical:default.log
Impact: 6 dependent services are not running:
        svc:/milestone/network:default
        svc:/system/webconsole:console
        svc:/network/shares/group:default
        svc:/network/samba:default
        svc:/network/ssh:default
        svc:/network/winbind:default
bash-3.2#

Feedback from Oracle:
Bug 15802435 - SUNBT7182449 zonecfg configure-allowed-address does not work in solaris10 zones which is a regression of the fix for software defect Bug 15749195 - SUNBT7102421 allowed-address not configured at first boot after unconfiguration The latter has been made available with Solaris 11.1, which explains, why you didn't see the issue with Solaris 11.0 SRU 13.4 or earlier. Unfortunately there is no fix available officially for bug 15802435, yet.
Related error message (on the global zone):
Mar 12 14:02:53 hostname dlmgmtd[63]: [ID 183745 daemon.warning] Duplicate links in the repository: net0

EDIT: I updated to the latest patches. I've checked and now this problem is a thing of the past! Well done, Oracle, well done.

Wednesday 6 March 2013

Cannot do a "pkg update" on a new machine

"pkg update" kept telling me that there were no later packages for me in the repository. This seemed strange because after some googling I knew my packages weren't the latest.

Eventually I figured out the problem.

The default repository anybody who installs Solaris has access to. However, my machine came pre-installed and they had used the support repository. So my "pkg update" needed the support suppository to update. Follow this link to change to the support repository: https://pkg-register.oracle.com/help/ (Valid Oracle Support contract needed)


BEFORE
# pkg publisher
PUBLISHER                             TYPE     STATUS   URI
solaris                               origin   online http://pkg.oracle.com/solaris/release/
# pkg list entire
NAME (PUBLISHER)                                  VERSION                    IFO
entire                                            0.5.11-0.175.0.0.0.2.0     i--

AFTER
# pkg publisher
PUBLISHER                   TYPE     STATUS P LOCATION
solaris                     origin   online F https://pkg.oracle.com/solaris/support/
# pkg list entire
NAME (PUBLISHER)                                  VERSION                    IFO
entire                                            0.5.11-0.175.1.4.0.5.0     i--

Tuesday 5 March 2013

Specifying an IP for an exclusive IP address container

These are the container settings for Solaris 11 if you want to specify an IP in the zone config for an exclusive IP zone:

set ip-type=exclusive
add anet
set linkname=net0
set lower-link=auto
set allowed-address=<IP>/24
set defrouter=<routerIP>
set configure-allowed-address=true


NOTE: I'm having problems when migrating a Solaris 10 non-global zone to a Solaris 10 branded container and then making it an exclusive IP address. It doesn't keep the network card information. Logging a call with Oracle soon...