What linux flavour am i looking at for setting up a NAS?

Soldato
Joined
4 Nov 2003
Posts
5,738
Location
Edinburgh
As per title, i'm very new to linux, but i'm willing to put my back into any research and learning i need to do.

On monday i should have approx 1.6TB of hard drives arriving, 4*400gb seagate. I have a spare zombie PC set up in the loft out the way with a network card etc waiting to use these. I was planning on putting windows server2003 on it and RAID5ing them with that, or even just plain XP pro.

But i've read the arrays i make with windows have to stay, and the FS isn't "growable". Meaning if i buy more drives later down the line or i want to upgrade to RAID6 then i'm stuck, righty? This is where linux pops in, most (all?) OS's have a growable FS?

What flavour am i looking at getting for doing this? I would like to be able to log on to the NAS box remotely and manage it if i need to, and thats just about it. All it needs to do is store and be available as a network drive. I have a separate sever set to one side which will be the brains behind a network when i get everything up and running. But for this i just want it to be seen as a network drive, and anything saved to it is as if i was saving to a hard drive on my pc.

Reading around Slackware, or FreeBSD seem to be pretty good for doing this, or maybe even redhat, but being totally honest i havent the faintest. The closest ive been to linux is running clarckconnect, smoothwall, and IPcop on another PC, and i found some of that somewhat confusing! Thats only a general GUI setup!

The computer to use these drives will either be:
P4C800-e Deluxe (its sound broke so its useless for anything else)
2.8G P4C
512 DDR400

or

A7N8X (or something close to that)
XP2500 (or some old duron i have laying around)
and 512 DDR400

Am i looking at any problems facing either of these, not ability wise i know they are moooore than enough, but drivers? I haven't the foggiest how i install drivers or anything in linux :( i feel like a fish on dry land!

Thanks for any help given :)
 
Associate
Joined
16 May 2005
Posts
380
Location
Glasgow
I can't help too much in this, but I'd stay away from BSD if you feel aren't comfortable with Linux. There are two different things with similarities and crossovers (one contains programs and features from the other). Have a look at Debian, SuSE or Fedora (RedHat). With growable partitions, have a search for LVM (Logical Volume Manager) since I think that allows you to edit partitions on the fly. For this to show up as a Windows share, have a look into Samba.

Don't worry about drivers, all that is handled by the kernel. Since you don't need sound, the only thing you have to worry about is disc controllers and ethernet. I assume you are using onboard ethernet which if it's based on the Realtek chip will be well supported by linux. If your HDs are IDE then I doubt you'd have many problems, SATA can be a bit more tempremental but quite a few controllers are supported. Best thing to do is get a live CD of Ubuntu and check driver support. Ubuntu has the kernel 2.6.11 which means if your hardware is supported with this then it's likely to be supported by later kernels which other distros use (I'm not saying use Ubuntu for your setup - that's up to you. But you can use the Live CD to determine hardware compatibility).

Things to research: SATA controllers and kernel versions (in what kernel version is your SATA controller supported - if relevant), Samba (for setting up share), LVM (expandable partitions), RAID manager (have a peek at: http://freshmeat.net/projects/mdadm/ ).

HTH. I know there's a lot there but any specific questions do post and we'll see what we can help with.

EDIT: Not entirely sure if LVM and RAID will work together. I remember there being an option to setup Software RAID and an option for using LVM but dunno if you can use them together. Also forgot to say about what distro to use. At the end of the day, most Linux distros are the same at heart. Some use GNOME, others use KDE...but since this is a server it doesn't really matter. However most folks around here use SuSE or Ubuntu (Debian as well) so try these since you'll most likely get some help from folks around here.
 
Last edited:
Soldato
OP
Joined
4 Nov 2003
Posts
5,738
Location
Edinburgh
Excellent post dude, thanks very much :). Bascically it shouldn't matter too much what i use as long as i set up LVM, software raid and samba righty? So ubuntu is probably a much better route (read:easier :D).

Right i feel really stupid for asking this now, as i said i'm so new its unbelievable, if i could use windows now i would, buy i digress. You mention kernal and distros, sorry whats the difference. I do just get the distro right and install, bang thats on, yeah? Or am i too used to windows? :(

Are there any good tutorial sites that i can read, that will talk me throuhg this stuff, i've googled but i'm not entriely sure what to google for, and its all bring back ambiguous stuff that doesnt help!

//Edit: Did i mention i feel absolutely useless!
 
Last edited:
Soldato
Joined
18 Oct 2002
Posts
7,052
Location
Melksham
With regards to the kernel/distro difference, heres a hopefully decent explanation:

The kernel is the centre of the operating system, basically the last line before the hardware, and includes the device drivers, it provides a software layer for other apps to nice and easily use the hardware, the kernel on it's own however is useless, no command line even...

The distribution is basically the kernel and then a collection of programs to place on top of this, such as bash which gives you the command line, X which gives you a gui etc etc...

As for your choice, as said above seeing as you don't know much about linux Suse, Redhat or Debian are all fairly simple to setup and will do what you need, personally i'd choose Gentoo but with that hardware, and hard drive space it's not gonna be a huge amount of difference :p
 
Associate
Joined
16 May 2005
Posts
380
Location
Glasgow
SKILL has hit the nail on the head with kernel vs distros. I was going to recommend Gentoo but then if you do a stage 1 (I think), then you'll need to compile a lot - which I feel is a bit much if you aren't used to Linux. By all means when you have a bit more knowledge, go back to Gentoo since it's a very powerful distro with a lot of flexibility.

The easy part about your NAS is Samba, there are plenty of Samba tutorials for distros. RAID is also very well documented, but LVM stuff is a bit sketchy. Although thinking about it, I'm pretty sure someone on OcUK has managed to expand a RAID array without using LVM. After searching the archive, I think it's been lost to the pruning angels. However IIRC, he unmounted the RAID set and was able to resize it via CLI. It took at least a day or so (he was expanding a RAID 5 1.2TB array to a 1.5TB array I think) but no data was lost however that's no guarentee. If you are going to use Ubuntu then the following links will be useful:

http://www.ubuntuforums.org/showthread.php?t=76647 - How to setup Samba
http://tldp.org/HOWTO/Software-RAID-HOWTO.html - Software RAID on Linux (for any Linux distro, also talks about LVM and resizing arrays)

However, there seems to be a distinct lack of NAS tutorials, just bits and pieces. If I get some time, I'll probably put up some kind of How-To. But what I'd do is once you get the machine, don't worry about RAID and play about with Samba. Set it up and try and get Windows to see it. Once you're comfortable with Samba, then look into RAID. According to the second link, RAID + LVM is do able but not recommended. 1.6TB is a lot to lose :p

Don't feel useless, you've got a willingness to learn which is more than some people on a lot of Linux forums I've read :/
 
Soldato
OP
Joined
4 Nov 2003
Posts
5,738
Location
Edinburgh
Guys your all excellent!

Hard drives arrived this morning, very pleased. I'm gonna get to work downloading what i need (whatever is free for now :D) seeing what i can get done linux wise. Then actually start using it as a server when its proved its worth.
deano said:
if you are concerned about your data then i suggest hardware raid with a 3ware card ( http://www.3ware.com/ ) and also LVM, any distro is possible of this, but as already said check out debian and distros based on debian ( ubuntu ) and also centos ( http://www.centos.org/ )

Cheers
deano

I'm not particulary worried about the data, if i lost it, well i wouldn't go completely mad, would be more worried about the fact its 1.6 friggin TB's! Hardware i've looked at, but its expensive, although easier to setup in most cases (few key presses on boot). I haven't yet found one thats expandable. Also if my hardware raid card goes t*** up then i have to find an identical one to resurect my data. Where as atm i have a few controller cards plugged into PCI slots and i'm just plugging as many HDD's in ass possible on their own channels and using software raid (as the computer wont be doing anything else, and is more than powerful enough for the XOR calcs).

I actually sound like i might know what i'm doing there, shame its not true! :cool:.

Thanks again everyone, i'll report back no doubt asking for further help after i've got the build up and running today/tomorrow.

Your a right friendly bunch round here :)
 
Soldato
Joined
22 Aug 2005
Posts
8,840
Location
Clydebank
Yes. i'd use Debian Net install disk. It allows you to set up all your LVM + RAID stuff during install. It'll probably take a few attempts to get it. Important can be filesystems, I'd recommend either XFS or reiser (v3 or v4 check it out.).

I wouldn't recommend RAID 0, cos if one disk goes, you've lost everything. Whereas any other it can be recoverable but it's a pain.

Remember as well, that it's no use only finding out there's a problem when the 2nd disk dies. I.E you need to setup automatic RAID monitoring and notification so you know when the first disk develops problems.

In this case it's often easier just to have a spare disk ( depending on reason for failure).

LVM can also be used for disk striping. (setup 2 LVM stripes and RAID mirror onto the other 2 disks, perhaps)
Watch that you don't mirror, and then stripe as that is pointless.
 
Soldato
Joined
22 Aug 2005
Posts
8,840
Location
Clydebank
just remembered as well, sometimes it can be more flexible to have a small boot disk, and then from there attach your array of disks. (5 disks in total) This way, your system can remain easily maintainable as it can be a pain managing a system in which the boot partition is on a raid array. (you can configure that at install in Deb net install too)

Also debian is really easy to maintain over a ssh connection.
 
Associate
Joined
16 May 2005
Posts
380
Location
Glasgow
whitecrook said:
Yes. i'd use Debian Net install disk. It allows you to set up all your LVM + RAID stuff during install. It'll probably take a few attempts to get it. Important can be filesystems, I'd recommend either XFS or reiser (v3 or v4 check it out.).

Yep choosing a good filesystem is also important. For large files then XFS without a doubt. For a mixture of file sizes then JFS or Reiser v3 (not v4, it's not stable or mature yet) - I'd say JFS but Reiser v3 is known to be more efficient with smaller files. Nothing wrong with Ext3 (standard) but some other filesystems are a bit better with certain sizes of files.
 
Soldato
Joined
26 Oct 2002
Posts
3,664
Location
Surrey
I did this the other day, I used Ubuntu (As it was also a terminal server so a nice up-to-date GUI was a must) and I'd recommend the following.

OS: Use Debian (If text-only) or Ubuntu if you want a GUI.

Both OS's use almost identical installers and have full LVM config included so that makes LVM nice and easy.

Definitley keep a seperate (non LVM/RAID) partition for the OS, that will make future upgrades/OS change a breeze.

I always use ext3 for filesystems and it works perfectly, can't really comment on the others.

Once everythings installed just "apt-get install samba" and have a quick read of Samba site then you're ready to go! :)
 
Soldato
OP
Joined
4 Nov 2003
Posts
5,738
Location
Edinburgh
Right guys i'm back, i must confess i just havent had to get this up and running yet. But everything everyone has contributed has been excellent, that freenas thing looks just what i need to. Although i feels too easy :)p).

I've got the PC all up and running, checked all the drives work gave them a work out (all in a nice comfortable, and safe windows environment). I'll have a look at all this stuff tomorrow since i've got the day off work (it's a pretty rare event! :eek:).

I'll be putting whatever i install on a separate HDD, its an old 40gig, and if i can find another 40gig drive i'll mirror the OS HDD, total security then, i'm hoping i'll be able to set up a mirrored OS HDD after the initial install?

Anyways i'm gonna get to bed now, get some rest and start on this tomorrow.

Last things i need now to complete this are some fan cooled hard drive caddies.

Cheers
Alex
 
Associate
Joined
9 Dec 2002
Posts
1,509
I'll be putting whatever i install on a separate HDD, its an old 40gig, and if i can find another 40gig drive i'll mirror the OS HDD, total security then, i'm hoping i'll be able to set up a mirrored OS HDD after the initial install?

Mirroring is very easy to do on Linux. You just need to boot from a live cd and use the dd command. It does a bit for bit copy.

dd if=/dev/hda of=/dev/hdb bs=1024k

should do the trick. hda is the install hard disk, hdb will be your cloned hard disk. Keep in mind these may be different on your system!
 
Back
Top Bottom