Zone filesystem create problem

Hello, I've got an issue that hopefully someone can help me with. I have 2 identically configured e250s (both were jumpstarted the same) and I'm trying to create a duplicate zone on both systems. I wrote a config file for zonecfg that adds 3 lofs mounts. On one system if works just fine and zone get configured and installed. However, on the other machine, the zonecfg command runs without error but the zoneadm install fails with the following error:

# zonecfg -z mysql1 -f /var/tmp/mysql1-zone.cfg

# zoneadm -z mysql1 install

Preparing to install zone <mysql1>.

ERROR: Read-only file system: cannot create mount point </zones/mysql1/root/opt/csw/var>

ERROR: Read-only file system: cannot create mount point </zones/mysql1/root/usr/local>

ERROR: cannot setup zone <mysql1> inherited and configured file systems

ERROR: cannot setup zone <mysql1> file systems inherited and configured from the global zone

ERROR: cannot create zone boot environment <mysql1>

zoneadm: zone'mysql1':'/usr/lib/lu/lucreatezone' failed with exit code 74.

The config file is the same on both systems and the loop directories on the global zone are identical.

Here is the config file I'm passing to zonecfg:

# zonecfg -z mysql1 export

create -b

set zonepath=/zones/mysql1

set autoboot=true

add inherit-pkg-dir

set dir=/lib

end

add inherit-pkg-dir

set dir=/platform

end

add inherit-pkg-dir

set dir=/sbin

end

add inherit-pkg-dir

set dir=/usr

end

add inherit-pkg-dir

set dir=/usr/sfw

end

add inherit-pkg-dir

set dir=/opt/csw

end

add fs

set dir=/opt/csw/etc

set special=/zones/local/mysql1/optcswetc

set type=lofs

add options rw

add options nodevices

end

add fs

set dir=/opt/csw/var

set special=/zones/local/mysql1/optcswvar

set type=lofs

add options rw

add options nodevices

end

add fs

set dir=/usr/local

set special=/zones/local/mysql1/usrlocal

set type=lofs

add options rw

add options nodevices

end

add net

set address=192.168.0.70

set physical=hme0

end

Anyone have any suggestions?

Thanks

[2462 byte] By [unixsa] at [2007-11-26 11:56:49]
# 1

Focusing on the error "Read-only file system," I would do the following:

* Run "df -k /zones/mysql1/root/opt/csw/var"

* Run "mount" and locate the file system returned by the above and see if it's mounted read-only (as the error implies).

That should at least get you on the right path

MichaelMyers at 2007-7-7 12:16:31 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 2

Unfortunately that path doesn't exist prior to the zoneadm -z mysql1 install

command. Mount shows the /zones filesystem to be read/write:

/zonepool on zonepool read/write/setuid/devices/exec/atime/dev=4010007 on Tue Dec 5 10:49:39 2006

/zones on zonepool/zonefs read/write/setuid/devices/exec/atime/dev=401000a on Tue Dec 5 14:53:20 2006

Here's what the mount looks like on the other system:

/zonepool on zonepool read/write/setuid/devices/exec/atime/dev=4010002 on Tue Dec 5 13:44:04 2006

/zones on zonepool/zonefs read/write/setuid/devices/exec/atime/dev=4010004 on Tue Dec 5 13:45:11 2006

/zones/mysql1/root/dev on /zones/mysql1/dev read/write/setuid/devices/zonedevfs/dev=4cc0004 on Tue Dec 5 14:06:14 2006

/zones/mysql1/root/lib on /lib read only/setuid/nodevices/nosub/dev=800020 on Tue Dec 5 14:06:14 2006

/zones/mysql1/root/opt/csw on /opt/csw read only/setuid/nodevices/nosub/dev=800020 on Tue Dec 5 14:06:14 2006

/zones/mysql1/root/opt/csw/etc on /zones/local/mysql1/optcswetc read/write/setuid/nodevices/dev=4010004 on Tue Dec 5 14:06:14 2006

/zones/mysql1/root/opt/csw/var on /zones/local/mysql1/optcswvar read/write/setuid/nodevices/dev=4010004 on Tue Dec 5 14:06:14 2006

/zones/mysql1/root/platform on /platform read only/setuid/nodevices/nosub/dev=800020 on Tue Dec 5 14:06:14 2006

/zones/mysql1/root/sbin on /sbin read only/setuid/nodevices/nosub/dev=800020 on Tue Dec 5 14:06:14 2006

/zones/mysql1/root/usr on /usr read only/setuid/nodevices/nosub/dev=800020 on Tue Dec 5 14:06:14 2006

/zones/mysql1/root/usr/local on /zones/local/mysql1/usrlocal read/write/setuid/nodevices/dev=4010004 on Tue Dec 5 14:06:14 2006

/zones/mysql1/root/usr/sfw on /usr/sfw read only/setuid/nodevices/nosub/dev=800020 on Tue Dec 5 14:06:14 2006

/zones/mysql1/root/proc on proc read/write/setuid/nodevices/zone=mysql1/dev=4980004 on Tue Dec 5 14:06:26 2006

/zones/mysql1/root/system/contract on ctfs read/write/setuid/nodevices/zone=mysql1/dev=4940005 on Tue Dec 5 14:06:26 2006

/zones/mysql1/root/etc/svc/volatile on swap read/write/setuid/nodevices/xattr/zone=mysql1/dev=4a0000d on Tue Dec 5 14:06:26 2006

/zones/mysql1/root/etc/mnttab on mnttab read/write/setuid/nodevices/zone=mysql1/dev=49c0005 on Tue Dec 5 14:06:26 2006

/zones/mysql1/root/dev/fd on fd read/write/setuid/nodevices/zone=mysql1/dev=4bc0005 on Tue Dec 5 14:06:33 2006

/zones/mysql1/root/tmp on swap read/write/setuid/nodevices/xattr/zone=mysql1/dev=4a0000e on Tue Dec 5 14:06:34 2006

/zones/mysql1/root/var/run on swap read/write/setuid/nodevices/xattr/zone=mysql1/dev=4a0000f on Tue Dec 5 14:06:34 2006

Here's another oddity, I've tried commenting out all the lofs entries except for the first one (opt/csw/etc) and it works just fine.

unixsa at 2007-7-7 12:16:31 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 3

Mystery solved.

The problem was that the source directories (/opt/csw/var and /usr/local) did not exist in the global zone yet. When I went to install the zone, it kept trying to create the mount points from within and zone and since /opt/csw and /usr are read-only in the zone, it was unable to create the mount points.

Boy do I feel like an idiot :-)

unixsa at 2007-7-7 12:16:31 > top of Java-index,Solaris Operating System,Solaris 10 Features...