Part 3 of 3: Mac Mini Storage Server – Hardware and Storage Expansion

Mac Mini server with attached storage devices

Mac Mini server with attached storage devices

INTRODUCTION

Once your NAS storage server is set up and File Sharing is turned on, you can share data from any connected storage device, such as external hard drives or enclosures. This is extremely useful for archives or small production environments with collections that take up a lot of space, such as video or other data with large file sizes. The option to attach drives and devices and share them over a network makes your NAS scalable, allowing your storage to increase without incurring huge costs. 

There are many options for expanding storage, such as simply connecting external hard drives to your NAS, attaching a storage device like a DROBO, mounting hard drives with the help of a “drive dock” or “sled”, or hooking up a hard drive array enclosure that holds a set of internal hard drives. When making your choice, consider the following three factors:

  1. Cables and connectors: What connection interface will you will use to connect your storage to your Mac Mini NAS server?

  2. Storage Media: What type of hard drives will you use to store data?

  3. To RAID or Not to RAID: How will data on your external storage device will be configured?

Also, consider using naming and arrangement standards to organize your data so that it can be easily controlled. You may want to catalog and describe your data, manage it manually or within a Digital Asset Management System, move collections or exchange data with others. Naming and arrangement standards are especially helpful for collections that are still growing and evolving, a topic that will be addressed in a future post. For the time being, just keep in mind that in order to be useful, data must be both discoverable and portable, and that consistent naming and arrangement standards must be implemented to achieve this. 


DATA FLOW: UNDERSTANDING BOTTLENECKS

When setting up a NAS host server, consider the path that data must travel from its storage location on the NAS to your users' client computers. Data originates from storage volumes (external hard drives or hard drives mounted in an array enclosure) that are attached to your NAS host server, then flows to the NAS itself, then passes through a network (via a network switch) to user computers known as "clients". 

I am calling this path the "chain of delivery", and when there are outdated or weak points in that chain (comprised of both hardware and software), your data will encounter a slowdown, or "bottleneck".

NAS Data Storage Server Chain of Delivery

NAS Data Storage Server Chain of Delivery

In an ideal computing environment, data from your NAS server host will be delivered to the client's computer quickly and without any degradation in performance. Users will load and use data as quickly as if they were using the NAS server itself. If your computing environment is non-optimal (and most are), users may experience slowdowns in performance when accessing data on your NAS, such as laggy video playback, skipped frames, or long data transfer times. To avoid these hangups, you'll want to learn as much as possible about your computing and networking environment. You will want to know what hardware or equipment is used at every connection point, such as switches, routers, and cables. 

In general, your performance speeds are only as fast as the slowest equipment in the chain of delivery. The link in the chain that causes a slowdown is known as a "bottleneck". To learn more about performance, start by monitoring data transfer speeds on your NAS server and testing video playback. To monitor data speeds, check out the article on data speeds here: ARTICLE

Before monitoring speeds, however, you'll want to know a little more about the storage media used in your NAS, and how different hardware configurations can help efficiently deliver data to your users over a network.


STORAGE MEDIA: TYPES OF HARD DRIVES
Spinning disk vs. SSD

In the history of computing, from punch cards to magnetic tape to hard drives, many different types of media have been used to store data. Currently, the most popular data storage media are spinning disk drives, and various offshoots of flash memory, or Solid State Drives (SSD), including SD cards, flash drives, eMMC flash storage, and other solid state media formats. Whichever disks you choose will be contained in an external hard drive or array enclosure device like a JBOD chassis or DROBO device.

For more information about data storage media, especially as it relates to digital preservation, check out Storage Media: Spinning Disk, Solid State Drives and LTO Tape.

When purchasing storage media for your NAS, you will make three big choices:

  1. What type of storage media will you use in the NAS server itself (to run the operating system)? This is the interal drive that powers your NAS.

  2. What type of storage will you use to store the data your NAS is hosting for clients? This is the interal or (more likely) external media that will contain terabytes and terabytes of data that users want to access.

  3. What type of backups will you use for your hosted data? To ensure data longevity and accessibility, cosnider options for making redundant backups for you data

 
Solid State Drive (SSD)

Solid State Drive (SSD)

Spinning Disk Hard Drive

Spinning Disk Hard Drive

