0

I've come across a strange issue.

I've got a zfs partition mounted, in it a solaris "hard partition" zone has been created.

We have noticed that the /home directory

  1. root in the global zone cannot access this directry at all

    global> id uid=0(root) gid=0(root) global> cd home/ home/: Not owner. global> ls -la |grep home dr-xr-xr-x 1 root root 1 Jun 16 14:38 home

  2. root in the client zone can read, but not write to this directory

    client1> id uid=0(root) gid=0(root) client> cd /home client> touch foo touch: foo cannot create client> cd .. client> chmod u+w home chmod: WARNING: can't change home

What is going on here? As far as I can see, there is nothing "special" about this directory

gloabl> cat /etc/zones/client1.xml 
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE zone PUBLIC "-//Sun Microsystems Inc//DTD Zones//EN" "file:///usr/share/lib/xml/dtd/zonecfg.dtd.1">
<!--
    DO NOT EDIT THIS FILE.  Use zonecfg(1M) instead.
-->
<zone name="knobs1" zonepath="/zones/client1" autoboot="true">
  <network address="172.16.54.15" physical="bge0"/>
  <network address="172.16.54.21" physical="bge0"/>
  <network address="172.16.54.22" physical="bge0"/>
</zone>

gloabl> zfs list | grep client1
zpool1/zones/client1                 29.2G  34.7G  14.2G  /zones/client1
zpool1/zones/client1@initial         5.89M      -  5.89G  -
zpool1/zones/client1@pre_profiling   74.4M      -  8.58G  -
zpool1/zones/client1@post_profiling  8.01G      -  19.7G  -
zpool1/zones/client1@pre-rebuild     4.42G      -  18.4G  -

Additional information added, as requested.

# getfacl -a /zones/client1
File system doesn't support aclent_t style ACL's.
See acl(5) for more information on Solaris ACL support.
# zfs get all zpool1/zones/client1
NAME                 PROPERTY       VALUE                  SOURCE
zpool1/zones/client1  type           filesystem             -
zpool1/zones/client1  creation       Wed Apr 30 18:09 2008  -
zpool1/zones/client1  used           29.2G                  -
zpool1/zones/client1  available      34.7G                  -
zpool1/zones/client1  referenced     14.2G                  -
zpool1/zones/client1  compressratio  1.00x                  -
zpool1/zones/client1  mounted        yes                    -
zpool1/zones/client1  quota          none                   default
zpool1/zones/client1  reservation    none                   default
zpool1/zones/client1  recordsize     128K                   default
zpool1/zones/client1  mountpoint     /zones/client1          local
zpool1/zones/client1  sharenfs       off                    default
zpool1/zones/client1  checksum       on                     default
zpool1/zones/client1  compression    off                    default
zpool1/zones/client1  atime          on                     default
zpool1/zones/client1  devices        on                     default
zpool1/zones/client1  exec           on                     default
zpool1/zones/client1  setuid         on                     default
zpool1/zones/client1  readonly       off                    default
zpool1/zones/client1  zoned          off                    default
zpool1/zones/client1  snapdir        hidden                 default
zpool1/zones/client1  aclmode        groupmask              default
zpool1/zones/client1  aclinherit     secure                 default
zpool1/zones/client1  canmount       on                     default
zpool1/zones/client1  shareiscsi     off                    default
zpool1/zones/client1  xattr          on                     default
1
  • Add also: ls -dv /home Jun 18, 2009 at 2:03

3 Answers 3

3

It could be that you have/need to have /home mounted using automount. Take a look at the /etc/auto_home and /etc/auto_master files (in the zone). Chances are you have it set to automount /home, but haven't configured where to automount from in /etc/auto_home.

Adding something like the following to /etc/auto_home will let you have home dirs automounted from /export/home:

*       localhost:/export/home/&
1
  • 1
    This was it, /home was actually setup (which I guess is standard) with automounter. This isn't something that we use, and one of the developers needed to replicate a linux directory structure on this solaris machine, needed to create things under /home I've changed the location where automounter puts auto_home, so it should be all good now. Thanks. Jun 18, 2009 at 3:37
0

Just a guess, but what shows

getfacl -a /zones/client1

and also

zfs get all zpool1/zones/client1
0

I'm not sure I completely understand your configuration. Please correct me and add the missing details where necessary:

  1. You have created a ZFS filesystem in your global zone for use by a non-global zone.
  2. You wish to permit the non-global zone to control the ZFS filesystem.
  3. You're (obviously) having a problem with global zone and non-global zone accessing the data in some manner.
  4. You're trying to permit the non-global zone to see the data in the same manner as the global zone.

Requests:

  1. Please send the relevant parts of zpool history
  2. Please send the entire output of the non-global zones configuration:
    # zonecfg -z zone info

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .