Storage server for home use

Shihanshu

Reputable
Mar 17, 2014
75
0
4,640
Basically, I want to know how to do this. I have an old PC that should be fine with 1TB hard drive space. Im gonna put linux on it (dont know which version) and hopefully be able to everything on this list

1. Access data on the Old PC from all 4 desktop pcs in my house
2. still use my wired connection to my router from each PC

so i assume ill need a switch for this but dont know which one and stuff
obviously I want good performance ( like saving 1080p video over the network) but still cheap
 
Solution
I don't recommend using an old desktop PC as a file server. Your file server is going to be left on 24/7 for the year. Older PCs will burn about 100 Watts at idle (newer ones are now down to about 30 Watts). A dedicated NAS (network attached storage) will consume about 10-20 Watts.

If you pay the U.S. average residential price for electricity - about $0.115/kWh, each Watt ends up costing you almost exactly $1 per year if the device is left on 24/7. So the old 100 Watt PC is going to end up costing you about $80-$90 more in electricity every year than if you use a NAS. Considering a cheap NAS is less than $100, and a good one about $200-$300, if you're planning to keep this thing running for several years, it's actually cheaper to...
I don't recommend using an old desktop PC as a file server. Your file server is going to be left on 24/7 for the year. Older PCs will burn about 100 Watts at idle (newer ones are now down to about 30 Watts). A dedicated NAS (network attached storage) will consume about 10-20 Watts.

If you pay the U.S. average residential price for electricity - about $0.115/kWh, each Watt ends up costing you almost exactly $1 per year if the device is left on 24/7. So the old 100 Watt PC is going to end up costing you about $80-$90 more in electricity every year than if you use a NAS. Considering a cheap NAS is less than $100, and a good one about $200-$300, if you're planning to keep this thing running for several years, it's actually cheaper to buy the NAS. Good brands are Synology (widely regarded to have the best UI) and QNAP.

But if you insist on using the old PC (maybe it's not so old and doesn't draw much power, or it's a laptop), any version of Linux which supports Samba (AFAIK they all do) will allow you to share files with Windows PCs. Performance varies depending on hardware. And Samba is tuned more to allow multiple users to simultaneously access different files, whereas Windows is tuned more for a single user accessing a single file. So Samba will usually score worse at single-file benchmarks than Windows. For Gigabit ethernet you can expect about 60-120 MB/s transfer speeds (nearly as fast as a HDD). Fast ethernet is about 1/10th that. That's more than fast enough for streaming videos, and plenty for most people's purposes.

If you want to get fancy, you can try installing FreeNAS. That's based on BSD Unix and designed specifically for file servers. It has a decent web interface and a lot of really nifty features (like snapshots). I use it myself, but I think most of the features would be wasted if all you want is a simple file server. Still, it's free, so you can try it.

If you're using all the ethernet LAN ports on your router, then yes you'll need to buy a switch. A cheap one ($10-$15) will do. Just make sure it's gigabit to future-proof yourself. In fact if your router is not gigabit, you can just plug your file server and all your PCs into the switch to get them up to gigabit speeds (assuming their network cards support gigabit). (The switch still needs one port plugged into the router, but the router's slower speed will only affect Internet and wireless speeds.) I like the metal TrendNet or TP-Link switches because they're cheap, have a metal chassis, draw little power, and have a full set of indicator lights (not a simple on/off). They're a bit more expensive, but I try to pick up a few when they go on sale for about $10-$15.

To plug it in, all you do is take one ethernet cable, plug one end into your router's LAN port, then plug the other end into any port on the switch. Then you can plug devices into the switch and it'll be like you're plugging it straight into the router. It's really a lot more complicated than that, but the manufacturers have made everything automatic now so this is all you have to do. It Just Works.
 
Solution

Janpieter Sollie

Honorable
Jun 2, 2013
73
0
10,640
- for home use, use ubuntu server, and ask help on the ubuntu forums. Ubuntu is a very user-friendly and well-documented linux distribution they have an article for everything you may want to do. For filesharing, the thing you need to look into calls itself 'samba file sharing'
- switch: what devices do you have in your network? I'd say: try to find one which supports jumbo frames. For an old pc with 1 hdd, using multipe network cards to increase network bandwidth is not worth the cost, so you don't need a managed one
 

Jumbo frames used to make a big difference when Gigabit ethernet was new. The switch hardware wasn't quite as fast back then and its processor could get overwhelmed by the task of breaking up large file transfers into small 1500 byte chunks at gigabit speeds. Newer switch hardware doesn't have that problem, and the bandwidth savings of using jumbo frames is typically less than 10%. On the other hand, jumbo frames can cause mysterious connection issues when one device uses a MTU size bigger than another device recognizes. So the general recommendation today is to just leave it off.

Jumbo frames still make a big difference on 10 Gbps or faster networks. But there's currently no reason to be running that at home unless you're using SSDs on both the file server and your PCs.
 

Janpieter Sollie

Honorable
Jun 2, 2013
73
0
10,640

