odnan92
Posts: 2
Joined: Sat Jun 02, 2012 6:20 pm

Very Cheap NAS

Sat Jun 02, 2012 6:36 pm

Well I was thinking of using this marvelous piece of hardware for setting up a really cheap NAS. The intention is to share my files (movies, series and pictures mostly) with the computers of my house.

Ideas:
The principal idea is to hook up 2 HDD's to de RP and share them with samba but i don't want to buy cases for de hdd's so i was thinking of sata-to-USB cables wich are pretty cheap (3.5$ on ebay).
Util here is a very obvious idea, that i recognize, but the question that I have for you guys is how to manage the power supply.
Is ther a way for unifying the 3 power needs (RP + 2xHDD 3.5") into one?, is it cheap?, and small?
If not I could always go for a 2hdd's dock and having two diferend cables :S

Thanx for listening I'm waiting for your ideas.

BrianHeston
Posts: 5
Joined: Mon Jun 04, 2012 2:25 am

Re: Very Cheap NAS

Mon Jun 04, 2012 6:08 am

If you already have the drives you're planning to use, then this probably won't work for you. But if it was me, I would purchase the following:

- Two SATA laptop size (2.5") HDDs
- Two USB-SATA adapter cables
- One four port (or larger) powered USB hub

Next, you hook everything up like this:

1) Connect the power cord from the RP into one of the device ports on the hub.
2) Connect the host port of the hub to one of the USB ports on the RP.
3) Connect each of the USB-SATA adapters from device ports on the hub to the drives.
4) Finally, you hook power to the hub to light everything up.

The only problem with this setup is that I/O is going to be limited to USB speeds which could result in adverse performance, especially if there is more than one client PC trying to access the media stored on the drives.

All in all, it would be an interesting project, but I think you could easily overwork the RP.

odnan92
Posts: 2
Joined: Sat Jun 02, 2012 6:20 pm

Re: Very Cheap NAS

Mon Jun 04, 2012 11:25 am

Thats a very interesting idea usb powered hdd's, I already have one 3.5" drive here but I think 2.5" hdd's are a little overpriced. The idea is to make it cheap.

Even though I'll keep that in mind I could replace the laptop hdd with a sdd in order to get better performance and use that hdd.

User avatar
simonthepiman
Posts: 43
Joined: Mon Jun 04, 2012 11:42 am
Location: Battle - Sussex
Contact: Website

Re: Very Cheap NAS

Mon Jun 04, 2012 11:48 am

I have written a simple NAS setup instruction sheet for the Raspberry Pi after receiving mine last week
http://www.simonthepiman.com/how_to_set ... server.php
:geek:
Simon

http://www.simonthepiman.com (Beginners guides)

Crook
Posts: 42
Joined: Mon Jun 04, 2012 5:57 pm

Re: Very Cheap NAS

Thu Jun 07, 2012 1:30 pm

It can be used as a NAS, but it's not like this hasn't been possible for cheaper for ages:

https://www.google.co.uk/search?sugexp= ... 20&bih=965

I got this for about £22 a couple of years ago, flashed with SnakeOS http://code.google.com/p/snake-os/ It's a great device - NAS, BT client, print server, FTP etc. And comes with a case, power supply etc. Might be better than using a full RPi as a simple USB NAS, and allow your RPi to be used for something else.

I leave mine on all the time, torrenting as needed and take it off the USB via FTP when I need to.

User avatar
Lob0426
Posts: 2198
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
Contact: Website

Re: Very Cheap NAS

Fri Jun 08, 2012 5:12 am

When looking for an USB HDD here in the U.S. I wait for Wal-Marts Black Friday sale. Last year I picked up two Seagate GoFlex 640Gb USB 2.0 drives for $54 each. Still have one NIB and one hardly used. Picked up a Seagate 320GB the year before. Stripped the case off of it and used it inside my Windows Home Server as a backup drive for the system. turned it on and off with a switch. Bought half a dozen 8 GB SD (class 4)($9) cards also plus about the Same number of 8 GB USB sticks at $8 apiece Gave some of them away. Year Before that Bought two Seagate 1.5TB USB drives for $70 apiece. Gave one to my brother. Stripped the cases and used the SATAII green drives (5900 RPM) in our computers. Mine sat around for over a year before I even unboxed it. But the price was just too good to pass up. Keep your eyes open just after Thanksgiving and before Christmas in the U.S.
512MB version 2.0 as WordPress Server
Motorola Lapdock with Pi2B
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!

slighty11
Posts: 3
Joined: Fri Jun 08, 2012 8:35 am

Re: Very Cheap NAS

Fri Jun 08, 2012 8:39 am

If set everything up with the samba share and it is all good to work, the only problem i have is when i try to access it through my windows laptop it asks me for a network username and password. ive tried all passwords even blank and it still wont work. anyone any ideas.