1. Storage Media for the NAS
When you set up your NAS, the host server itself, ideally, will use an internal SSD drive. SSD drives are much faster than traditional, mechanical spinning disk hard drives. As of this writing, SSD media is recommended for use over traditional spinning disk drives. Read/write speeds of spinning disk hard drives are somehwere in the neighborhood of 90 - 100MB/s, whereas solid state drives (SSDs) transfer data at anywhere from 90 - 500MB/s.

Your NAS server not only runs the macOS operating system, it also negotiates all traffic and data requests from users. All hosted data must pass through this NAS before it can be sent over the network to clients, so it is very important that your server has the best hardware you can afford, including an SSD hard drive. If you are workign on a budget, you may need to make difficult choices about which hardware components to upgrade. Rest assured; if there is one upgrade that will make an immediately noticeable impact data delivery speeds and NAS performance, it is an upgrade to an internal SSD drive in your NAS. Your users will thank you.

Not all SSD drives are created equal, so if your NAS didn't come with an SSD drive installed, shop around and read reviews to decide which drive is best for you.

2. Storage Media for Hosted Data
The storage media you choose for your hosted data depends on your budget, the type of data you will be hosting and how many users need to access it simultaneously. Costs are high and can spiral out of control quickly. Average quality internal SSD drives cost about $0.XX per gigabyte, whereas interal spinning disk drives cost around $0.XX per gigbyte for 2TB disks. Additionally, depending on your storage plan, you may need to purchase duplicate sets of all of your storage media so that you can create backups for data redundancy. 

If you are hosting video or some form of complex media that requires speedy performance in an environment with multiple simultaneous users, you may consider investing in SSD drives to host your data. If not, traditional solid state drives will do the trick. Most users can get away with less expensive 5400rpm drives, but if you have any concerns, the price jump to 7200rpm drives is small, and performance is better. I've set up and worked with NAS servers in several video production environments (100mbps bitrate video) with up to three or four simultaneous users and have never needed to use SSD media.

3. Storage Media for Data Backups and Redundancy
If your users need constant access to files on your NAS, you will need to invest in a "secondary" hard drive enclosure or device to attach your data to the NAS, as well as a second set of hard drives to store the data. This way, if your primary enclosure or the disks it contains go out of commission, you have a backup enclosure with a duplicate set of drives to keep the NAS up and running smoothly. To save money, this secondary device and its drives may be inferior to your primary device.

Data backup software, such as rsync or Apple's Time Machine may be used to back up primary data nightly, or once a week. Performing consistent, reliable data backups is an art in itself and may warrant a future post.

Question: What about cloud storage or LTO tapes for data backup?
If your users can live without the  NAS server for several hours or days, you may consider using cloud storage such as Google Coldline Storage or Amazon Glacier, or LTO data tape to back up your data. Pricing for these options varies depending on the frequency of your backups, staff expertise, and volume of data. In general, cloud storage is quite expensive relative to SSD or spinning disk hard drives, and LTO tape is relatively inexpensive at volume (over about 50TB as of this writing).

One Last Question: What about Geographical Separation?
Data stored on LTO tape and/or sets of hard drives can be sent offsite to geographically separate data, an important practice for digital preservation. Geographical separation ensures that copies of your data exist in different locations, ensuring data longevity in case of physical threats, such as natural disasters, security issues, or other mayhem. Cloud storage is also a viable option, as it geographically separates data inherently, and users can choose server locations when configuring cloud services.


INTERFACES: CABLES AND CONNECTORS

Once you have decided on a storage media for your NAS, you'll want to decide how to connect it to your server. The connection you use to attach an storage device to your NAS server impacts the performance, stability, and overall cost of your NAS. As of this writing, there are two options for connecting directly to the current version of the Mac Mini: Thunderbolt 2 and USB 3.0. Older, outdated or “legacy” Mac Mini connectors include Thunderbolt 1, USB 2.0, and Firewire 400 and Firewire 800. 

Thunderbolt 2
The fastest, most reliable connection is currently Thunderbolt 2. Because you can connect Thunderbolt-compatible devices directly to your Mac Mini, this is a reliable, stable connection. Data transfer speeds are extremely fast by today’s standards, running up to 20 Gbps. Additionally, you may “daisy chain” or connect up to six Thunderbolt devices to each other, or twelve devices total since the Mini has two Thunderbolt ports. In testing, performance speeds of multiple daisy-chained devices are not seriously compromised, as the available 20 Gbps bandwidth are enough to handle the load demanded by each storage device, assuming each device has read/write speeds of 100 – 500 MBps.

