Documentation for network-attached storage on Gryphon network (from Mike Herman)

Table of Contents

Introduction

This document describes the setup of a Synology network-attached storage (NAS) device on the Gryphon network. We currently have one such device, called emu. This NAS is Synology model DS1515+; the MAC addresses and serial number are printed on the back of the unit. Synology provides some documentation at their website and there is an active web forum.

Installation

2.1 Make an IP address on the Gryphon network

Ask Dave to do this. He'll tell you what IP address to assign to the NAS and ask you for a device name. The existing NAS is called emu because it is a very large-capacity storage device. The IP address will be of the form: 192.168.100.x, where x is unique to the NAS Proceed when this task is done.

2.2 Install hard drives into the Synology drive bay

Follow instructions that come with unit for this.

2.3 Plug drive into a Gryphon network switch

There are switches connecting Gryphon computers in the cluster lab, WKMN 325, and in WKMN 358. All of these switches are inside the firewall and are suitable for connecting to Synology drives.

2.4 Locate the NAS on the network

2.4.1 Cross-your-fingers approach

Login and open a web browser on Gryphon. Type:
http://find.synology.com
in the address bar. If the browser returns the message No DiskStation Found within LAN, try:
http://diskstation:5000
If the same message, or Server not found appears, then the setup utility (see section 2.4.2) is required. If either method locates the NAS, you will arrive at a webpage that serves as an administration utility for the NAS. You will be directed to do various things like install the latest version of the operating system and to create an administrator password. To add users and make the drive accessible to them, see section 2.5.
A post at an online forum for these devices revealed that sometimes the NAS won't be recognized if the hard drives are installed. You might be able to circumvent the following approach by removing the drives and again trying to locate the NAS using the browser. You can then install the hard drives when the NAS has been located.

2.4.2 The Synology Assistant approach

Synology makes a setup utility called Synology Assistant that is designed to locate the drive on the network and install the operating system (OS). However, Synology doesn't (easily) distribute the source code and only makes executable versions for Windows, Mac, Fedora, and Ubuntu. However, with a laptop containing one of these OSs, we can proceed.
Locate a Windows, Mac, Fedora, or Ubuntu laptop
Any one will do.
Download the DSM and Synology Assistant
You can find these at:
https://www.synology.com/en-us/support/download/DS1515+.
If you have purchased a different model, first navigate to the download page specific to that model. Download the NAS operating system, called DSM, and the setup utility, called Synology Assistant. You will need to match the Synology Assistant to the operating system of the laptop.
Connect the laptop and the NAS to a temporary, unused network switch
You can find old and/or unused network switches in the cluster lab. There are lots of short network cables there, too. Disconnect the NAS from the Gryphon switch and connect it and the laptop to the temporary switch to form an isolated network. Power on all three devices.
Configure the laptop's ethernet connection
In Linux, you can use the Network Manager or some other means if you know how. Using the Network Manager, right click on the network icon in the task bar of the laptop and disable Wireless and Networking. Then, right-click on the icon again and click edit connections. Choose ethernet connection and click edit. You might want to create a new connection so you don't disrupt the existing ethernet settings. This probably involves making a new ethernet connection with a unique name, and then editing that. Click the IPv4 Settings tab and change the addresses as follows:
To find the value of y in the above expression, use the following formula, where x is the last number in the IP address found in section 2.1: y=x-1 . Save these settings.
Now, right-click on the network icon and enable Networking. Left-click on the network icon and select the Ethernet connection to connect to the temporary switch.
Install Synology Assistant on the laptop and get it running
Linux
In Linux, this is done using dpkg. Change to the directory where the download utility put the software (probably ~/Downloads) and type:
$ sudo dpkg -i SynologyAssistant....deb
Note that an ellipsis has been used to represent part of the filename. To find where dpkg put the executable, type the following command:
$ sudo dpkg-deb -c SynologyAssistant....deb | less
A long list of files with their absolute paths will appear. Locate the path to: SynologyAssistant. When I did this on my laptop, it had the following path: /opt/Synology/SynologyAssistant/SynologyAssistant
To start the utility, type its complete path, e. g.:
$ /opt/Synology/SynologyAssistant/SynologyAssistant
Other operating systems
Much or all of this is likely to be automated. Probably, you need to click on a few icons and use your intuition. When you have found it, start the Synology Assistant. Good luck!
Locate the NAS
Click Locate Drive in the upper-left corner of the Synology Assistant window. A listing for the NAS should appear with lots of information in the columns to the right, including the NAS's heretofore unknown IP address.
Install the operating system
Right-click on the NAS listed in the window and select Install DSM. Use defaults when you are unsure, and create an administrator password you won't forget. The default administrator username is: admin
Remember this! Use the following values for the network settings. Recall that x is found in section 2.1:
If the installation procedure is successful, power down the NAS and unplug it and the laptop from the temporary switch. Plug the NAS into the Gryphon network switch, put the laptop network settings as they were before you began, and put the switch away.
Locate the NAS with a web browser
Open a web browser on Gryphon and type the following into the address bar:
http://192.168.100.x:5000
Again, x is the value chosen in section 2.1. The 5000 represents the port over which you access the administration utility. You should now see a website that prompts you for a username and password. These are for the administrator and will be the ones you chose above. The default username is: admin

