Wang Zheng Yuan

Monday, June 8, 2015

HOW TO MAKE A RASPBERRY PI NAS (NETWORK ATTACHED STORAGE)

http://www.tinkernut.com/portfolio/make-raspberry-pi-nas-network-attached-storage/
Adding a storage device your network is called creating a NAS (Network Attached Storage). And basically it is just a minimalistic computer with a boat load of storage attached to it. So using a Raspberry Pi as our minimalistic computer, let’s create our own Network Attached Storage and make a Raspberry Pi NAS. You can find the project page for this video at the link below. But for now, let’s start tinkering.



STEP 1
GATHER THE PARTS
01_stillview

There really isn’t much you need to do this project, and aside from the Raspberry Pi, you probably already have everything you need.

Raspberry Pi = $35.00
SD Card = $5.00
1 TB External Hard Drive = $60.00
Here are some other parts and tools that you you will probably find around the house (as I did):

Keyboard and Mouse
Ethernet Cable
Monitor
STEP 2
INSTALLING THE SOFTWARE
04_stillview

download raspbian
The first thing you want to do is download the Raspbian image using the link above. This is a stripped down version of Debian linux, so what I’m doing should also work on other Debian based distros, such as Ubuntu.

You then want to burn this one to an SD card using either Win32diskImager on Windows or the dd command for linux or Mac. Then plug the SD card into your Pi with video, mouse, keyboard, internet, power, and your external storage.

STEP 3
SETTING UP THE NAS
05_stillview


Once your pi boots up, you can login using “pi” and “raspberry” and then follow these steps to set it up as a NAS:

Update apt-get and install NTFS-3g
sudo apt-get update
sudo apt-get install ntfs-3g
Find out what path your external drive is located at (ex. /dev/sda1).
sudo apt-get update
Mount the external drive to the media folder and then make a shared folder within it.
sudo mkdir /media/NASDrive
sudo mount -t auto /dev/sda1 /media/NASDrive
sudo mkdir /media/NASDrive/shared
Install the Samba software.
sudo apt-get install samba-common-bin
Edit the Samba config file.
sudo nano /etc/samba/smb.conf
Under the “Authentication” header, remove the hash (#) before
security = user
Under the “Share Definitions” header, change
read only = yes
to

read only = yes
At the bottom of the page add:
[Shared]
comment = Shared Folder
path = /media/NASDrive/shared
valid users = @users
force group = users
create mask = 0660
directory mask = 0771
read only = no
Restart Samba
sudo /etc/init.d/samba restart
Add a new user to linux
sudo useradd [enter new user here] -m -G
Create a new password:
sudo passwd [enter new users name]
Add new user to Samba
sudo smbpasswd -a [enter new users name]
STEP 4
FINAL STEPS
06_stillview


Now on a different computer, if you browse the network you should see your raspberry pi. Trying to access it will prompt you for your username and password, and you can just enter the user and password we just created. Then start storing stuff to it!

If you want to access it from mobile devices you can use apps like Samba for Android or File Explorer for iOS to access network shares.

ALTERNATIVE METHOD
USING OPEN MEDIA VAULT
03_stillview

  download openmediavault
Before we dive into the nerdy method of setting up a NAS on a Raspberry Pi, a super simple alternative is to use Open Media Vault. Open Media Vault is a distribution intended to make it super simple to set up and manage your own NAS.

If you want to give it a try yourself, here are the dead easy steps for setting it up:

Download the most recent OpenMediaVault Raspberry Pi Image (using the button above)
Burn it to an SD card (you can use this guide if you don’t know how)
Plug it into your Raspberry Pi along with a monitor, network cable and power.
When it boots up, the screen will give you your IP Address along with instructions on how to log in.
On a separate computer, open up a browser and type in your Pi’s IP address. On the resulting page, login using the provided credentials (default should be admin and openmediavault).
Use the options provided to set up your networking share and add and manage users!
Posted by panther at 10:28 AM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ►  2018 (5)
    • ►  April (1)
    • ►  March (2)
    • ►  February (1)
    • ►  January (1)
  • ►  2017 (2)
    • ►  September (1)
    • ►  May (1)
  • ►  2016 (71)
    • ►  October (4)
    • ►  September (1)
    • ►  July (2)
    • ►  May (10)
    • ►  April (4)
    • ►  March (14)
    • ►  February (22)
    • ►  January (14)
  • ▼  2015 (189)
    • ►  December (12)
    • ►  November (23)
    • ►  October (10)
    • ►  September (6)
    • ►  August (10)
    • ►  July (48)
    • ▼  June (33)
      • CFEngine Resources courtesy of Vertical Sysadmin, ...
      • CFEngine Resources from Vertical Sysadmin
      • clobber
      • How to Flush Memory Cache on Linux Server
      • Big Data Tutorial 1: MapReduce
      • CIFS error fixed by disabling OplockEnabled
      • Red Hat Enterprise Linux 6 Virtualization Administ...
      • ⁠Chapter 8. KSM
      • What counld be causing bad "udp cksum"?
      • Do It Yourself NAS Guide 2015
      • Build a FreeNAS box - Core i3, 3x2 TB, Fractal Nod...
      • Build A Home Server With FreeNAS!
      • How to Set X11 Window title
      • CFEngine
      • Port Forwarding on OpenWRT
      • Linux/Unix: OpenSSH Multiplexer To Speed Up OpenSS...
      • Linux incrond inotify: Monitor Directories For Cha...
      • How to Run a script when a mail arrives in mail se...
      • Using udev rules to run a script on USB insertion
      • WAN bandwidth optimization tools and techniques
      • Understanding encryption and cryptography basics
      • How do we check faulty disk in linux?
      • UCSC mysql server for interactive queries
      • Using BLAT
      • bcl2fastq2: Script for download-and-build
      • The Twelve Factors
      • MAKE RASPBERRY PI WEB CONTROLS
      • HOW TO MAKE A RASPBERRY PI NAS (NETWORK ATTACHED S...
      • Benchmarking Differential Gene Expression Tools
      • Google Targets Big Genome Data
      • Building an IT Foundation for Big Data Success
      • Saving Children’s Lives with Big Genomics Data
      • Five Ways Big Genomic Data Is Making Us Healthier
    • ►  May (5)
    • ►  April (6)
    • ►  March (23)
    • ►  February (9)
    • ►  January (4)
  • ►  2014 (113)
    • ►  December (10)
    • ►  November (17)
    • ►  October (8)
    • ►  September (6)
    • ►  August (20)
    • ►  July (1)
    • ►  June (2)
    • ►  May (1)
    • ►  April (2)
    • ►  March (16)
    • ►  February (15)
    • ►  January (15)
  • ►  2013 (75)
    • ►  December (15)
    • ►  November (6)
    • ►  October (2)
    • ►  September (8)
    • ►  August (7)
    • ►  July (19)
    • ►  June (9)
    • ►  May (5)
    • ►  April (2)
    • ►  January (2)
  • ►  2012 (103)
    • ►  December (22)
    • ►  November (13)
    • ►  October (8)
    • ►  August (20)
    • ►  July (18)
    • ►  June (18)
    • ►  May (3)
    • ►  April (1)

About Me

panther
View my complete profile
Picture Window theme. Powered by Blogger.