nicknml
Posts: 200
Joined: Thu Mar 15, 2012 8:44 pm

Re: Very Cheap NAS

Fri Jun 08, 2012 11:20 pm

slighty11 wrote:If set everything up with the samba share and it is all good to work, the only problem i have is when i try to access it through my windows laptop it asks me for a network username and password. ive tried all passwords even blank and it still wont work. anyone any ideas.
You need to first use a username that exists on the raspberry pi. You then need to give set a samba password to that account "smbpasswd -a <username>" (the reason for this is that Linux uses a different hashing algorithm for passwords stored in /etc/shadow than windows uses,.)

User avatar
jaraeez
Posts: 20
Joined: Mon Jun 04, 2012 7:36 am

Re: Very Cheap NAS

Mon Jul 02, 2012 7:46 am

I had this all setup with my pi & an external 3.5 HD connected to a powered hub.

When I went to do a backup from a win7 pc the pi crashed after about 6GB?

Not sure but it seems that the nic on the pi can't handle a large stream of data?
Could anyone confirm this?

My idea was to have the pi sit in the closet as a backup server..

Cheers

User avatar
jaraeez
Posts: 20
Joined: Mon Jun 04, 2012 7:36 am

Re: Very Cheap NAS

Tue Jul 03, 2012 8:55 am

jaraeez wrote:I had this all setup with my pi & an external 3.5 HD connected to a powered hub.

When I went to do a backup from a win7 pc the pi crashed after about 6GB?

Not sure but it seems that the nic on the pi can't handle a large stream of data?
Could anyone confirm this?

My idea was to have the pi sit in the closet as a backup server..

Cheers
OK it seems that you have to update the firmware as there is an issue when both the USB & NIC are passing data to each other which causes the pi to crash.

I did a rpi-update & then backed up around 20GB of data over the network to a USB HD which went fine.
Now onto trying to configure the pi with 'netatalk' & get my apples backed up as well :)

grundholm
Posts: 1
Joined: Sun Jul 15, 2012 7:12 pm

Re: Very Cheap NAS

Mon Jul 16, 2012 2:15 pm

Hi, is there a way to add a 2tb+ disk in samba?

urfankhaliq
Posts: 63
Joined: Wed Apr 11, 2012 4:06 pm

Re: Very Cheap NAS

Mon Jul 16, 2012 2:39 pm

Im very disappointed with the performance that Im getting with the samba share. Its a USB 2 external disk and backing up 60GB of data litterally took about 12 hours!

dvaad
Posts: 11
Joined: Mon Jul 16, 2012 1:47 pm
Contact: Website

Re: Very Cheap NAS

Mon Jul 16, 2012 7:45 pm

OK it seems that you have to update the firmware as there is an issue when both the USB & NIC are passing data to each other which causes the pi to crash.
I'm seeing an issue with my Pi/NAS. I wouldn't quite call it a crash. In my case, a single USB flash drives stops responding and the kernel flags the filesystem as ro. I have to power cycle the stuck flash drive (and out of laziness the entire hub) to get things working again.

I'm going to try a rpi-update and an updated kernel build tonight to, I hope, get an improvement in stability.

My real question is - where is this issue being tracked? I have come across a lot of references to the combined USB and ethernet issue across various forums, but have not come across anything that I would call an origin. Any ideas?
[email protected] - Google+ http://goo.gl/qferZ - 919-636-9529

honda4life
Posts: 75
Joined: Thu Mar 15, 2012 7:27 pm

Re: Very Cheap NAS

Mon Jul 16, 2012 8:21 pm

Unfortunately too slow for samba...
FTP works great on the other hand.
NTFS performance is also terrible, so use another filesystem if possible ;)

urfankhaliq
Posts: 63
Joined: Wed Apr 11, 2012 4:06 pm

Re: Very Cheap NAS

Mon Jul 16, 2012 8:24 pm

what filesystem would u use in order to share with windows pc's?

obarthelemy
Posts: 1399
Joined: Tue Aug 09, 2011 10:53 pm

Re: Very Cheap NAS

Tue Jul 17, 2012 8:25 am

ext4 because it is the default, native, hence faster, and very reliable.
Samba takes care of making the files on the ext4 partition available to windows machines that don't handle ext4.

dvaad
Posts: 11
Joined: Mon Jul 16, 2012 1:47 pm
Contact: Website

Re: Very Cheap NAS

Tue Jul 17, 2012 2:28 pm

urfankhaliq wrote:Im very disappointed with the performance that Im getting with the samba share. Its a USB 2 external disk and backing up 60GB of data litterally took about 12 hours!
100Mb/s ethernet is about 44 GB/hour, assuming 100% efficiency, which you will not have. 60GB would need about 90 minutes at 100% efficiency, but if you assume 50% (which is not unreasonable for ethernet), then you are somewhere near 3 hours. I'm sure that is still too long for your needs.

