Network Attached Storage Using Raspberry Pi: A Report On Major Project
Network Attached Storage Using Raspberry Pi: A Report On Major Project
Network Attached Storage Using Raspberry Pi: A Report On Major Project
BACHELOR OF TECHNOLOGY
IN
COMPUTER ENGINEERING
OF
VISHWAKARMA INSTITUTE OF TECHNOLOGY
Savitribai Phule Pune University
BY
Prof. A S. Shingare
CERTIFICATE
This is to certify that the Major Project titled Network Attached Storage using
Raspberry Pi submitted by Juilee Katpatal (GR-161777), Monica Kawade
(GR-161779) and Chinmay Kulkarni (GR-161278) is in partial fulfillment for
the award of Degree of Bachelor of Technology in Computer Engineering of
Vishwakarma Institute of Technology, Savitribai Phule Pune University. This
project report is a record of bonafide work carried out by him under my guidance
during the academic year 2019-20.
PROJECT SYNOPSIS
Group No : C1 - 13
Group Members:
Sponsor Company :-
Company Address :-
ACKNOWLEDGEMENT
Chinmay Kulkarni
Juilee Katapatal
Monica Kawade
5
INDEX
7 Conclusion 27
8 References 28
3 Github Repositories 22
Documentation Leader
7
1. CONTEXT
The 21st century saw the advent of cloud computing which completely transformed the way
software was developed earlier. This mainly includes providing software, storage and
computation as a service to people. We all use this powerful service almost every day in our life.
But often cloud storage services provided by all the cloud computing companies come with a
limited free quota after which the user has to pay in order to continue the service.
2. PROBLEM
We often face the problem of our cloud storage space getting exhausted and we are left with the
option of either paying for more storage or to clear the existing files which are not required. This
is mainly because the amount of data an individual requires is increasing day by day. All the
important documents, registrations, images, videos are often backed up to a cloud storage that
can be accessed from anywhere. With the help of this application, if the user has an external
storage device, we can have a backup of all the data and also free some space on handheld
devices by moving data into this external storage.
3. SOLUTION
The proposed approach will provide “Network Attached Storage” along with functionalities of a
Web Server. The main advantage of using a NAS device over a physical storage drive is that
many devices can access it at the same time. A USB Disk Drive provides finite access to only
the device to which it is connected; on the other hand the files which are available on NAS can
be accessed by any computer.
8
Documentation Leader
9
1. PURPOSE
The purpose of NAS with RPi is to provide a cost efficient and secured alternative to existing
cloud storage solutions. We identified the existing NAS/Cloud Storage solutions on the market
and observed that most of the solutions are ideal for office use. Which means they are very
costly for home users. We wanted to provide a simple, easy to use and cost effective solution
for home users so that they can enjoy the advantages of Network Attached Storage as an
alternative to Cloud Storage.
With the ever increasing developments in the field of consumer technology the data users hoard
has significantly gone up leading to the personal storage devices filling up at a pace the user
virtually cannot cope up with. The data pillig on is a one way process as none of the data gets
deleted unless there is a need for storage. This has given rise to a host of storage technologies
that help store more data. The drawback here is that these are physical devices that can
function only when connected to a processing device, unavailability of the later might lead to the
user not being able to access the data.It is also inconvenient to carry around the storage
devices. The age of the internet has a proposed solution to this problem i.e Cloud Storage.
However this facility demands the user to store their data on third party paid servers with
security compromised.
3. SYSTEM OBJECTIVES
The NAS solution presents an opportunity for a lower budget; lesser risk alternative as opposed
to cloud storage. The NAS solutions available in the market today are for enterprises with the
need of maintaining private data and are expensive. NAS solutions for home usage is a newer
market and full fledged products have not made their way.
4. ISSUES
1. NAS solutions are extremely costly and require additional installation & maintenance
costs. They are mostly only feasible for large enterprises.
2. Cloud storage is more beneficial for small and medium businesses. However, they come
with a limited quota after which monthly subscription costs add up to be costly. Security
is also risky with cloud solutions since we don’t know where our data is being stored.
3. After cloud storage is exhausted, users either pay more or clear data.
10
Assumptions
1. The user should have all the physical devices - router, raspberry pi and a hard drive for
the implementation to work.
2. All the users will use the implementation on a local network in order to ensure security.
Constraints
1. Concurrent access to the documents is not possible for editing.
2. Users cannot use the system on a public network.
3. Purchasing Hard Drive & Raspberry Pi may add up the costs of the system.
6. ALTERNATIVES
There are plenty of alternatives to noth Network Attached Storage and Cloud Storage providers
in the market. Every solution has its pros and cons with respect to the cost, available features
and security.
Documentation Leader
12
Success Condition User is able to access and perform actions on his files through the
web client.
Failed Condition Files are not accessible.
Primary Actors Hard Drive
Raspberry Pi
Web Application
Documentation Leader
14
1. SCOPE
The goal of the project is to transform an existing external hard drive into a cloud storage
device, connected to a network which will be accessed via a web application. Hence the scope
includes the following functionalities -
1. Developing a backend server containing APIs to handle incoming requests to the hard
drive. The backend server is deployed on the Raspberry Pi. This server will be
developed in Java using Spring Boot framework using the Model View Controller
methodology.
2. REQUIREMENTS
1. External Storage - This comprises any storage device that can be connected to the
development board, in our case Raspberry Pi. If the user wishes to increase the storage
capacity of the cloud, all he/she needs to do is replace the external storage with the one
which has more storage capacity than the one currently in use or add another external
storage if there are sufficient USB ports on the development board that is in use. If the
user suspects of a security breach, he/she can simply disconnect the Development
Board from the router or remove the external storage devices thereby protecting their
personal data.
support which will be required to connect the device to the router. The board must
contain at least 1 USB port that can be used to connect the external hard drive. In our
solution we have used a Raspberry 3B+ model which satisfies all the above
requirements. Users are free to choose the development board of their choice as long as
it supports the above functionalities.
3. Router - Any home router that supports the connection of multiple devices at the same
time should be sufficient to use. It is recommended that the router should be dual
channel which supports 2.4 GHz and 5.0 GHz frequencies. This is necessary when the
user wants to stream audio or video from the personal cloud service. To enable the user
to access the personal cloud storage service from outside the local network, Port
Forwarding is to be performed on the router. This will generate a public IP address which
can be accessed from anywhere.
4. Web Server - This is the heart of the complete solution. The web server is a spring boot
web application server that is deployed on the development board. The web server
provides the core storage service that is utilized by the client application to provide
services to the user. It consists of a rich set of REST APIs that are written purely in Java
which expose the underlying services of the Personal Cloud Storage Service.
5. Client Application - The client application, written in Angular provides the main User
Interface for the user to access the personal cloud storage.
16
Documentation Leader
17
1. OVERVIEW
2. PROJECT GOALS
The main goal of the project was to build a solution which consisted of a web application and
raspberry pi connected to a router. The complete setup should serve the following purpose:
● Provide a web interface for the user to be able to access his/her files stored on external
storage
● The user should be able to expand the external storage easily
● The solution should be able to handle multiple users.
● To create APIs for manipulating the data stored on the external storage devices.
Business Goals:
Build the solution 3 Build a shippable complete solution which can be
directly used by customers.
Technological Goals:
Develop backend APIs 1 Develop all the APIs required by the web application
to get data from the external storage
Develop frontend UI 2 Develop the Web Interface UI
18
Documentation Leader
19
1. IMPLEMENTATION
The proposed solution can be used to convert any external storage into a personal cloud
storage service that can be accessed from anywhere through a web-based client application. To
make the storage service available to external networks, we use the concept of Port Forwarding
which will be discussed in detail in the further sections. Following are the basic components of
the solution:
1. External Storage
2. Development Board (Raspberry Pi)
3. Router
4. Web Server
5. Client Application
External Storage - This comprises any storage device that can be connected to the
development board, in our case Raspberry Pi. If the user wishes to increase the storage
capacity of the cloud, all he/she needs to do is replace the external storage with the one which
has more storage capacity than the one currently in use or add another external storage if there
are sufficient USB ports on the development board that is in use. If the user suspects of a
security breach, he/she can simply disconnect the Development Board from the router or
remove the external storage devices thereby protecting their personal data.
Development Board - The development board typically must be capable of hosting a Linux
operating system. It must also provide WiFi or Ethernet support which will be required to
connect the device to the router. The board must contain at least 1 USB port that can be used to
connect the external hard drive. In our solution we have used a Raspberry 3B+ model which
satisfies all the above requirements. Users are free to choose the development board of their
choice as long as it supports the above functionalities
Router - Any home router that supports the connection of multiple devices at the same time
should be sufficient to use. It is recommended that the router should be dual channel which
supports 2.4 GHz and 5.0 GHz frequencies. This is necessary when the user wants to stream
audio or video from the personal cloud service. To enable the user to access the personal cloud
storage service from outside the local network, Port Forwarding is to be performed on the router.
This will generate a public IP address which can be accessed from anywhere.
Web Server - This is the heart of the complete solution. The web server is a spring boot web
application server that is deployed on the development board. The web server provides the core
storage service that is utilized by the client application to provide services to the user. It consists
of a rich set of REST APIs that are written purely in Java which expose the underlying services
of the Personal Cloud Storage Service.
Client Application - The client application, written in Angular provides the main User Interface
for the user to access the personal cloud storage. It provides the following cloud storage
services:
20
Flow Diagram
Implementation
As illustrated in Figure 1.0, the five main components are integrated with each other in the
above manner. The external storage device is attached to the Raspberry Pi through USB Port.
There can be multiple external storages connected to the development board. Next, the board is
connected to the router which provides the public IP address to access the web application. The
web server application is deployed on Raspberry Pi and lastly, the client application which is a
21
web based client is used by the user to access his/her personal data present on the hard drive.
The client application lets the user perform all the operations described in the Client
Application section. Since port forwarding is enabled on the router, the application can be
accessed from outside the network also.
Security Concerns
In any type of application, we must always address the increasing security concerns and threats
to the application.
ClickUp
ClickUp is a free web app for managing a complete software development life cycle. We used
ClickUp to keep a track of tasks, assign them to members and decide the next cycle of sprints. It
helped us extensively to manage the project easily and efficiently.
GitHub
GitHub is the most popular web platform for hosting and managing source code repositories.
Multiple developers can work on the same project simultaneously without any hassle. We used
GitHub to keep track of our source code for Backend and Frontend.
Fig 3.1 & 3.2: GitHub Repository for the frontend of the web application
23
Fig. 3.3 & 3.4 CircleCI Continuous Integration for testing every commit done to the backend code
3. RESULTS
The web application consists of 2 pages namely, Login/Authorization page and the Home page.
On sign in to the application, the user could view all his folders and files on the Dashboard.
From this screen he can also upload files, create new folders, delete files and directories, view
space usage and view recent activities performed on the files.
24
Login page
MySQL Database
Figure 6.0: SQL Database implemented on Raspberry Pi to track the User Activity on the Hard
Drive.
4. CHALLENGES
1. Security
a. Since the system is on an open network, anyone that has access to the web
application link can get unauthorized access to the user’s files and folders.
b. API requests and responses are automatically HTTP encrypted, however this
could be insufficient security for the system when being used outside of the home
or in public.
2. Cost
In case the user does not already have a storage device (HDD, SDD), then the cost of
the system could increase, as the user would have to purchase a Raspberry Pi, Router
and Storage device. Though these are one time costs, they can add up.
26
5. FUTURE SCOPE
There is good scope for improving the current solution for cloud storage. The application serves
basic functionalities but can be extended to provide some advanced features.
CONCLUSION
Network Attached Storage implemented with Raspberry Pi provides the users the ability
to to convert their personal storage to shared devices accessible over the network.
Users have full access to their file system remotely and can even perform operations
such as creating folders, uploading files, viewing activity and more. The one time cost of
setting up the system is significantly lower than the recurring costs of using the cloud
based storage solutions or existing Network Attached Storage solutions. The privacy of
user data is honoured. With this system any storage drive can be made a network
attached storage.
28
REFERENCES
[1] AMIT SHRIVASTAVA AND JAYANT GADGE. HOME SERVER AND NAS USING RASPBERRY PI, AVAILABLE:
RG/10.1109/ICACCI.2017.8126184
HTTPS://DOI.O
[5]MARK KYRNIN (APRIL 2016), DO YOU NEED NETWORK ATTACHED STORAGE (NAS)?
HTTP://WWW.TECHFORANYONE.COM/NEEDNETWORK-ATTACHED-STORAGE-NAS/
[6] ROBERT SPALDING, “NETWORK ATTACHED STORAGE” IN STORAGE NETWORKS: THE COMPLETE
REFERENCE, TATA MCGRAW-HILL PUBLISHING COMPANY, INDIA