Here are my notes that I put together based on reading man pages, config sample, and from my previous blog entry on this topic.
1. (optional) mount an extra disk on the machine that will be the NFS server.
2. enable NFS sever by running the following:
svcadm -v enable -r network/nfs/server
3. Run the following command to share via NFS
share -F nfs -o rw /disk
Note: The above share command will not persist over reboots. To persist over reboots, add an entry to /etc/dfs/dfstab
share -F nfs -o rw /disk
4. Run the following command to mount from the client side:
mount -F nfs server:/disk /mount_point
Note: The above mount command will not persist over reboots. To persist over reboots, add the following line in /etc/vfstab
:
server:/disk - /mount_point nfs - yes rw,soft
See also this vfstab sample.
Please note that you can’t use the root account on the NFS client host to create files, because root on the NFS client doesn’t mean root on the NFS server. Use a common user account across NFS server and client(s) instead.
very useful, thnx!
You welcome!
Very useful tip
Thanks
When I did mount -F nfs server:/opt/local /opt/local on my client – it gave me this error
nfs mount: server: : RPC: Program not registered
nfs mount: retrying: /opt/local
I am facing same problem i was tried so many things but problem not resolved . I was just restart the server & used svcadm -v enable -r network/nfs/server command my porblem get resolved.
Any suggestions on the previous error ?
According to this post, you might want to check if the server is running. Hope this helps.
Thanks ! Indeed the problem was my server’s nfs
Thanks! I’ve done this before but couldn’t remember the exact steps. I was able to get it going within minutes!
You welcome. Good to know that the notes helped you.
Very nice. Saved me tons of time researching. Keep up the good work.
JS
Thanks!
Very well written, very concise.
Sun could take lessons from you on how to document functionality >.
Cheers
Thank you.
Nice notes indeed helped me to work on the right content
Keep Going nice work
Hi mpc,
Thanks
This is very useful. Thank you ….Dave
Sam,
You welcome
Awesome concise and to the point. Dave thank you so much
Hi Afshin,
You welcome
Excellent.Very Usefull
Hi Reddy,
Thanks
Hi Dave,
I was experimenting a backup over NFS problem, which I did not have with solaris 8. I was pretty sure the problem came from the new service management method coming with solaris 10, and indeed, running the svcadm command resolved the issue! Thank you so much!
Hi Phil,
You welcome. Good to know this information was helpful to you.
good work appricateable
hello i followed the steps but when i try to mount the nfs on my client i get…nothing!!
bash-3.00#svcadm -v enable -r network/nfs/server
bash-3.00#share -F nfs -o rw /logs
bash-3.00# mount -F nfs 106.31.65.231:/logs /logs
after a while, i have to stop it…
^C
bash-3.00#
but it’s not mounted…. what am i doing wrong? please…
You can mount the client side using this command
mount -t nfs 192.168.1.214:/Share /mnt
my bad, wrong ip (was nat)…great information!!!
Hi Dave,
Thanks much…worked like magic !
Was struggling all these days to do a NFS mount between two servers. The official “SUN pages/tips/notes” is crap …vague,highly
technical, confusing and not helpful at all. I guess its a guise to get folks to attend their “official” classes.
Hey Dave, how about more notes & tips on basic Solaris stuff for us beginners? Would be highly appreciated 🙂
Imtiaz
Is it possible for a client side (second solaris box) to view mounted partitions on the server side (first solaris box) if those partitions are ntfs, ext3 and fat32? The nfs network share example worked perfectly for the nfs partition, and I just substituted the relevant ip address instead of the word server when typing the mount command. On the server side (first solaris box), I have mounted various partitions including Fat32, NTFS and ext3. Using the network/nfs/server example in Dave’s Blog, my client side (second Solaris box) is unable to see anything inside the folders on the server side (first solaris box) for those specially mounted partitions (i.e., nothing is visible in the mounted folders that are the fat32, ntfs and ext3 partitions) — however, the partitions and files are visible within the mounted folders on the server side (first solaris box). Both solaris boxes have been set up to read fat32, ntfs and ext3 with FSWfsmisc.tar.gz and FSWpart.tar.gz. I would prefer to have both boxes running Solaris, rather than one running XP and using samba with the other. Thank you.
Hi Keith,
I don’t see why not. Before ZFS, UFS is typically used on the disk for Solaris. You can share the UFS file system as NFS share. Following the same token, if you can read Fat32, NTFS and EXT3 on the first Solaris box, you should be able to share them through NFS to other Solaris instances. I haven’t tried this myself. Let us know your findings. Thanks.
Here is an update to my quest to share between NTFS, EXT2FS and UFS file systems: Microsoft Windows Services for Unix 3.5 (aka “SFU”) is a free program that enables a Solaris box to share files with an XP box, and it is possible to have read/write access on both boxes if so desired — this setup requires one box running XP and the other box running Solaris. To date, I have been unable to mount ext2fs and ntfs partitions onto computer number two from computer number one with both computers running Solaris simultaneously — FSWfsmisc.tar.gz and FSWpart.tar.gz enable read-only access as to ntfs and ext2fs partitions on the same Solaris box running Solaris, but I have been unable to mount those ntfs and ext2fs partitions from the first Solaris Box so that they are visible with read-only access on the second Solaris box.
Hi Keith,
Thank you for sharing your findings.
Sounds Grt.
Verry Helpfull, Saved me lots of time. Thanks
mysbciclub.org
Excellent One. I have no words for apreciation
Hi Dave,
You are ROCK …
Keep posting…Thanks
hai dave
Nice content
I have a new sunos 5.10 box on a active directory windows network. its all set up, ping telnet ftp work find. put the compiler tools on, created a new disk ,have internet access etc. BUT
I know very little about the windows side, and I want to expose /export a file system to the network users , but I “My NetworkPlaces” on windows does not find my machine.or net view etc .The DNS knows about my machine, cause can ping it by name, ftp telnet by name all work fine. Internet via the box even works, but Whatever windows facility that populates “My network places” does not know about this machine. I was hoping to get ls //devsun/export to work, devsun is the machine name and “export” is the filesys I tried to export using
svcadm -v enable -r network/nfs/server
share -F nfs 0o rw /export
and added an entry to /etc/dfs/dfstab for this share too.
. The windows administrator says I need to Do something on the sun box to enable this visability. (not just of the share, but of the machine name itself). Whos fault is it do you think?
Good work Dave.
Regards
siva
Dave your a champ mate..This is so easy..after multiple trials and errors…Only your article helped me..thanks a million
You just saved my a bunch of time, thank you!
Not gonna lie this was a huge help. Got everything mounted perfectly. Now my only problem is the client is showing the mount as nobody:nobody
Any idea on how to fix it? The client is RHEL 5.4
great!
thanks,
simple explanation….great effect
For me granting tghe permission was the problem
IF, like this
mount -F nfs solaris12:/u01 /nfstest
then grant permission in solaris12 as
chown –R oracle:oinstall /export/nfs4rac
Dude – your a star!
This note is 4+ years old, and is still work very well. This prob saved me days of reading to understand! (Tho now its still up 2 me to read and understand the fine details)
I am a beginner Sun sys admin and was able to do this in 15 mins
A+++++++++++++++
how to break the root password with our user id
If you are doing an install on reduced networking system you’ll need theses mofos…
Server:
system SUNWnfsckr Network File System (NFS) client kernel support (Root)
system SUNWnfscr Network File System (NFS) client support (Root)
system SUNWnfscu Network File System (NFS) client support (Usr)
system SUNWnfsskr Network File System (NFS) server kernel support (Root)
system SUNWnfssr Network File System (NFS) server support (Root)
system SUNWnfssu Network File System (NFS) server support (Usr)
system SUNWgssk kernel GSSAPI V2
system SUNWrsgk kernel RPCSEC_GSS
client:
system SUNWnfsckr Network File System (NFS) client kernel support (Root)
system SUNWnfscr Network File System (NFS) client support (Root)
system SUNWnfscu Network File System (NFS) client support (Usr)
system SUNWgssk kernel GSSAPI V2
system SUNWrsgk kernel RPCSEC_GSS
Thanks. This is concise, yet complete.
hi..
This blog helped me out a lot and finally me able to config a high-fie topic in Solaris
how to break the root password with our user id
good working all those people keep it good jobs