2.5 Configure the NAS

2.5.1 Tell the NAS what its name is

Click on the Control Panel icon and click on the Network icon. Give the NAS the name you chose in section 2.1.

2.5.2 Enable NFS

This allows the NAS to be connected to Gryphon machines as a network file sytem, which makes it appear as just another hard drive on each computer. Click on the Control Panel icon and click on the File Services icon. Click the Win/Mac/NFS tab. Collapse the Windows and Mac sections for convenience. Scroll down to the NFS section and click Enable NFS.

2.5.3 Create users home directory

This automates the process of setting up home directories for each user in the NAS system and allows them to access it via NFS. Click on the Control Panel icon and click on the User icon. Click the Advanced tab. Scroll down to User Home and select Enable user home service.
Then, click on the File Station icon and select the homes folder. Click the Settings button and the Mount Connections tab. Under Remote Folder, select All Users. Click Ok.

2.5.4 Create a new user

Click on the Control Panel icon and click on the User icon. Click the User tab and click Create. For an existing Gryphon network user, put their Gryphon username into the Name field (case sensitive). Make a password for them and use defaults for other settings except:
These and other attributes can be changed later on using the Edit tab.
Then, on a Gryphon machine, type:
$ id username
Here, username is that of the existing Gryphon user. Note the uid of the user.
Now, type:
$ ssh root@drivename
Here drivename is the chosen name of the NAS. The root password is the same as admin's.
Then, type:
$ chown -R uid /volume1/homes/username
Here, uid is that found using the id command, above; and username is that of the user you are creating. This is needed, since the uid's of the NAS and Gryphon don't match. To get the proper permissions, we force the NAS to assign the uid's of users in the Gryphon network.

2.5.5 Add the drive to the user's computer

In the administrator web utility, click the Control Panel icon and click on the Shared Folder icon. Select homes and click Edit. Click the Permissions tab and make sure all users have Read/Write access. Then, click the NFS Permissions tab and click Create. Enter the user's Gryphon computer IP address (e. g., for peregrine: 192.168.100.226) into the Hostname or IP box.
As root, add the following line to /etc/fstab on the user's computer (drivename is the chosen name of the NAS):
drivename:/volume1/homes /drivename nfs rw
As root, make a directory for the NAS on the user's computer and set permissions:
$ mkdir /drivename
$ chmod 755 /drivename
Here, drivename is the name chosen in section 2.1. When this is done, reboot the machine and when it comes back up, type:
$ df -h
You should see the drive appear in the list of network-mounted drives. You should be able to list its contents and you should see a separate folder for each user.

Using the NAS

3.1 Examining the drive contents

If you have a user directory on the NAS, you can list the directory contents on the emu NAS for user mherman like this:
$ ls /emu/mherman

3.2 Copying data to/from the NAS

If the user directory exists on the NAS, the user mherman can copy a file called filename to the emu NAS like this:
$ cp filename /emu/mherman
You can copy it back the usual way.

3.3 Copying data to/from using rsync

The user mherman can copy a directory called mydir to the emu NAS using rsync like this:
$ rsync -avz ./mydir /emu/mherman
This makes a new directory in mherman's emu folder called mydir, and inserts the contents of that directory within. The rsync options are archive (a), verbose (v), and compression (z).