For that large of a data set, you would probably want to find a device that has 1Gb ethernet.

It would be interesting to run the netperf tool against a Raspberry Pi target to get some real network efficiency numbers.
[email protected] - Google+ http://goo.gl/qferZ - 919-636-9529

urfankhaliq
Posts: 63
Joined: Wed Apr 11, 2012 4:06 pm

Re: Very Cheap NAS

Tue Jul 17, 2012 2:48 pm

In my case the backup (and validation) took near enough 24 hours!

I could live with 3 hours lol

urfankhaliq
Posts: 63
Joined: Wed Apr 11, 2012 4:06 pm

Re: Very Cheap NAS

Tue Jul 17, 2012 2:49 pm

obarthelemy wrote:ext4 because it is the default, native, hence faster, and very reliable.
Samba takes care of making the files on the ext4 partition available to windows machines that don't handle ext4.
Not that I have got the Mac part working anyway but would it be possible to use the same EXT4 parition for the samba share and also for the mac using netatalk/afp etc for time machine?

dvaad
Posts: 11
Joined: Mon Jul 16, 2012 1:47 pm
Contact: Website

Re: Very Cheap NAS

Tue Jul 17, 2012 3:41 pm

urfankhaliq wrote:
obarthelemy wrote:ext4 because it is the default, native, hence faster, and very reliable.
Samba takes care of making the files on the ext4 partition available to windows machines that don't handle ext4.
Not that I have got the Mac part working anyway but would it be possible to use the same EXT4 parition for the samba share and also for the mac using netatalk/afp etc for time machine?
Yes. Samba can expose any part of the Linux VFS. Think of it as layers. EXT4 provides the filesystem to the real devices. This is what you interact with when logged in locally to your RPi. Samba can then take any part of your directory tree (including '/') and expose it as a share.
[email protected] - Google+ http://goo.gl/qferZ - 919-636-9529

joelol75
Posts: 2
Joined: Thu Jun 21, 2012 10:51 pm

Re: Very Cheap NAS

Sat Dec 14, 2013 5:13 pm

Yes, ext3 or 4 is pretty rocksolid for a mix of files. Since most of my files are large i donno why but i always use xfs on every nas drive until zfs on linux isn't well.. crap or btrfs is mature.

