Jump to content

[Tutorial] How to make a raspberry pi NAS!

So Currently im working on setting up my raspberry pi nas(Network attached storage) i had a spare pi, and a lode of speak media centers (what could we make? ) i got it.... A NAS!!!

anyway so im currently waiting on a download so i can get some stuff typed up. 

Okay what you will need!

   1. a normal set of screw drivers, Philips, and maybe something to pry with(i'm using an x-acto knife)

IMG_3535_zpst8rnlu5k.jpg

 

   2. a external hard drive, one of my old media centers works brilliantly!

IMG_3534_zpsjdo6buqw.jpg

   3.a USB type a to USB type b cable (a printer cable to usb)(this is how my hdd connects to my pi, use how yours is supposed too!!)

   IMG_3538_zpswsemelir.jpg

   4.Ethernet cable, suitable power cable for your pi 

IMG_3537_zps0dyvf87w.jpg

IMG_3536_zpsrgezshw0.jpg

   5.and of course the pi its self along with a suitable micro SD card(for me if you dont have a + its an SD card)

IMG_3542_zpstkjijene.jpg

IMG_3533_zpsaql6ilwg.jpg

   6.optional a 40/24 pin ribbon cable(old IDE cables work great for this)for hooking up LEDS and buttons in the future! 

IMG_3541_zpss8ypakka.jpg

Now we have everything!!! 

IMG_3539_zpszao13vnu.jpg

now we are going to want to download the latest version of Raspbian from here http://www.raspberrypi.org/downloads/. you can download ZIP or torrent! i find Torrent quicker.

now when thats installed lets download Win32DiskImager from here http://sourceforge.net/projects/win32diskimager/, now install it! when open plug in your SD card, and format it to FAT32. Now in Win32DiskImager your device gets pre found! great! now click the folder and navigate to your Raspbian ISO after extracting it and click OK. then simply click Write. Now wait. upon completion click ok, then Exit

put the sd card back in the pi, plug in power, keyboard, monitor, ethernet. and let it do its thing, when a blue screen pops up, use your arrows to go to over clock, click enter, enter again then go down to high and click enter again! then click ok and back. then go down to advanced click SSH, then enter on Enable. it will ask to restart go for it!

after restart login with pi and raspberry. now type in ifconfig and write down your inet address! it should be 192.168.1.*** Okay, unplug everything but power and ethernet and restart.  while restarting download http://www.chiark.greenend.org.uk/~sgtatham/putty/download.htmlit shouldent need to install then when you open putty. type your inet address and type port 22. and ok. You are now in your pi from your desktop YAY!!! login as pi and raspberry 

So now we have a pi set up with a working OS, SSH and Ethernet. now lets get the Exciting bit done! 

nice! now type sudo -i to become root user.

Rasbian doesn't like NTFS format so in root type sudo apt-get install ntfs-3g 

this will make it work!

lets get the disks setup type sudo fdisk -l

and this shows up

[img=http://i1150.photobucket.com/albums/o602/jameshumonline/1_zpsxn5vjxxi.png

now we want our bigger disk (the other one is an SD card)

so remember the first bit for me its /dev/sda on the 10th line! 

 

we need a directory so type sudo mkdir /media/USBHDD1

now we need to mount the drive to the system, by simply typing sudo mount -t auto /dev/sda1 /media/USBHDD1 .

​now we have a pi that recognizes a hard drive! (we are getting there!)

for the sake of tidyness we can add an extra folder inside . type sudo mkdir /media/USBHDD1/Storage

now lets update the pi by typing sudo apt-get update

now we need to install Samba so we can access the data from the network! do this by typing sudo apt-get install samba samba-common-bin this takes a while! type Y when prompted! and now lets make a back up sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.old

now we need to edit some files(we are getting there!)

typesudo nano /etc/samba/smb.conf

scroll down to workgroup and after the = change the name to what you want it to be! i chose Home Storage

now look for the bit that says

 

now take away the hashtag on security = user

now lets add some code, scroll to the bottom and add 

comment = Storage Folder

path = /media/USBHDD1/Storage

valid users = @users

force group = users

create mask = 0660

directory mask = 0771

read only = no

now control + X then press Y.

now lets restart samba

okay, nice harddrives are working, and we have folders, we need users, now!

type sudo useradd usernamehere -m -G users

then sudo passwd usernamehere

and type in the password you want, then confirm it

now lets make it a samba user

sudo smbpasswd -a usernamehere

and type, and confirm a new password!

now it semi working. go to my computer/network and select the name you changed in work group

click on it and you may or may not be prompted with an alert, type in your name and password you made.

1 more thing and it is complete!

we need to make it so it saves the mounts!

type sudo nano /etc/fstab and at the bottom add the following line /dev/sda1 /media/USBHDD1 auto noatime 0 0

then CTRL + X then Y then enter

and thats it.

You have a working NAS 

Check out my current projects: Selling site (Click Here)

If($reply == "for me to see"){

   $action = "Quote me!";

}else{

   $action = "Leave me alone!";

}

Link to comment
Share on other sites

Link to post
Share on other sites

So where do I put the hard drives at?

9590|EK-Copper|Sabertooth 990FXR2.0|16GB RIPJAWS Z|Dual MSI Gaming 290|Corsiar AX1200i|Corsair 760T|3TB Seagate+Dual 120GB Samsung 850EVO in Raid 0


LTT'S Official Radeon Master Race Club Founder-Predicts TitanX2 (Prediction Date: 3-30-15)


XFX Needs To Make A 3 Fan Cooler 

Link to comment
Share on other sites

Link to post
Share on other sites

Still gotta ask why the Pi using 100Mbps Ethernet? They need to give it gigabit at some point.

Link to comment
Share on other sites

Link to post
Share on other sites

So where do I put the hard drives at?

they are external and they plug into the pi

 

Still gotta ask why the Pi using 100Mbps Ethernet? They need to give it gigabit at some point.

i wish they did too :( 

Check out my current projects: Selling site (Click Here)

If($reply == "for me to see"){

   $action = "Quote me!";

}else{

   $action = "Leave me alone!";

}

Link to comment
Share on other sites

Link to post
Share on other sites

they are external and they plug into the pi

 

i wish they did too :(

Oh ok

9590|EK-Copper|Sabertooth 990FXR2.0|16GB RIPJAWS Z|Dual MSI Gaming 290|Corsiar AX1200i|Corsair 760T|3TB Seagate+Dual 120GB Samsung 850EVO in Raid 0


LTT'S Official Radeon Master Race Club Founder-Predicts TitanX2 (Prediction Date: 3-30-15)


XFX Needs To Make A 3 Fan Cooler 

Link to comment
Share on other sites

Link to post
Share on other sites

Oh ok

just got mine working, im going to bed now, ill update post in the morning ill tag you lot on it! i may do some more work! it needs a case now :P 

Check out my current projects: Selling site (Click Here)

If($reply == "for me to see"){

   $action = "Quote me!";

}else{

   $action = "Leave me alone!";

}

Link to comment
Share on other sites

Link to post
Share on other sites

Well, I set my Pi back up as VPN/NAS. 100mbps is actually slower than AES_256_CBC. Having said that, it's uncapped my upload speed...

Link to comment
Share on other sites

Link to post
Share on other sites

Still gotta ask why the Pi using 100Mbps Ethernet? They need to give it gigabit at some point.

I don't know if i did something wrong but when i used my raspberry pi b as a nas i've only got about 4Megabyte/s in the network so i think the limit is the processor. I dont know about the raspberry pi 2.

Link to comment
Share on other sites

Link to post
Share on other sites

I don't know if i did something wrong but when i used my raspberry pi b as a nas i've only got about 4Megabyte/s in the network so i think the limit is the processor. I dont know about the raspberry pi 2.

okay im not sure! the only thing i will use my nas for is streaming movies or transferring data over time! building a case for it now. but i would like to try the pi 2 :P

Check out my current projects: Selling site (Click Here)

If($reply == "for me to see"){

   $action = "Quote me!";

}else{

   $action = "Leave me alone!";

}

Link to comment
Share on other sites

Link to post
Share on other sites

I don't know if i did something wrong but when i used my raspberry pi b as a nas i've only got about 4Megabyte/s in the network so i think the limit is the processor. I dont know about the raspberry pi 2.

It should theoretically max out at 12.5MB/s. But realistically, 10MB/s should be the max. I've had faster internet running through it. I used my Pi as a VPN at was getting 60mbps down and 50mbps up. So yeah the CPU might be a limit but not at 4MB/s because I was seeing it running at 7.5MB/s.

 

Yeah the Pi 2 looks kinda awesome. Especially the windows support - I look forward to Steam In-House Streaming on a Pi.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×