Mounting UNRSL Sun Disks on the Macintoshes
If you have an account on the UNRSL Sun System, it is easy to mount
a Sun disk directly to any networked Macintosh in the University System.
This allows you to keep all your files on Sun disks, where they will not
fill up the limited Mac hard drives, and will get backed up to tape regularly.
From Mac OS X
It's kind of a pain to set up, but we've got two Macs
in Seismo now that connect really easily to UNIX disks. The disks
appear mounted on the MacOS X desktop just like any other network disk,
transfers are very fast and reliable, it deals well with huge numbers
of files, and all the Finder facilities work.
I'll give step-by-step instructions here, but I will probably
forget a few steps. Also, for the UNIX server, I will tell you the
commands I used for Sun Solaris. I don't know the equivalents for
bornite's SGI IRIX.
- Assemble the following information:
- Users' login names, passwords, and UID numbers on the UNIX server.
- The principal ownership group name and GID on the server.
- Users' login names, passwords, and UID numbers on MacOS X.
- Server TCP name and IP address- e.g., bornite.mines.unr.edu (134.197.44.45).
- MacOS machine TCP name and IP address.
- Path to the UNIX server to the disk you want to mount.
- Configure the server to share a disk to the Mac via the NFS protocol.
- Become superuser on the server.
- Edit the /etc/dfs/dfstab file.
- Add a line to /etc/dfs/dfstab that is a share(1M) command. Example:
share -F nfs -o root=rumble:quake:slip,rw=seismonet:seismoimac.seismo.unr.edu:ramble.seismo.unr.edu:rip.seismo.unr.edu /space
This line from shake.seismo allows NFS access to the local disk mounted
at /space. Root ownership access is granted to three specific
machines; read-write user access is granted to all machines
in the netgroup seismonet (defined in Seismo in rumble:/etc/netgroup
and distributed by NIS), and also to the three Macs in the colon-
separated list: seismoimac, ramble, and rip.
Add the TCP name of the Mac to the list of machines with rw access.
- Run the
shareall command.
- Set up the MacOS X machine so each user accessing the UNIX disks
has the same login name, password, and UID number as they do on
the UNIX server. This allows write access to the UNIX disk. If anything
is different, users will have read-only access.
- Open the Applications/Utilities folder.
- Start NetInfo Manager.
- In NetInfo Manager, select Authenticate from the Security menu.
- Select Security->Enable Root User
- You may have to restart the Mac
- In NetInfo Manager, in the middle list, select groups.
- Select staff from the next list to the right.
- Select Edit->Duplicate
- Select
staff copy in the list.
- In the lower window double-click in turn on the values for
group name, gid, and the list of user names belonging to
that group, to put in the same values as are on the UNIX server.
In seismo we have, for instance, the group named
seismo,
gid=101, with every user being a member.
- To register the changes, click on some other group in the
list, confirm the changes, and then select Management->Restart
Local Netinfo Domains.
Now for each Mac user who wants to connect:
- In NetInfo Manager, click on users.
- Click on the user's name in the list.
- In the lower window, double click successively on the
values in the uid and gid fields, and change them to the
values that user has on the UNIX server.
- If the login (short) name of the user is different on the
UNIX server, it is probably easier to just create a new user
on the Mac with that (short) name, than to change an existing
Mac user's login name.
- To register the changes, click on some other user in the
list, confirm the changes, and then select Management->Restart
Local Netinfo Domains.
- Once the uid of a user is changed on the Mac, the user no
longer owns or can change any of his/her files and folders!
To fix this:
- Open the Terminal application from Applications/Utilities.
- Become superuser on the Mac with the
su command.
- Suppose the Mac user named
jim used to have uid=21,
and you changed it to 12345 to fit the uid on the UNIX
server. The following command will change every file
owned under the old uid to be owned by the user under
their new uid:
find / -user 21 -exec chown jim {} \;
(substitute values for this user)
For a user who has installed applications and has
used the machine a lot, this could take a half hour
or more. But it only needs to be done once.
New users added to this Mac need the same procedure.
- Now the user can mount the disk and use it:
- On the Mac, switch to the Finder and select Connect to Server...
from the Go menu.
- If you don't see an Address field, click on the down-pointing
arrow button.
- Type a server address into the Address field, like:
nfs://bornite.mines.unr.edu/usr/people
This has the server name and the path to the disk.
- The UNIX disk appears on the user's desktop.
- When you are done with a UNIX disk, always disconnect it by dragging
it to the Trash. A Powerbook with an NFS disk mounted, taken away
from the network, will grievously hang and have to be hard powered-down.
After trashing the network disk, it's a good idea to log out of the
Mac.
From Mac OS 7 through 9.1
The first step is to create a simple text file named
``.AppleVolumes'' (note the leading dot and the capitalization)
in your home directory on the Sun system. An example .AppleVolumes
file looks like:
/tmp Temp
~ Home
/quake/net/ftp FTP
/quake/net/web Web
/rumble/a1 Rumble-a1
/rumble/a2 Rumble-a2
/rumble/a3 Rumble-a3
/rumble/a4 Rumble-a4
/rumble/s1 Rumble-s1
/rumble/s2 Rumble-s2
/rumble/s3 Rumble-s3
/ Root
/cdrom CD-ROM
The first column is the UNIX directory path for the disk partition or
sub-directory you wish to use on the Macs, and the second column is the
name of the disk that will appear on the Mac.
You can add any partitions or sub-directories you like to the list.
In your Web browser hold down the mouse menu button on
this link, and save the file in your Sun
home directory with the name ``.AppleVolumes''.
Next sit down at a Macintosh and select the Chooser from the Apple Menu
located at the upper left corner of the Mac's display:
In the Chooser, select AppleShare, and the ``seismo'' AppleTalk Zone.
You should see a list of machines on the right, including at the name
of at least one Sun workstation. Generally all user accounts and all disks
are available from any UNRSL Sun, so it does not matter which Sun you choose:
Then the Chooser will ask you for your Sun login name and
password:
You can then select which disks to mount on the Mac, from those listed in your
.AppleVolumes file:
The Sun disk then appears on your Mac DeskTop like this:
Some pointers on using Sun disks on the Mac:
- Be careful when you execute a Find command on the Mac. If you include a
large Sun partition in the Find operation, it could spend hours searching
among hundreds of thousands of Sun files. Click on Find's ``More Choices'',
or make sure it is set to ``All Local Disks''.
- Drag and Drop from Sun to Mac disks may or may not work. It often
produces unexpected results for binary files that appear on the Mac as
``Documents''. Dragging a file over an application usually works, as does
opening the file from within the application. A few file types, such
as binary GIFs, can't even be correctly opened from within an application
if they were created on the Sun. An FTP transfer in binary mode is the only
way to obtain such files from the Sun with certainty; use Fetch or a Web
browser.
- Drag and Drop from Mac to Sun disks works more often, with a couple of
caveats. Dragging an entire Mac folder to replace one on the Sun will
also delete files in the Sun folder that are not in the Mac folder, so
drag collections of individual files instead of folders.
A few binary files will not drag to the Sun correctly either.
Saving a file on a Sun disk from within an application guarantees that
its file type will be set correctly.
Files saved on a Sun by Mac applications will then be draggable from the
Sun to the Mac.
- If you place files on a Sun disk from a Mac, and then move, rename,
or otherwise alter them from a Sun, they may not list or appear correctly
in the Mac's Finder windows. Opening such files from within a Mac application
should still yield correct results.
- Available space shown in the headers of Finder windows may not
reflect how much space is really available on the Sun disk.
If you are not the only person who uses this Macintosh, be sure you
unmount the all the Sun disks before you leave the machine.
Otherwise someone could delete all your Sun files.
Just select and drag the Sun disks to the trash, and they will be disconnected
from the Mac.