TeraStation Pro and NFS Walkthough for OSX and OSX Server
WARNING AND DISCLAIMER
First of all, I don't recommend the TerastationPro at all, if you want something turn key I highly recommend the Infrant NV , it's worth the price.
If you are are using the Terastation Pro then read the following. By doing anything in this post you are hacking your own system, I am NOT responsible for loss of property, loss of data, hurting your business, eye strain, or anything else that may occur. By doing this you will void your warranty. Good, lets move on.
I have a little personal setup of a Terastation Pro, and a MacMini running OSX Server. The MacMini is a Windows Primary Domain controller and uses OSX's wonderful Open Directory setup. Unfortunately, the Samba support of the Terastation Pro is poor, and I will leave it at that. I was unable to get the Terastation Pro to log onto the my Samba domain, nor even get close to running Active Directory. If you like you can still hack away at the SMB.config file and try to get the work with you OSX Server but I am not perusing that path any longer. Please post if you get something running.
For more details on my personal setup please see the FAQ on the bottom, as they are not relevant to this subject.
The Walk Though
Setting up the Terastation Pro
Obviously the system should be plugged in, turned on. Have your IP setup, if you have DHCP then look at your Terastation LCD, it should say what your IP address is. For the most part we are going to assume that you have Basic knowledge of the system. At the time of this modification my Terastation Pro was pretty much stock. I had only changed the name of the system via the Terastation Pro Web GUI.
We are going to be downloading a Buffalo Tool that is used to update the Firmware on your Terastation Pro. You will need access to a windows machine for this part of the howto. We will be using a Non-Official Firmware created by Entropy, whom we all owe some thanks.
- Download the 1.01-2 (test1).dat file and the 1.01-0.51-withAD.zip file from the Non-Official Firmware links, or from the links posted here.
[Note: you may have to right click and choose "Save Target", or "Save Link As" in order to download the file and not have the browser try and open the file.]
- Unzip the "TSPro-1.01-0.51-withAD.zip" file somewhere, I used my desktop.
- Open the "TSPro-1.01-0.51-withAD" folder and rename the file "image.dat" to "image.dat.old".
- Drag the "image-1.01-2-test1.dat" file from wherever you saved into the "TSPro-1.01-0.51-withAD" folder.
- Then rename "image-1.01-2-test1.dat" to "image.dat". Now the firmware updater will upload the Unofficial Firmware giving you SSH access to the Terastation Pro.
- Run "NASUpdater.exe" to start the firmware upgrading process. You should see this window with your Domain and your Terastation's name shown.
- Click the "Firmware Update" button.
- Then enter your password in the field next to "Administrator:".
- Click the "OK" button.
- Don't turn off your computer or Terastation Pro, your updating the BIOS. It should take about 1-2 minutes.
Congrats! You now have a hacked Terastation Pro.
[Note to self: we might need to add something here for non-windows firmware updating?]
Console/Terminal Access via SSH
From here on you can use any OS. If you are on a PC you will need Putty or another SSH client. OSX and Linux users can use Console/Terminal, type "man ssh" if you need help on your local system. :P
- Sign onto the the Terastation Pro using your SSH client.
- Enter the Host Name or IP of your Terastation Pro
- Enter your username: "admin"
- Enter your password: The default password is "password".
You are now logged into your Terastation Pro from a terminal level. Be careful when tinkering in command line, as you can do a lot of damage. If you get carried away you might break the functionality of the Web GUI, or you might lock yourself out permanently of your Terastation. In terminal access you can easily change your password, tweak some various UNIX stuff, as well as check memory and CPU load statistics.
Getting root access
Note: This is basic stuff to most people familiar with UNIX but I will cover it.
You are currently logged in as "Admin" and unlike the name hints, you don't have total control. You need to use the "root" user account in order to get total control and full access to your Terastation Pro.
- Type "sudo -s" and hit "Enter"
- Enter your "admin" accounts password.
You should see something like the output bellow:
admin@TATANKA:~$ sudo -s Password: root@TATANKA:~#
Note: The name of my Terastation Pro is "Tatanka".
Yours should say "root@[your terastations name]:~#"
Exposing your files
Note: Because using text editors on Linux is a pain I am going to show an alternative way to edit your file which some may frown upoin. What is important is that once you have setup your computer you carefully remove the file we are about to make.
In linux there is a concept called a "link", it very similar to the concept of an "Alias" on a Mac, or a "Shortcut" on Windows. You can just smile an nod if you don't get it but we are going to make a link that points to a configuration file. This link will be in a public area thus we will expose a file that you need to change, which should make your life easier.
- Open your favorite Internet browser, and access your Terastation Web GUI.
- Login to your Terrastation Pro.
- Choose "Shared Folders", use the image bellow to help.
- Make a temporary share called "linux".
- Now go back to your console and type the following line:
ln -s /etc/exports /mnt/array1/linux/exports.txt
We are simply making a link that will show up in your "linux" folder, it points at your "/etc/exports" file. Now we can easily edit this file from the comfort of your favorite OS text editor. Note: we also added a .txt suffix so that your computer knows that you are going to be editing a Text file. You should use Notepad on a Windows, NOT Wordpad. Simple Text or TextEdit should do the trick on a Mac.
- Setup you Terastation Pro to use Samba, if it's not running already. I'm not going to cover that.
- Access the "linux" folder via Samba or FTP to make changes.
- Open the "exports.txt file".
- Change that file to the text bellow:
# sample exports file # the insecure option is the key to making Macs happy # was: /mnt/array1 192.168.1.0/255.255.255.0(rw,async,root_squash) /mnt/array1 192.168.1.0/255.255.255.0(rw,insecure,no_root_squash)
You can do some research on the "/etc/export" file if you want a more complex setup. This should get you pointed in the correct direction.
Once we verify that everything is is running we will delete this LINK, NOT the original file.
Starting NFS sharing
Great, now we are on the home stretch.
- Go to console and type in the following line:
- Hit enter.
- Then entire this line:
- Hit enter.
You should get something like the output bellow.
root@TATANKA:~# /etc/init.d/nfs-user-server stop Stopping NFS servers: mountd nfsd portmap. root@TATANKA:~# /etc/init.d/nfs-user-server start Starting NFS servers: portmap nfsd mountd.
Congrats! NFS is now running! You can now access everything in "Array1".
You may want to skip ahead to the Client section to verify your work, come back to this section once you have verified that everything is running.
- Log onto Terminal/Console
- Get Root Access
- Change Directory to the "linux" directory we created earlier via the GUI
- Delete our "exports.txt" link
- Log onto the Terastation Pro Web GUI.
- Go back to the shares section and delete the "linux" share.
Your Terastation Pro is now all set!
Setting up your OSX Mac
It's a good idea to start with "Terminal" as it might help debug any issues, you can skip it if you feel lucky.
Mounting NFS via Terminal
Macs with OSX are great because they give you Terminal access, but sometime they get upset if you do too much under the hood. So, I undo everything once I verify that our NFS is accessible.
- Make the dirrectory "/cool"
- mount the NFS Share to /cool, make sure your IP address is correct.
mount 192.168.1.205:/mnt/array1 /cool
- LS your /cool file and verify data.
Note: There are files in /cool, so it time for some cleanup.
- unmount the NFS folder.
- delete the /cool folder.
Mounting NFS via OSX Server GUI
This is pretty much the same as the Terminal setup, just notice that you don't include the ":" in the GUI version.
- Open your Workgroup Manager.
- Enter your username and password.
Note: Don't forget to use your Directory Administrator account if you are using Open Directory
Great! It works!
At this point you can lock down the Terastation, to make is as secure as you want. OSX Server will be able to control all the sharing from here on.
Depending on your server setup you might want to look into what kind of sharing you want to do on your OSX Server. I was not able to get ACL (Access Control Lists) running on a NFS disk mounted though the OSX GUI. So, I ended up using the Console method to mount my NFS drive which is explained above. This is only necessary if you are running ACL.
Note: See the FAQ for the reasons why I did this setup and the pros and cons of this setup.
These are all the resources that I have looked though that helped me understand the big picture. Thanks to all those people that took the time to document their work.
- Older MacOSX NFS TS Howto.
- Easy-Peasy Ubuntu Linux NFS File Sharing
- UMBUNTU: HOWTO: NFS Server/Client
- Mac NFS Tuning Tips
- Why NFS?
- Unlike SMB, NFS allows you to mount a file directory from another machine and then share that directory. This is more important for the OSX server part of my little setup.
- Why not use the "admin" capabilities built into the Terastation Pro Web GUI?
- Simplicity. I can set everything up once on my OSX Server. Samba might have been a better option but I wasn't able to get the Active Directory functionality to work. This is a work-around, all traffic goes though the OSX Server, which might become a slight bottle neck, well see.
- Why didn't you just get a XServe and XServe raid?
- Simple, I didn't have the $13,000 (USD) required to purchase this system. My MacMini setup is is for a personal network. The total cost of my system is right around $2,000 (USD).
- Are there any performance issues?
- I am sure that I will have some bottle-neck issues due to the fact that all request are coming though the server. There will be some slight latency as well, but the 1000Base-T switch should be fast enough. In addition, the Terastation Pro really isn't that fast from what I have read.