Creating an Affordable and Efficient Network Attached Storage (NAS) System in Kenya

Published on
11 mins read
––– views
thumbnail-image

Problem

As a solution-oriented individual, it is crucial to identify the problem we aim to solve before delving into suitable solutions. In this case, we will explore the need for a self-hosted network-attached storage (NAS) system. Before we proceed, let's provide a comprehensive description of the NAS system, as it will be the primary focus of this article.

NAS, or Network Attached Storage, is a type of storage device that provides centralized file storage and sharing capabilities to multiple users and devices within a network. It is designed to facilitate data storage, retrieval, and management for individuals, small businesses, and even larger organizations.

The problem I aimed to address was the need for a secure and reliable storage solution capable of handling large amounts of data. This storage unit should be immune to data corruption, easy to set up, and facilitate sharing among numerous devices or users. For example, when I wanted to share files between my laptop and desktop, I had to resort to various methods such as sending files over the network or using physical devices like flash disks. While these methods were relatively easy to execute, they lacked a crucial feature: keeping the shared files synchronized with the latest changes made on the desktop. This limitation becomes apparent when I want to add new items to the file on my desktop while ensuring that the file sent to the other computer remains up to date.

This problem extends beyond file synchronization and becomes even more significant in scenarios where multiple individuals need to access and modify different parts of a shared file. Such situations commonly arise in media, design, and production companies where collaborative access to various elements of a file is necessary.

Another significant problem that arises is historical file storage. There are instances where I may need to access a file that I haven't used in over a year, or perhaps even longer. In such situations, I am left relying on the chance that I haven't deleted the file from the device on which it was originally created. What happens if I created the file on my phone and ended up losing the phone? This makes retrieving the file a challenging task. However, with a centralized storage system, I no longer need to worry about the file's original location. Instead, I can easily search for the desired file within my central storage unit, regardless of where it was initially created.

The use cases for such a system are virtually limitless. As we explore the features of the centralized storage system, numerous benefits will become apparent. One of the primary advantages is the ability to have a comprehensive and organized repository of all files, including historical ones. This eliminates the need to rely on individual devices and minimizes the risk of data loss or file inaccessibility due to device malfunction, loss, or deletion.

Benefits of a Network Attached Storage (NAS)

Here are some of the key benefits of a NAS:

  • Centralized Storage: NAS provides a centralized storage location for all your files, eliminating the need to maintain separate storage on individual devices. This ensures easy accessibility and efficient organization of files across multiple devices and users.

  • Data Sharing and Collaboration: NAS enables seamless file sharing and collaboration among multiple users and devices. It simplifies the process of granting access permissions, allowing authorized individuals to access, modify, and share files within the network.

  • Data Security and Redundancy: NAS systems often include features like data encryption, user access controls, and RAID configurations, providing enhanced data security and protection against data loss. Redundancy mechanisms ensure that data is replicated across multiple drives, minimizing the risk of data loss due to hardware failure.

  • Remote Access: Many NAS systems offer remote access capabilities, allowing users to access their files from anywhere with an internet connection. This feature proves particularly useful for remote workers, travelers, or individuals who need to access their files while away from the office or home.

  • Backup and Disaster Recovery: NAS often includes built-in backup functionality, enabling automated backups of important files. This helps protect against accidental file deletion, data corruption, or system failures. In the event of a data loss or disaster, NAS systems facilitate easy restoration of backed-up data, minimizing downtime and data loss.

  • Scalability: NAS systems offer scalability options, allowing users to easily expand storage capacity as their needs grow. Additional drives can be added to the NAS device or expansion units, providing flexibility and accommodating future storage requirements.

  • Energy Efficiency: NAS devices are designed with energy efficiency in mind, consuming less power compared to traditional file servers or individual computers used for storage. This helps reduce energy costs and supports environmentally friendly practices.

  • Media Streaming and Entertainment: NAS systems often include media server capabilities, allowing users to stream multimedia content, such as movies, music, and photos, to various devices within the network. This turns the NAS into a convenient media hub for entertainment purposes.

Key Considerations When Looking for Suitable NAS in Kenya

The Kenyan IT industry is experiencing significant growth, with many companies gradually embracing technology for their day-to-day operations. However, the storage solutions offered by major cloud providers like Google Drive and Microsoft OneDrive can be expensive for businesses operating at our economic level, not to mention the potential security concerns associated with storing sensitive data on third-party servers. Therefore, implementing a self-hosted storage system emerges as a viable option due to its affordability and lower operational costs.

Before selecting a storage system, it is crucial to consider our specific needs. Some key factors to evaluate include:

  • Security: Ensuring the security of our data is paramount. A self-hosted system allows us to maintain control over data security measures, implementing encryption, access controls, and other safeguards according to our specific requirements.

  • Convenience: The chosen storage system should be convenient to use and integrate seamlessly into our existing workflows. User-friendly interfaces, easy file access, and robust search capabilities contribute to a convenient user experience.

  • Cost: Affordability plays a crucial role, especially for businesses operating with limited resources. Self-hosted systems often have lower operational costs compared to subscription-based cloud storage services, making them a cost-effective choice for businesses in Kenya.

  • Technical Knowledge: Assessing our technical expertise is essential. The storage system should align with our technical capabilities, ensuring we can effectively manage and maintain the system without significant challenges. It is important to consider factors such as setup complexity, software requirements, and ongoing maintenance.

By carefully considering our needs in terms of security, convenience, cost, and technical knowledge, we can make an informed decision when selecting a self-hosted storage system. This approach allows us to optimize our resources while ensuring data security and meeting the unique requirements of our Kenyan business environment.

Hardware and Software Requirements

If we have to build a reliable NAS, we have to get a few hardware and software bundled up achieve the optimum reliability and scallability.

  1. Processing: Desktop (or Server) with atleast 2.5 GHz speed, i5, 8 GB Ram. Cost: ~KES 15,000
  2. Storage: Two 3TB Hard drives (HDD) and 128 Solid state drive (SSD) Cost: ~KES 12,000
  3. Network (Most people already have this): Router with atleast 300 MBs transfer speed. Cost: Free
  4. Software: These are my personal choice; TrueNAS for storage and NextCloud for synching. Cost: Free
  5. 8GB Flask Disk: This is for one time use. Cost: ~ KES 800

[OPTIONALS]

  1. UPS- Mantain power supply: Cost: ~KES 15,000
  2. Additional software is Jellyfine for streaming Cost: Free

System Intergration

Once you have acquired the desktop and hard disk, the shop attendant should be able to expertly assemble the components into a cohesive unit. As such, I will refrain from providing detailed instructions on the physical assembly process of the desktop and storage units. Instead, let's focus on the subsequent steps to establish and optimize the centralized storage system for your specific needs

Step 1: Software Installation

At this stage, we should have a flash disk ready. The first step is to go to TrueNas website and download the operating system iso image. With the image downloaded, we can create a bootable media using a suitable software such as Rufus. After creating the bootable media from the flash disk. You can boot our new PC from the flash drive to install the TrueNas operating system. This process depend on the brand of desktop but as long as you can get to the bios setting, you can change the boot process to first boot from the flash drive. The installation process should be similar to any other operating system installation process. After the installation we can remove the flash drive and restart, it should start the TrueNAS os, which will give an IP address.

Remember to install the operating system on the SSD for optimum performance.

Software setup

After obtaining the IP address during the installation process, retrieve another device such as a phone, laptop, or desktop that is connected to the same router as the NAS. Open a web browser on the device and enter the IP address into the search bar. TrueNAS will prompt you to set up an administrative password. It is crucial to select a strong and secure password as it will grant access to all storage resources.

Creating a Storage Pool in TrueNAS

To create a storage pool in TrueNAS, follow these steps:

  • Access the TrueNAS web interface by entering the IP address of your NAS into the web browser on your connected device.

  • Login using the administrative credentials you set up during the initial setup.

  • Once logged in, navigate to the "Storage" section in the TrueNAS interface.

  • Click on "Pools" to access the pool management page.

  • On the pool management page, click the "Add" button to create a new storage pool.

  • Choose the desired disks or devices that you want to include in the pool. You can select multiple disks or devices based on your storage requirements.

To ensure data redundancy and protection, it is essential to select disks in pairs when building a NAS system. This allows for a backup mechanism where files are stored on at least two disks simultaneously. By implementing this approach, the system can withstand the failure of one disk without compromising or losing any data. Depending on the sensitivity of the stored data, you can consider additional disk configurations to further enhance data security.

Furthermore, TrueNAS employs disk mirroring to provide redundancy. Disk mirroring, also known as RAID 1, is a method where data is simultaneously written to two or more disks in real-time. This redundancy allows for seamless data retrieval and protection against disk failures. In the event of a disk malfunction, the mirrored disk automatically takes over, ensuring continuous access to the data without any interruption. TrueNAS utilizes this technology to maintain data integrity and enhance the reliability of your centralized storage system.

  • Specify the pool name, RAID level, and any additional configuration options according to your needs. TrueNAS provides various RAID options for data redundancy and performance optimization.

Ensure the pool name does not contain spaces. This is not restricted but a good idea. I found out this the hard way.

  • Review the settings and click "Create" to initiate the creation of the storage pool.

  • TrueNAS will now create the storage pool based on the specified configuration. This process may take some time, depending on the size and number of disks or devices in the pool.

  • Once the storage pool is created, you can start utilizing it for file storage, sharing, or other data management tasks within your TrueNAS environment.

Installing NextCloud

The NextCloud plugin can be installed by following the steps listed in TrueNAS Website.

After the installtion process is complete, login to next cloud and configure the storage and account information.

Conclusion

This type of system is designed to cater to small companies with fewer than 10 employees and moderate data synchronization requirements. However, to enhance access speed and ensure reliable performance, it is advisable to couple the system with high-quality switches and routers capable of handling at least 1 Gbps (Gigabits per second) of data transfer.

By upgrading the networking infrastructure to support faster data transmission, you can significantly improve the system's overall efficiency and responsiveness. This ensures that file access and sharing operations are smooth and seamless, enabling employees to work more productively and efficiently.