I was able to recover my ZFS filesystem when I reinstalled Solaris. If I had known I was going to nuke the root partition, I would have done something like zpool export zoo to make sure it could be imported to a new machine. Since I didn't I had to recover it via zpool import -f zoo.
If we were to take a look at the home directories right then, we see:
# ls -al /export/zfs total 26 drwxr-xr-x 7 root sys 7 Jan 14 14:25 . drwxr-xr-x 4 root sys 512 Jan 14 23:55 .. drwxr-xr-x 2 2025 100 2 Jan 14 14:25 monster drwxr-xr-x 2 1094 100 2 Jan 14 14:10 nfsv2 drwxr-xr-x 2 1813 100 2 Jan 14 14:10 nfsv3 drwxr-xr-x 2 3530 100 2 Jan 14 14:11 nfsv4 drwxr-xr-x 2 1066 staff 3 Jan 14 14:24 tdh
So, we see names for root, sys, and staff. We don't see names for uid 1066, gid 100, etc. The reason why is that ownership is stored by a numeric value in the inode and not a string name. And we do not have a mapping for these uids to names. We can fix that easily:
# grep tdh /etc/passwd # grep users /etc/group # echo "users::100:" >> /etc/group # useradd -m -u 1066 -g 10 -c "Tom Haynes" -s /bin/tcsh -d /export/zfs/tdh tdh # useradd -m -u 1094 -g 100 -c "Mr. NFSv2" -d /export/zfs/nfsv2 nfsv2 # grep users /etc/group users::100: # grep tdh /etc/passwd tdh:x:1066:10:Tom Haynes:/export/zfs/tdh:/bin/tcsh # ls -al /export/zfs total 26 drwxr-xr-x 7 root sys 7 Jan 14 14:25 . drwxr-xr-x 4 root sys 512 Jan 14 23:55 .. drwxr-xr-x 2 2025 users 2 Jan 14 14:25 monster drwxr-xr-x 2 nfsv2 users 2 Jan 14 14:10 nfsv2 drwxr-xr-x 2 1813 users 2 Jan 14 14:10 nfsv3 drwxr-xr-x 2 3530 users 2 Jan 14 14:11 nfsv4 drwxr-xr-x 2 tdh staff 3 Jan 14 14:24 tdh
We can see that right away the new accounts are reflected in the directory output and that even if there is no corresponding user, we can see a group.
So if you are looking at the output of ls -la and the user or group is a number, then it means that number does not have a corresponding entry in the name service. On a NFSv2/v3 mounted filesystem, it might mean that while the server can see the entry, the client can not. Or it could mean that the server supports more users than the client. With NFSv4, you would see the string nobody, which effectively prevents you from seeing the UID.