Go to main content

Managing User Accounts and User Environments in Oracle® Solaris 11.4

Exit Print View

Updated: August 2021

How to Share Home Directories That Are Created as ZFS File Systems

  1. Become an administrator.

    See Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.4.

  2. Create a separate pool for the user home directories.
    # zpool create pool mirror disk 1 disk 2 mirror disk 3 disk 4

    For example:

    # zpool create users mirror c1t1d0 c1t2d0 mirror c2t1d0 c2t2d0
  3. Create a container for the home directories.
    # zfs create filesystem

    For example:

    # zfs create users/home
  4. (Optional) Assign a multilevel home directory to users who have been assigned a specific clearance.
    zfs create -o multilevel=on filesystem

    For more information, see the clearance(7) man page.

  5. Set the share properties for the home directory.

    For example, to create an NFS share and set the share.nfs property for users/home, you would type:

    # zfs set share.nfs=on users/home

    When using this new syntax, each file system contains an "auto share" that is created as soon as the share.nfs property (or the share.smb property) is set to on for that file system. The previous command shares a file system named users/home and all of its children.

  6. (Optional) Enable labeled sharing when sharing the file system.

    If you assign a multilevel home directory to a user, then you must enable labeled sharing while sharing file systems.

    zfs set share.nfs=on share.nfs.labeled=on filesystem
  7. Confirm that the descendent file system shares are also published.

    For example:

    # zfs get -r share.nfs users/home

    The –r option displays all of the descendent file systems.