2 Replies Latest reply on May 14, 2012 7:40 AM by dermute

    confused about ZFS filesystems created with Solaris 11 Zone

      Installing a blank Zone in Solaris *10* with "zonepath=/export/zones/TESTvm01" just creates one zfs filesystem:
      +"zfs list+
      +rzpool/export/zones/TESTvm01 4.62G 31.3G 4.62G /export/zones/TESTvm01"+

      Doing the same steps with Solaris *11* will ?create? more filesystems:
      +"zfs list+
      +rpool/export/zones/TESTvm05 335M 156G 32K /export/zones/TESTvm05+
      +rpool/export/zones/TESTvm05/rpool 335M 156G 31K /rpool+
      +rpool/export/zones/TESTvm05/rpool/ROOT 335M 156G 31K legacy+
      +rpool/export/zones/TESTvm05/rpool/ROOT/solaris 335M 156G 310M /export/zones/TESTvm05/root+
      +rpool/export/zones/TESTvm05/rpool/ROOT/solaris/var 24.4M 156G 23.5M /export/zones/TESTvm05/root/var+
      +rpool/export/zones/TESTvm05/rpool/export 62K 156G 31K /export+
      +rpool/export/zones/TESTvm05/rpool/export/home 31K 156G 31K /export/home"+

      I dont understand why Solaris 11 is doing that. Just one FS (like in Solaris 10) would be better for my setup. I want to configure all created volumes by myself.
      Is it possible to deactivate this automatic "feature"?
        • 1. Re: confused about ZFS filesystems created with Solaris 11 Zone
          Mike Gerdts-Oracle
          There are several reasons that it works like this, all guided by the simple idea "everything in a zone should work exactly like it does in the global zone, unless that is impractical." By having this layout we get:

          * The same zfs administrative practices within a zone that are found in the global zone. This allows, for example, compression, encryption, etc. of parts of the zone.
          * beadm(1M) and pkg(1) are able to create boot environments within the zone, thus making it easy to keep the global zone software in sync with non-global zone software as the system is updated (equivalent of patching in Solaris 10). Note that when Solaris 11 updates the kernel, core libraries, and perhaps other things, a new boot environment is automatically created (for the global zone and each zone) and the updates are done to the new boot environment(s). Thus, you get the benefits that Live Upgrade offered without the severe headaches that sometimes come with Live Upgrade.
          * The ability to have a separate /var file system. This is required by policies at some large customers, such as the US Department of Defense via the DISA STIG.
          * The ability to perform a p2v of a global zone into a zone (see solaris(5) for examples) without losing the dataset hierarchy or properties (e.g. compression, etc.) set on datasets in that hierarchy.

          When this dataset hierarchy is combined with the fact that the ZFS namespace is virtualized in a zone (a feature called "dataset aliasing"), you see the same hierarchy in the zone that you would see in the global zone. Thus, you don't have confusing output from df saying that / is mounted on / and such.

          Because there is integration between pkg, beadm, zones, and zfs, there is no way to disable this behavior. You can remove and optionally replace /export with something else if you wish.

          If your goal is to prevent zone administrators from altering the dataset hierarchy, you may be able to accomplish this with immutable zones (see zones admin guide or file-mac-profile in zonecfg(1M)). This will have other effects as well, such as making all or most of the zone unwritable. If needed, you can add fs or dataset resources which will not be subject to file-mac-profile and as such will be writable.
          1 person found this helpful
          • 2. Re: confused about ZFS filesystems created with Solaris 11 Zone
            Thank you for your answer and those really good information.

            I just dont like not having the choice between the "new" and the "old" layout :)