NAS file server help!

rentay

n00b
Joined
Jan 13, 2007
Messages
37
Hi all!

Just finalised my parts for a nas file server, but need a little help!

I was contemplating running FreeNAS but am thinking I would like to learn Linux in more depth and run Ubuntu. Unfortunately, that is as far as I really know where to go in terms of installing programs on Linux :(

Does anyone know of any tutorials for an absolute beginner or point me in the right direction on how I can setup my file server using Ubuntu and any other programs I might need? I have searched various websites but to no avail :( they are either too complex or dont have the information I am looking for.

My fileserver is going to be used as a storage for media/music and would like the option to run Plex media server! Am looking at running a RaidZ2 setup as well.

Any feedback would be greatly appreciated! ;)
 
1. Download Ubuntu Server 12.04 (I wouldn't worry about putting the OS on a mirror for home use. You can image the server after your setup and stick the image on a USB stick or even a DVD and put it somewhere.

2. During the setup make sure you install the Open-SSH Server.

3. Once the installation is complete restart.

4 After restart you might as well go into your BIOS and disable stop on absence of video, keyboard, etc.

5. Log into the server via SSH. If you are on Windows you can use Putty. HERE

6. Upon Login issue this command:
Code:
sudo apt-get install python-software-properties

7. Now let's give you a front end.
Code:
wget http://prdownloads.sourceforge.net/webadmin/webmin_1.620_all.deb
Then
Code:
sudo dpkg -i webmin_1.620_all.deb
sudo apt-get install -f
Your front in is installed at https://192.blah.blah.blah:10000

8. Let's add ZOL.
Code:
sudo add-apt-repository ppa:zfs-native/stable

Hit Enter Then:

Code:
sudo apt-get update
sudo apt-get upgrade

Once that's done issue this command:

Code:
sudo apt-get install build-essential ubuntu-zfs

NOTE: Pay attention to the terminal and make sure everything builds properly. After everything gets installed restart. ZOL is now installed.

9. Now comes the fun part populating vdev.conf (you can see the directions on how to do this here.

In terminal:

Code:
sudo ls -l /dev/disk/by-id

Look for the unique identifiers for your hard drive. Check the link on what you should be looking for. Once you know in terminal:

Code:
sudo vi /etc/zfs/vdev_id.conf
Edit this file as needed. For example:
Code:
            #     by-vdev
            #     name     fully qualified or base name of device link
            alias d1       /dev/disk/by-id/wwn-0x5000c5002de3b9ca
            alias d2       wwn-0x5000c5002def789e

Once you have the file correct hit Esc, then Shift colon then the letter x then Enter.
Now that you are back in terminal issue this command:

Code:
sudo udevadm trigger

Now your drives are accessible/mapped for ZFS.

So now you can issue a command like this:

Code:
sudo zpool create -o ashift=12 tank raidz2 d1 d2 d3

Now your pool is up. You should be good to go. However, this is just a guide you should read up on ZFS a little even when you get set up.
 
Last edited:
kac77 - Wow! That is exactly what I need to get started! Thank you for taking the time to post that!

+1 to you sir!

Also, I read that you can install Webmin to manage the raid, is this a good idea?

Is it necessary to install Samba as well? The computers that will be accessing the server are windows 7 machines.
 
Last edited:
kac77 - Wow! That is exactly what I need to get started! Thank you for taking the time to post that!

+1 to you sir!

Also, I read that you can install Webmin to manage the raid, is this a good idea?

You're welcome. Webmin works well if you were using mdadm. I haven't seen a ZFS module for it for Linux. I know one exists for Solaris though. I've been REALLY tempted to take a crack at it for ZOL. I think a lot of people would appreciate it. That being said you can use it for other things. But generally with ZOL onboard I usually use it to graphically see the directories and track performance other than that SSH is what I primarily use. It's just quicker once you know the commands and more precise.

Is it necessary to install Samba as well? The computers that will be accessing the server are windows 7 machines.
You can install samba and use that within webmin to control your shares. But NFS is faster....BY ALOT. Although in Windows (not server) I know the NFSClient isn't all that. So SMB isn't any worse.
 
So, initialising all the commands is through SSH but use Webmin to get a graphical view of everything?

I don't really understand when you say to look for unique identifiers for harddrives :( What exactly would I be looking for? I clicked the link and my head nearly exploded haha

Also, what are your thoughts on Napp-it? Can that be installed on Ubuntu?
 
So, initialising all the commands is through SSH but use Webmin to get a graphical view of everything?
No that's how I use it. I have ZoL at home and at work (in testing) with NFS which really is a set it and forget it affair. I really don't use webmin that much since for me ZFS is pretty much serving up data to other servers.

That being said, if you want to do Samba shares though use Webmin. It's good for that. You definitely don't want to edit smb.conf by hand.

I don't really understand when you say to look for unique identifiers for harddrives :( What exactly would I be looking for? I clicked the link and my head nearly exploded haha

Every hard drive has an unique identifier by either path or by ID. That's why I gave you this command:
Code:
sudo ls -l /dev/disk/by-id
It should give you a unique identifier for each drive. If you look at them closely you'll notice they are unique. You'll really have to look through that FAQ for more detail though. Before standing up my ZFS server at home I spend days if not weeks reading about it.

Had I not taken the time to research proper methods I know I would have fallen into a lot of the pitfalls people do with advanced format drives, optimum raidz configs, etc. As a result of reading a good deal before implementation I haven't had any problems whatsoever. It's been running since the day I turned it on.

Also, what are your thoughts on Napp-it? Can that be installed on Ubuntu?
Solaris derivatives only. I have used it though. It's pretty good.
 
This might sound like a stupid question but is NFS already installed on Ubuntu or do I need to install it separately?

I have done some reading and will give this all a crack when I finish building my server! I'm using 4 x 3TB WD Red harddrives, do you think RaidZ2 is too much? Should I be looking at RaidZ1?

If I can't get this all to work, I will look at using OpenIndiana + Napp-it.

Could you point me in the direction of any guides in regards to ZFS and maintaining it once I have it all set up?

Once again, thank you for your patience and putting up with what may seem dumb questions haha I'm still learning a lot about Linux and so far you have given me some great knowledge!
 
This might sound like a stupid question but is NFS already installed on Ubuntu or do I need to install it separately?

I can't speak for the Server version, but in the ordinary desktop version NFS has to be installed by the user. The package name to install is nfs-kernel-server (and it's corresponding dependencies). Then you have to set up the NFS configuration depending on the v4 or v3 protocol that you wish to use, and your export directories, etc. There are some tutorials out there on the Ubuntu site I believe.

The nfs-kernel-server package uses the built-in NFS kernel module rather than a user-space solution, so you'll have tip-top filesystem performance.
 
I will have to take a look into it!

My current configuration for my server is:

Motherboard: Asus P8H77-I (mini ITX)
CPU: Intel Core i3 3220
Case: Fractal Design Array R2 Mini ITX with 300w psu
Memory: Still undecided but will be ECC
HDD: 4 x 3TB WD Red

Should I be looking at going Xeon cpu?
 
Desktop grade CPUs/Motherboards generally don't support ECC. If you want ECC, you need a server grade board and a Xeon.
 
Considering I am only using my server to store files, is a Xeon cpu and compatible mobo with ECC necessary? Or could I get away with my current configuration?

Just spec'd up a Xeon build:

CPU: Intel Xeon E3-1230V2 3.3Ghz
Mobo: SuperMicro X9SCM-F-O
Memory: Kingston KVR16E11/8
Harddrive: WD 3TB Red (x4)
Boot drive: TBA
Case: TBA

Any feedback is much appreciated!
 
Last edited:
This might sound like a stupid question but is NFS already installed on Ubuntu or do I need to install it separately?
ZFS already has a built in NFS server. Look for the commands in that FAQ I mentioned earlier. I'd rather not repost that page. ;)

I have done some reading and will give this all a crack when I finish building my server! I'm using 4 x 3TB WD Red harddrives, do you think RaidZ2 is too much? Should I be looking at RaidZ1?
Raidz2


Could you point me in the direction of any guides in regards to ZFS and maintaining it once I have it all set up?

Once again, thank you for your patience and putting up with what may seem dumb questions haha I'm still learning a lot about Linux and so far you have given me some great knowledge!

ZFSonLinux.org has everything you need.
 
Thanks for the replies kac77!

What are your thoughts on openindiana/Ubuntu for managing the file server?
 
Back
Top