your statement is absolutely right, but I wasn't thinking about the switch hardware: I was thinking about the old PC with a client network adapter where the CPU without SSE2 or AVX libraries needs to cut the packages
 

Shihanshu

Reputable
Mar 17, 2014
75
0
4,640
I checked into it and my main gaming PC and my room mates gaming PC are both gigabit ready which is mostly all i care about. The only reason I am using the OLD pc is because well. I have it. Im 17 and live in an apartment so energy is paid by the landlord lol. I actually went thru some of my roomies stuff because his dad is a network admin and leaves his old stuff at home and found myself a Cisco SG102-24 Compact 24-port Gigabit Switch so thats all good. The old pc will be using a LOT more than a TB anyways. So thanks for your help guys
 

thehorsetowater

Reputable
May 20, 2015
9
0
4,510
I use my gaming / workstation as a media server / file hosting for all networked devices. One of the main tasks apart from access is transcoding.
I have 3x4Tb WD 7200rpm SATA3 drives in the case along with a 480gb SSD for system boot and system files.
I used to use an old mac mini with external drives but I found that the transcode was not reliable and buffered even on a gigabit network.
I think the bottleneck was the IO speed of the USB 2.0 connection.
I thought about going down NAS route for some of the reasons noted however I was still concerned re: CPU load for transcoding large (>10Gb) .MKV files with DTS directly to a smart TV.
So I figured I would host the data on the gaming / workstation.
When transfering my data from the external drives connected to a macbook pro with USB 3.0, transfer speed over the LAN is 113MB/s actual speed (var. -30MB/s) as measured by LAN speed test (v1.3) using SMB sharing mac to pc. (OSX 10.10 to Win 8.1).
I must say I was chuffed with the speeds, in my calculations I assumed a bottleneck on the read speed of the external drives when transfering data (WD mybook 3TB) which I believe have a 7200rpm spin.
The workstation is a power hog when using the GPU / hyperthreading but can powersave and reduce consumption. I have yet to see exactly what it is consuming when just transcoding over the network.
This way I do not have an extra black box, have a reliable and powerful transcoding machine and can drop in extra SATA3 disks as I start worrying about data redundancy.
If forced to get a NAS I would get one with a decent CPU and buffer memory as I would not want to introduce a bottleneck because of limitations of the interface.

Transfer Speed with Win Exp



A diagram of the LAN

LAN%20TF%20REALWORLD%20113b_zpsfmjoqoe6.png
 

Yes, transcoding is a valid reason to store your media files on a more powerful computer. However, if your video files need to be transcoded, then do realize you're burning extra power every time you play a movie. The real solution is to re-encode the movies into a format which your TV supports natively so you don't need to transcode.

Sometimes this isn't possible. Maybe you don't know how to do it, whereas your media server software transcodes automatically. Or maybe the original MKV format has additional features which your TV doesn't support but are available when played back on a computer, and you don't want to waste space having two copies of the video. So I don't tell people that it's wrong to transcode. Just that it's not exactly an optimal situation.

When transfering my data from the external drives connected to a macbook pro with USB 3.0, transfer speed over the LAN is 113MB/s actual speed (var. -30MB/s) as measured by LAN speed test (v1.3) using SMB sharing mac to pc. (OSX 10.10 to Win 8.1).
I must say I was chuffed with the speeds, in my calculations I assumed a bottleneck on the read speed of the external drives when transfering data (WD mybook 3TB) which I believe have a 7200rpm spin.
Theoretical max for Gigabit is 125 MB/s (1000 Mbps / 8 bits/byte = 125 MB/s).

Most 7200 RPM drives > 1TB can hit about 160 MB/s transfer speed on sequential data stored at the edges of the platter. This slows down to about 80-100 MB/s for data stored closer to the center. And random (non-sequential) I/O is a lot slower.

If forced to get a NAS I would get one with a decent CPU and buffer memory as I would not want to introduce a bottleneck because of limitations of the interface.
Yeah, most NASes use an ARM CPU (usually Marvell), which for the most part is useless at transcoding. I've heard some of them are being paired with a decent GPU which can transcode (there are cheap hardware boxes which can do it, so there must be such hardware out there). But in general if you want a NAS which can transcode, stick with the ones which use Intel CPUs.
 

thehorsetowater

Reputable
May 20, 2015
9
0
4,510


The trouble is I have approx 2800 dvd files from the past 12 years or so and I do not know of a way to transcode them all efficiently so that they may be played natively on the PLEX apps on all the devices (not sure if the native format would vary depending on client (ipad, android, roku, etc). If you know a way let me know please! The files, whilst on the most part are .mkv also have some MP4, .MOV, .AVI etc from handbrake days.
 
When encoding with Handbrake, on the video settings tab there's a "fast decode" option. Make sure that's checked. That option is there specifically to produce an output file which can be played back by older hardware decoders. Also, use the MP4 format as many devices don't support MKV.

2800 videos is a helluva lot of files to re-encode though. I'd probably just keep transcoding, and hope the next TV you buy supports MKV natively.