Soon all Apple computers will use Thunderbolt 3, which uses a USB Type-C connector and speeds up to 40 Gbps.

USB 3.0
The Mac Mini comes with four USB 3.0 ports, which transfer data at speeds up to 5 Gbps. Like Thunderbolt, this connection is reliable because it is direct and requires no adapters or other equipment. USB 3.0 does support daisy-chaining and use of USB hubs, but attached devices share the entire 5 Gbps bandwidth, so performance is an issue when attaching multiple USB devices (with read/write speeds of 100 - 500MBps) to the same Mac Mini USB port.


ATTACHING DATA TO YOUR NAS: EXTERNAL DRIVES, HARD DRIVE DOCKS AND ARRAY ENCLOSURES

External Hard Drives
External drives made by manufacturers such as Lacie, Toshiba, and Western digital present simple, contained solution with lots of storage. These devices are familiar and easy to use, and can store up to 8TB at only 2¢ per gigabyte. Using an 8TB hard dive with the four available USB ports on the Mac Mini, you can host about 16 – 20 TB of primary storage, and the same amount for secondary backup storage. If you use Thunderbolt and connect up to six 8TB hard drives using daisy chaining, you can store at least 48TB of primary data and an equal amount of secondary backup data. Maybe you'd like to get creative and connect up to 96TB via Thunderbolt and use USB for your secondary storage... there are so many fun options.

Hard Drive Docks
Hard drive docks are simple interfaces that you can use to "plug" an internal hard drive into a computer quickly and eject it quickly. Like external hard drives, docks provide a simple interface to mount storage drives to computers,  but using a dock, internal drives can be attached and removed without the impediment of an external enclosure. They are extremely handy to have around in digital preservation environments, where preservationists are often troubleshooting failing or legacy storage devices, transferring data, cloning drives, and performing data forensics work.

Drive docks usually have space for up to three drives and be used, for example, for a NAS in which data is made available for a temporary period of time upon request.

Array Enclosures
If you need to attach lots of storage to you NAS, check out array enclosures. They can accommodate internal SSD or spinning disk drives, connect to storage with a variety of interfaces (Thunderbolt, USB 3.0, eSATA, etc.), and house anywhere from two drives to dozens of drives, usually in sets of 4, 8, 16, 32, or 48.

The advantage of using array enclosures over external hard drives is that arrays can host more data and present options for RAID configurations that consolidate data and increase performance. Array enclosures made by proprietary vendors such as Drobo may offer technical support and great warranties, but may also use proprietary RAID hardware and software that forces a degree of customer dependency that can be limiting. 


DATA CONFIGURATION - TO RAID OR TO RAID, THAT IS THE QUESTION:

With a little software implementation, a set of hard drives in an array enclosure can be transformed from a JBOD array (Just a Bunch of Disks) to a RAID (Redundant Array of Independent Disks) array. By configuring a set of disks to work together, RAID can increase data redundancy, performance, or both. The degree of redundancy and increase in performance all depends on which RAID configuration you choose: RAID0, RAID1, RAID5, and RAID6 are popular configs. Alternatively, you may decide that a RAID setup complicates your storage architecture unnecessarily, or requires too much technical support, in which case simply mounting sets of independent disks in an array enclosure JBOD-style is totally acceptable. 

For more detailed information about different RAID configurations and their benefits (and some sweet diagrams), take a look at Prepressure's post here, or a PDF of the post.

 

Part 2 of 3: Mac Mini Storage Server – Sharing

INTRODUCTION
The easiest way to turn your Mac computer into a file sharing server is to use the file sharing tools that come with MacOS and Mac OSX operating systems. Once your computer is set up for sharing, it is called a "host" that makes resources accessible to other computers or "clients" on your network.

To familiarize yourself with the your computer's sharing options, check out Sharing preferences in System Preferences by going to:
 > System Preferences > Sharing

From the Sharing window, your Mac can make a variety of shared resources available to client computers on your network using different computing protocols created for specific purposes. These protocols help computers exchange data and information, giving users the power to connect and control their computing environments and the files hosted on those computers. Here are a few examples of what you can share in the Sharing settings:
 

  1. Screen sharing – Allows users to see your computer screen and control your desktop using the Virtual Network Computing (VNC) protocol.

  2. File sharing –Provide access to files you choose to share with other users using the Apple Filing Protocol (AFP) or Server Message Block (SMB, SAMBA or CIFS) file sharing protocols.

  3. Remote login – Allow clients to control your computer remotely using the command line via the Secure Shell (SSH) protocol.

  4. Remote management – Share your computer screen and control of your desktop using the Remote Desktop (RDP) protocol (similar to VNC).

