1

I have a Solaris with ZFS file system and NFS. I am kind of lost on how to export directories from the Solaris OS which has zfs via NFS? That way I can mount them on Freebsd client.

1

Use the sharenfs property. e.g.

zfs set sharenfs=on filesystem

From the solaris zfs man page (http://docs.oracle.com/cd/E19253-01/816-5166/6mbb1kqo8/index.html)

sharenfs=on | off | opts

Controls whether the file system is shared over NFS, and what options are used. A file system with a sharenfs property of off is managed through traditional tools such as share(1M), unshare(1M), and dfstab(4). Otherwise, the file system is automatically shared and unshared with the zfs share and zfs unshare commands. If the property is set to on, the share(1M) command is invoked with no options. Otherwise, the share(1M) command is invoked with options equivalent to the contents of this property.

When the sharenfs property is changed for a dataset, the dataset and any children inheriting the property are re-shared with the new options, only if the property was previously off, or if they were shared before the property was changed. If the new property is off, the file systems are unshared.

| improve this answer | |
  • I did it but the client still disable : svcs -a|grep nfs disabled Apr_22 svc:/network/nfs/cbd:default disabled Apr_22 svc:/network/nfs/client:default disabled Apr_22 svc:/network/nfs/log:default online Apr_22 svc:/network/nfs/server:default online Apr_22 svc:/network/nfs/status:default online Apr_22 svc:/network/nfs/nlockmgr:default online 19:44:30 svc:/network/nfs/mapid:default online 19:44:30 svc:/network/nfs/rquota:default – Loura Apr 29 '16 at 4:52
  • 1
    that's a different problem with a different solution. you need to enable the nfs service. i'm not a solaris expert but google suggests that maybe you should try svcadm -v enable network/nfs/serve – cas Apr 29 '16 at 4:54
  • yes I find it :svcadm enable network/nfs/client:default. I will try again – Loura Apr 29 '16 at 4:56
  • 1
    you need to enable the NFS server, not the client. network/nfs/server (i accidentally missed the r on my last comment). You don't say what version of Solaris you are running but the following URL documents the procedure for Solaris 10 Jet: docs.oracle.com/cd/E19118-01/n1.sprovsys52/819-6519/gclho/… - i doubt if it's changed much (if at all) since then. – cas Apr 29 '16 at 5:01
  • yes the server is running, and all the services now are online. But zfs set share=name=pr,path=/pr,prot=nfs rpool/pr cannot set property for 'rpool/pr': invalid property 'share' why does it give me this error? – Loura Apr 29 '16 at 5:10
0

Appears like you've gotten advice on how to share it on the Solaris side. Running share on the server will show what is shared (and a few new methods with Solaris 11).

Then just mount it on the client, for a one time mount: mount -F nfs <server>:/share_path /mount_point_path Or added it to the vfstab or set to mount via the automounter.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.