May 21, 2019

Grinder - Old Suns and NFS

I want to mirror some files that are on one of our old suns to a nice shiny new linux machine. Using rsync would be logical. Two problems present themselves. One is that suns don't ship with rsync (suns don't ship with much of any of the software that modern people have come to know and love). However I do have an rsync executable! The problem is that current versions of rsync refuse to work with it, so it is utterly useless (unless you want to use rsync between two old suns).

So, the logical thing to do is to use NFS, set up the sun to export the partition of interest to the linux machine, then mount it and then do rsync from the mounted filesystem.

The following link is useful, along with "man" for share and shareall.

What I had to do -- server (sun) side

On the sun in question:
su
vi /etc/hosts -- to add the linux machine
vi /etc/dfs/dfstab -- fiddle a line as below
unshareall
shareall
share
There was already a line exporting the /d0 partition in the dfstab, so I just needed to add my machine to the end of the list. This machine is already running NFS to a variety of machines (most of which no longer exist or are unreachable due to new network setup). Be all that as it may, I don't need to do anything to start NFS running on boot, just add my machine to the list.
-               /d0   rw=tom:dick:harry:linuxhost   ""
The dfstab file gets generated from information in the directory /l/rootutil/data/dfs as part of an heirloom sun management scheme, so I added my machine to the files there -- but I don't expect this management scheme to ever run again, so this is just covering my bases.

What I had to do -- client side

On the linux machine:
su
mkdir /crater_d0
vi /etc/fstab -- add a line to mount, as below
mount /crater_d0
It was just that easy. I used the first line below first, then switched to the second so the mount would be read-only.
crater:/d0 /crater_d0 nfs defaults 0 0
crater:/d0 /crater_d0 nfs ro,nosuid,nodev,nofail 0 0
Since I put this into fstab, it should get mounted every time the machine reboots.
Have any comments? Questions? Drop me a line!

Tom's home page / tom@mmto.org