You can also share your internet service, your DVD/CD optical disc drive, any connected printers, or send and receive data via bluetooth in the Sharing settings. For now, we will start by setting up File Sharing.


FILE SHARING INSTRUCTIONS
Once Mac File Sharing is up and running, you will be able to share specific files, folders, and internal or external hard drives, with clients and impose limitations on permissions and access. You can open up your host computer to anyone on your network, or "Guest" users, or you can restrict access by making users log in with a user name and password. To set up File Sharing, follow the steps below:

1. Turn on File Sharing Services:  Open  > System Preferences > Sharing and click the "File Sharing" checkbox to turn File Sharing on.

By default, your computer shares its "Public" folder using both the AFP and SMB file sharing protocols. This will make your data accessible to most Mac and Windows clients on your network. Your host Computer Name will have the same name as your current user by default, but feel free to change it to whatever you want. This is how your host will be identified to clients. The Computer Name pictured in this example is "beta".

 

2. Select Files/Folders: Now that File Sharing is turned on, decide which files, folders, or drives you would like to share and drag and drop those files into the "Shared Folders:" window. In the example pictured on the right, an external drive called "Share-Me" is selected for sharing. 

3. Set Permissions: If you would like to restrict permissions and only allow certain users to read (view) or write (add or change) data on your host server, change the drop-down "Read & Write" settings in the right-hand "Users:" column. 

Now that File sharing is turned on, let's see what it looks like to users who are attempting to connect to your host.

03_Screen Shot 2017-04-17 at 3.58.12 PM.png

4. Connect to your host server from a client: Using a client computer that is connected to your network, open the Finder application and choose Go > Connect to Server... (or just use the keyboard shortcut "⌘K". This will bring up the "Connect to Server window", where you can type in your server's file sharing address.

 

 
 

6. Specify your host server using Finder:

Alternatively, you can connect to a host server by choosing it directly in left-hand column of the Finder "Shared" menu . This method is really quick and easy, especially if you don't know the name of the host you are connecting to.

Go to: Finder > Shared > All... 
Select your server in the middle column as pictured in the image to the right.
Choose "Connect As..." to access File Sharing

Again, if your host requires clients to log in with their user name and password, a menu prompt will pop up and ask for those credentials. If you've set up Guest Sharing, your user can instead log in as a Guest. →

5. Specify the host server using a Server Address:

In the "Connect to Server" window, type in the Server Address. Start with the three-letter abbreviation for the File Sharing protocol you will be using (we will use Apple File Sharing protocol or "AFP") and the computer's name, followed by ".local". In our example, we will use:

afp://betal.local

If your host requires clients to log in with their user name and password, a menu prompt will pop up and ask for those credentials. If you've set up Guest Sharing, your user can instead log in as a Guest. ↓

 

7. Turn on Guest Sharing:

Lastly, if you are sure your network is secure and you trust connected clients, consider enabling Guest Sharing, which allows users to connect to your host server without a user name and password. To turn on Guest Sharing on your host computer ...

  • Go to  > System Preferences > Users & Groups

  • Click the lock icon at the lower left-hand corner of the Users & Groups preferences pane and type in your admin credentials

  • Select "Guest User" in the left-hand column under "Other Users"

  • Click the "Allow guests to connect to shared folders" checkbox to enable Guest Sharing

  • Reboot your host computer to make sure this change takes effect.

RAD!

If data you would like to host and share from your NAS fits on the Mac Mini's hard drive or a couple of external hard drives for just a couple of users, you are all set! If you'd like to share lots and lots of data (over about 10 or 20TB) to multiple simultaneous users, check out Part 3 of this guide, which explores options for hosting high volume data using array enclosures and discusses performance optimization.

Part 1 of 3: Mac Mini Storage Server – Introduction, Setup & Configuration


INTRODUCTION
Media archivists working with digital files are often responsible for preserving large quantities of data, and making that data accessible to others. If you work in an environment where several Mac computers connect to the same network (using either a wired or wireless connection), setting up a Network Attached Storage server or "NAS" is an easy way for users to access collections. This guide, written for media archivists, describes the process of configuring computers using the Mac OSX or MacOS operating system for use as a data storage server.

FUNDAMENTALS
Your server will host data for other users, known as clients, using the file sharing tools that come with every Macintosh operating system. You don't need to buy any special software to turn your computer into a NAS or host server, and you can use any available network, including a WiFi network or a wired ethernet office LAN.

In Part One of this guide, which you are currently reading :), you will learn how to configure your Mac (or "server") so that it is accessible to clients at all times. It will also be accessible to you, the server administrator, using Screen Sharing or remote login via the command line (for advanced users).