Xfs has some cool options like tunable allocation sizes [say 1/2 to 1 gb chunks so fragmentation isnt an issue. Online [no need to unmount drive] defragging is easily a quick cron job. I had the dreaded hardware ecc errors and relocated sector increasing at about the rate of universe expansion of hdd death and xfs always remounted if only read only and recovered any recent files but hard drives die and as a human rule all moving parts will fail eventually so backup. Ohh I could only curse 2 file systems I could blame directly for data loss because of the file systems faults. Reiser3 and fat. That was my early setups didn't have enough cpu at the time to justify xfs (cpu heavy and slow deleates are it's major cons and the cpu part was only justified by "those Pentium 2 400MHz" days but ummm the raspi doesn't need any unnecessary drag so the slight gain in throughput would be lost in the no sata port problem anyway. Reiser3 had some cool features and I started with that fs after reading Hans Reisers paper...book on his take on why we needed another filesystem.. and he truly was a genius ..(murdered his wide too so eccentric as well ;) what I liked was that Reiser3 was I believe for somebodys religious fight in the day the default fs for root on Red Hat 5 or so iirc and I read all ths crap on b trees
And what had me at the time was hard drive space. All filesystems have a wasted space problem with Small files where an empty file or small text files like in /etc still waste a lot more space than the filename length and the acls to describe such empty text file. I don't want to say it's whole block size is wasted but I know back when filesystemfile systems had size limitations (sometimes multiple times over like that should've fixed once rant)
Anyway reisers3 filesystem probably reiser4 as well seemed brilliant to include a feature called "tail packing" where at a small performance hit all these tiny files can be all packed in together to save hard drive space. Genius.. so I was sold. Until
Something I don't know what through up some bad superblock crap on mount and wouldn't even mount ro (this was the root filesystem) ohh crap I'm thinking so I don't do anything drastic to make matters worse so reading up on recovery it seems too easy as many most and hopefully all fs's keep backup superblocks. But even the most talented, Einstein included, are prone to oversights and plain simple mistakes.
And what bit me (not realized for many years as to what happened to look for bug report) is that if you write a filesystem that isn't tested over probably decades there's no way to guarantee it won't fail in your specific case. The snake that bit me was having uncompressed reiser3 images on a reiser3 partition. I was going to tgz em but whether that caused the problem on reboot or when I used some reisersuperblock recovery command later and ended up with 5 or 6 copies of every file in I think numbered or seperated directories (sure wasn't lost & found) most pointing to random spew so every file needed to be hand checked...

But nowadays I boot off of a small ssd ext4 now but nothing wrong with ext3 and all spinning drives are 2.5 sata drives. Usually the extra too tall to work in a laptop bay wds. So my advice. Dont cheap on this when it could be done proper for not much more. The raspi is cool and efficient but wrong for this task. Even I kinda thought about it but there are slightly pricier boards with sata (and no gigabit Ethernet so.

Get a pair of recent decommissioned Xeon processors the energy efficient ones not the heat the room 10c in 5 mins after turning it on. I think I got two identical quad core Xeons with fanless beutiful works of solid copper heatsinks for maybe slightly higher than scrap cost of the copper (20 dollars or so...) of ebay hunting. The Intel brand server board for these was also dirt cheap as 1. No Pciex16 slot for a decent video card and crap onboard graphics (ati es100 iirc...crap but this isnta gaming rig and besides running xfce over vnc here and there most stuff is sshed In. What You do get Is.... 6 yes 6 onboard sata connectors. And 2 built in giga ethernet ports. The memory ran the most unexpected cost as it used some goofy registered ecc fbdimms but 8 slots could lessen the hurt. I only populated 6 slots with 16gb well 4 slots but it has bios options like if a memory stick fails check you can assign spares from what I understand this memory is power wasting so just populate the minimum needed (iirc 4 slots for a doubledual or doublequad xeon) Also it has 2 pciex4 slots. What is they good for? Real hardware sas cards that bascally unrestrain your setup to maybe a dead hard drive being a temporary annoying beep fixed in 5 minutes by just slapping a new replacement in and letting it rebuild the raid 5. I got one of those 24 3.5 sata cases from newegg and an older but capable 4 SAS to 20 sata cable breakouts.

Regrets. I needed much more than just a nas. With 2 gbes it could serve everything from transcoding duty to lowly router. Right now I have a hell of mish mash drive sizes and capacities but I keep a straight drive by drive backup off the raid because raid is no backup. I wished I went all 2.5 for size and got more slots. I never thought I'd say it but the silence slightly higher price and smaller capacity and slower speed is actually a worthwhile tradeoff in less noise and a lot less heat. I've read about wd caviar greens messing up raid arrays with over aggressive power saving settings but I usually use wd tune tool to shut of the quiet features and left idle down park settings alone and never had one drop out of the array that wasn't dead. Seems if a new wd lives past it's first month it will last years before demise. Ill post some video of the startup.. loud as heck fans can be tamed by wiring 7 or 5 volts intead of the 12v to them (don't with 3.5 drives) the case for the firstserver case I had with no spongy filter so maybe a power down and blow out so often but it was done right once. Its a new era and im not trusting 'cloud hosting' to anyone. I argue this point again. The home desktop is very niche item I tell most of my family and friends. .my time and support pit with no pay to stop using machines they don't know (and don't want to either) how to properly setup, secure and maintain. Multiple desktops or laptops nomore. Tablets and possibly a laptop if needed. But I tell them they are going to pay for a computer they won't use. I tell them to never turn it off and get it celler bound in good spot and monitor debian stripped to only what's needed (ok even thats impossible anymore) and they think I'm nuts. But plex, nas,home automation and security. Entertainment (heck with just plex. Checkout minidlna or mediatomb. Blow that one family members mind, you know the one calling 3am panicked they don't know what to do , she got a virus popup on her c: drive and then you need to waste a half hour reassuring them since this would be impossible since there is no c: drive in ubuntu the beauty of dlna upnp server controller client model and sip voip googlevoice whatnotand they get it. I don't fully understand why google cannot and will not offer granular permission controls but yep.. nobody reads em anyway. Why is everything ad revenue driven. More correctly behavior datamining driven. I kinda wished. NOKIA put all their chips on Maemo instead of treating it like a pet project. Symbian and now windows phone. I liked meamo apps. Simple deb packages that never asked for permission. Becaused they asaik never did anything more than it needed to unless you paid for some nokia app than EULA

I'm getting way off topic but raspis a client tool. Dont mistake it as a cheap server anything unless it is very mundane task. Now to control something like HVAC and monitor and time base heating and ac to save money. I/O of a desklamp from a simple android ssh command widget. I could go for days but its the stuff the pi is for. Plus rambling ideas will make my disclaimer longer. If you burn your housedown using pi for hvac control or electrocute and or fri ya pi running high voltage ac anywhere.unisolated blah proper redundancy and failover is your responsibility. The world is possible and we would be a better society if we did what was right and sustainable, instead of patent portfolio stuffing for continuous capitalistic gain through planned obsolescence. Just think of the huge rebirth of knowledge in the last 200 or so years. Now subtract all the time we spent killing each other (although arguably the best tech inventions came from warfare)

Sum it up in one line ext3 or 4 would be fine but don't do it..

Return to “Networking and servers”