Gopi Desaboyina Solaris Blogs

Just another WordPress.com weblog

patchadd/patchrm/installcluster/installpatchset from failsafe/CD when non-global zones are involved.

Failed to boot non-global zone <zone name> during patchadd or patchrm or installpatchset

1. boot off CDROM/failsafe

# df -h
Filesystem             size   used  avail capacity  Mounted on
/ramdisk:a             228M   213M     0K   100%    /
/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                   613M   184K   612M     1%    /etc/svc/volatile
objfs                    0K     0K     0K     0%    /system/object
sharefs                  0K     0K     0K     0%    /etc/dfs/sharetab
swap                   613M   312K   612M     1%    /tmp
/tmp/dev               613M   312K   612M     1%    /dev
fd                       0K     0K     0K     0%    /dev/fd
rpool/ROOT/zfsbe        25G   5.6G   2.2G    72%    /a
rpool                   25G    43K   2.2G     1%    /a/rpool
/dev/dsk/c0t0d0s7      7.9G   5.1G   2.7G    66%    /mnt  <<<<<—This is where my recommended patch set is there.

2. Import the rpool [or] mount the ufs root, /var , /usr , /opt

# zfs list
NAME               USED  AVAIL  REFER  MOUNTPOINT
rpool             23.1G  2.22G  43.5K  /a/rpool
rpool/ROOT        5.62G  2.22G    31K  legacy
rpool/ROOT/zfsbe  5.62G  2.22G  5.62G  /a
rpool/dump         528M  2.23G   512M  –
rpool/swap        17.0G  18.8G   408M  –

# ./installpatchset -R /a  –s10patchset

Setup ………zoneadm: /a/zonepool/zone1: No such file or directory
could not verify zonepath /a/zonepool/zone1 because of the above errors.
zoneadm: zone zone1 failed to verify

ERROR: Zone verification failed : unable to mount zone ‘zone1’.

# patchrm -R /a 147989-01   # same case with patchadd too.
Validating patches…

Loading patches installed on the system…

Done!

Checking patches that you specified for removal.

Done!

Approved patches will be removed in this order:

147989-01
Preparing checklist for non-global zone check…

Checking non-global zones…

Failed to boot non-global zone zone1

# Since my local zones are on zonepool and it’s not imported. hence the above errors. if it’s UFS you need to find where exactly they needs to be mounted.

# You can find out this by reading /a/etc/zones/index file. ex: below.

# zpool import
  pool: zonepool
    id: 11568960480359416427
state: ONLINE
status: The pool was last accessed by another system.
action: The pool can be imported using its name or numeric identifier and
        the ‘-f’ flag.
   see:
http://www.sun.com/msg/ZFS-8000-EY
config:

        zonepool    ONLINE
          c0t2d0    ONLINE
# cat /a/etc/zones/index
global:installed:/
zone1:installed:/zonepool/zone1:f5055e59-7e9f-4af7-bfa8-edefff15c682  

# My local zones were under /zonepool. Since we mounted root under /a, zonepool should be mounted under /a/zonepool. If other zones or on different pools or file-systems you need to import/mount them to respective directory.

# zpool import -R /a zonepool
libshare SMF initialization problem: entity not found

# zfs list
NAME               USED  AVAIL  REFER  MOUNTPOINT
rpool             23.1G  2.22G  43.5K  /a/rpool
rpool/ROOT        5.62G  2.22G    31K  legacy
rpool/ROOT/zfsbe  5.62G  2.22G  5.62G  /a
rpool/dump         528M  2.23G   512M  –
rpool/swap        17.0G  18.8G   408M  –
zonepool          4.41G  11.2G    32K  /a/zonepool
zonepool/zone1    4.41G  11.2G  4.41G  /a/zonepool/zone1

# ls -ltr /a/zonepool
total 3
drwx——   4 root     root           4 Dec 23 23:18 zone1

# patchrm -R /a 147989-01
Validating patches…

Loading patches installed on the system…

Done!

Checking patches that you specified for removal.

Done!

Approved patches will be removed in this order:

147989-01
Preparing checklist for non-global zone check…

Checking non-global zones…

Restoring state for non-global zone zone1…

This patch passes non-global zone check.
147989-01

Summary for zones:

Zone zone1

Rejected patches:
None.

Patches that passed the dependency check:
147989-01

Removing patches from non-global zones

Removing patches from zone zone1 # <<<<<<<<<<<>>>>>>>>>>>>>>>>>
Booting non-global zone zone1 for patching…
Removing patch 147989-01…
Done!

Checking installed patches…

Backing out patch 147989-01…

Patch 147989-01 has been backed out.

Restoring state for non-global zone zone1…

Removing patches from global zone
Removing patch 147989-01…

Checking installed patches…

Executing prebackout script…
Backing out patch 147989-01…

Executing postbackout script…
Patch 147989-01 has been backed out.

Done!
#

There you go.

Advertisements

December 27, 2011 Posted by | Solaris | 1 Comment