In Part Two of this guide, you will learn how to use File Sharing to make collections of data accessible to users.

In Part Three of this guide, you will learn how to attach additional hardware to your NAS to expand its storage capacity.

In Part Four of this guide, you will learn how to access your NAS remotely using Screen Sharing via the VNC protocol.

CHOOSING COMPUTER HARDWARE & OPTIMIZING SPEEDS
If you work with video or complex media, your NAS will need adequate hardware and a speedy network connection so that users can view files without laggy playback. It is also important to understand how your NAS handles requests for incoming and outgoing data, which will including both writing (incoming) and reading (outgoing).

1. HARDWARE (SSD, RAM, CPU, GIGABIT ETHERNET)
Ideally, your NAS will have at least a dual 2.0GHz CPU, a solid state (or SSD) hard drive, and at least 8GB of RAM. If you are repurposing a used Mac Mini, RAM and SSD drive upgrades are relatively inexpensive, and installation is usually not too difficult. To learn how to take your computer apart to upgrade hardware, search YouTube for RAM and hard drive installation instructions for your machine's make and model.

 2. FAST INTERNAL NETWORK SPEEDS
To play standard size video files (720p or 1080p), you will need network speeds that will allow you to read and write data over 20 MB/s. There are many ways to test your read and write speeds. One simple way is to use AJA's System Test software, which allows users to test data transfer speeds of any drive, including networked drives:
https://www.aja.com/products/aja-system-test

3. READING vs. WRITING DATA
Most of the time, users will be reading data from your NAS server. Examples of "read" operations include navigating the file system, opening files, editing files, and playing video or audio. Handling these requests doesn't put a heavy load on your server, and it can handle up to several "read" requests simultaneously with no interruption. If there are too many read requests for the server to handle, you will see laggy performance, such as motion graphics hanging during playback, or an inability to play video in fast motion.

Sometimes, your users will have to save files to your NAS, or write data to the server. These write operations put a heavy load on your NAS server's hard drive and CPU, and it will be more difficult for the server to fulfill all requests, including read requests. If your NAS has an SSD drive, lots of CPU and RAM, it will be able to handle this load more easily. Typically, a single Mac Mini with upgraded hardware (quad-core CPU with SSD drive and 32GB of RAM) can handle up to three or four simultaneous read requests for 1080p video and one write job, such as a large file transfer or occasional edits. 

Lastly, if possible, use this computer as a "dedicated" NAS server, which will be used only for file sharing and no other purpose.


CONFIGURING NAS SERVER FOR AVAILABILITY
Your server must be configured so that it is available to users at all times. Using the default configuration settings in Mac's "System Preferences", your computer is set to preserve energy by sleeping when it is not in use. To configure your server for availability at all times, go to   > System Preferences > Energy Saver:

  1. In "System Preferences" choose "Energy Saver"
  2. Under "Computer Sleep", toggle the slider to "Never"
  3. Under "Display Sleep", toggle the slider to "Never"
  4. Uncheck "Put hard disks to sleep when possible"
  5. Check "Wake for network access"
  6. Check "Start up automatically after power failure". This is an extremely useful setting that will       ensure that your computer is always on when power is available.
  7. Uncheck "Enble power nap"


CONFIGURING AUTOMATIC LOGIN

Lastly, make sure your computer is set to "automatic login" so that it is not stuck at the login time in case it reboots after a power failure. If your computer powers off for any reason, it will automatically start itself up (see set 6 above), and then log in whichever user you choose.

To set your computer to automatic login, go to  > System Preferences > Users & Groups:

  1. Click on"Login Options" 
  2. Under "Automatic login", choose your admin user.
  3. If you are concerned security, consider creating a user without administrative privileges and logging in automatically as that user instead.

auto-login.png

Now that your computer is available to users at all times, you can begin sharing. For instructions to turn on and configure file sharing, check out Part 2 of this guide.