please advise about nas installation

Hi,

I have been using linux for the last 5 years trying to set up my nas machine (HP Proliant microserver) with FreeBSD, mostly for two reasons:
zfs and the wonderful packaging system.

Thing is, I don't really know where to start. :)

At the moment, my nas machine is a Via Artigo A2000 with Fedora (RAID1) running rtorrent, cups, samba, nfs, squeezebox server. So it's basically a nas + minor services for my home network.

The new hardware is an HP Proliant microserver (up to 4 stata II, up to 8GB ram, and Athlon Neo 1.6 GHz, few USB) with:

2 1 TB hard disk from my previous nas (I can buy another one if I go for raidz)
1 250 GB hard disk shipped with the microserver
4 GB RAM

I have managed to install 8.2 on it, just to play with, and I am quite happy (apart from the bloody /etc/init.d which I keep typing :) ) so I would like to move on, but I am not sure which one is the more flexible according to the hardware and my experience.

Should I go for a Raidz or zfs mirroring? I know it does depend on me too, but one question is:

1) Would you suggest to keep the root partition on the raidz (if possible) or not? If yes, would that be difficult ?
2) What about striping together the 2 mirrors of 2 disks? (still, I could do this only if I can keep root on the same devices, otherwise I would need 5 HDD, 4 for RAID1 and 1 for system, this is not possible for me.)

Thanks in advance.
 
Scenario 1:
OS (ZFSonRooT) on the 250GB one and a mirror of those 1 TB ones.
Advantages: full ZFS (very easy to handle the capacity); protection from hdd failure with the mirror
Disadvantages: the OS is NOT protected from hdd failure; loosing 1TB worth of space (due to the mirror)

1) Would you suggest to keep the root partition on the raidz (if possible) or not? If yes, would that be difficult ?
Difficult ? No.
Intriguing and interesting ? YES !
This is scenario 2, btw.
Disadvantages: no hdd hardware failure protection.


2) What about striping together the 2 mirrors of 2 disks?
You only have 3 disks. How do you wanna create 2x mirrors ? I don't get this one ....
 
gettons said:
Hi,
1) Would you suggest to keep the root partition on the raidz (if possible) or not? If yes, would that be difficult ?
2) What about striping together the 2 mirrors of 2 disks? (still, I could do this only if I can keep root on the same devices, otherwise I would need 5 HDD, 4 for RAID1 and 1 for system, this is not possible for me.)

Thanks in advance.
Hi and welcome to FreeBSD :)
If you plan to use that server as a fileserver I would suggest that you separate your data from the OS. So, in your case and without buying new hardware I would go for a single UFS drive for my root OS, the one that came in with the server and a mirror zpool for my data with the 2 1T drives that you got.
Now, if you want to add a little extra get another drive and go for a RaidZ1 instead.

Regards,
George
 
Scenario 1:
OS (ZFSonRooT) on the 250GB one and a mirror of those 1 TB ones.
Advantages: full ZFS (very easy to handle the capacity); protection from hdd failure with the mirror
Disadvantages: the OS is NOT protected from hdd failure; loosing 1TB worth of space (due to the mirror)
Why not keeping the OS (250GB one) on UFS in this case? Because I have a zfs mirror on those 2 1tb disks what is the point of having the OS on ZFS ?



You only have 3 disks. How do you wanna create 2x mirrors ? I don't get this one ....


Sorry forgot to mention that in this case (2x mirrors) I would buy 2 extra 1 tb disk, this way I ll have 4 1tb disks. I won't be using the 250GB in this case and I could try to have 2x mirrors made of 4 disks.
 
gkontos said:
Hi and welcome to FreeBSD :)
If you plan to use that server as a fileserver I would suggest that you separate your data from the OS. So, in your case and without buying new hardware I would go for a single UFS drive for my root OS, the one that came in with the server and a mirror zpool for my data with the 2 1T drives that you got.
Now, if you want to add a little extra get another drive and go for a RaidZ1 instead.

Regards,
George

Option 1: looks interesting.

Questions:

1) if the OS disk breaks, would that be painful or not to reinstall the system on a new drive and make it recognize the current zpool mirror (the other 2 1tb disks)?
2) what is the advantage (in this particular scenario of course) of keeping the OS on a different device instead of having everything (OS + DATA) just on (2 one tb each) hard disks? Apart from the space taken from the OS (let's say 40GB max) the mirror could be 960GB but in this case the OS in the mirror as well. If one of the two disks fails, I still will be able to boot the system. There must be some advantage I'm sure, it's just me being a bit dummy to catch it I guess :)

Thanks
 
gettons said:
Option 1: looks interesting.

Questions:

1) if the OS disk breaks, would that be painful or not to reinstall the system on a new drive and make it recognize the current zpool mirror (the other 2 1tb disks)?
Assuming that you back up /etc, /usr/local/etc some directories in /var reinstalling the OS with minimal configuration is not that hard. Of course depending on how many ports/packages you might have to reinstall it can be time consuming.
As far as your ZFS Pool is concerned it is as simple as:

[CMD=""]#zpool import mypool[/CMD]
gettons said:
2) what is the advantage (in this particoular scenario of course) of keeping the OS on a different device instead of having everything (OS + DATA) just on (2 one tb each) hard disks? Apart from the space taken from the OS (let's say 40GB max) the mirror could be 960GB but in this case the OS in the mirror as well. If one of the two disks fails, I still will be able to boot the system. There must be some advantage I'm sure, it's just me being a bit dummy to catch it I guess :)

Thanks
Space is not much of an issue. I wouldn't expect to use more than 11G on a system that does a few other things besides being a file server. No X installed of course.
The advantages of separating your Data from the OS are many. They are independent from your core OS. You can easily export - import to other pools. You can even remove the drives plug them in on a different server and your data is there.
 
gkontos said:
Space is not much of an issue. I wouldn't expect to use more than 11G on a system that does a few other things besides being a file server. No X installed of course.
The advantages of separating your Data from the OS are many. They are independent from your core OS. You can easily export - import to other pools. You can even remove the drives plug them in on a different server and your data is there.


That makes sense. Yep, I will use backups so I could recover the filesystem faster. Keeping on a different hard disk is quite useful actually, so if something breaks I can still put hd somewhere else and access the data.
 
gettons said:
Option 1: looks interesting.

Questions:

2) what is the advantage (in this particular scenario of course) of keeping the OS on a different device instead of having everything (OS + DATA) just on (2 one tb each) hard disks?

The biggest advantage is workload distribution (or load-balance). If you are using the OS disk(s) for something heavy, the nas mirror will not be influenced, thus read/write to/from that mirror would continue at a normal throughput.
 
gettons said:
Why not keeping the OS (250GB one) on UFS in this case? Because I have a zfs mirror on those 2 1tb disks what is the point of having the OS on ZFS ?

Multiple:
1) Ease of use (with UFS, if you miscalculate a partition and you need to extend it ... well, let's just say it's not that easy to do it)
2) There is a bug if you copy to/from a UFS partition to a ZFS pool (I'm not sure if it was fixed in 8.2 as I do not have UFS+ZFS setups anywhere)
3) UFS lacks journaling (sure, you can use gjournal but that is a bit different from journaling (true journaling will be available in 9.0)) which means that in the event of a power outage, fsck will take a considerable amount of time to finish versus a ZFS installation which needs no fsck.
 
gettons said:
Option 1: looks interesting.

Questions:

1) if the OS disk breaks, would that be painful or not to reinstall the system on a new drive and make it recognize the current zpool mirror (the other 2 1tb disks)?

2 options:
1) dump
2) buy another disk and go with a mirror (be careful because a mirror is NOT a backup method but a hardware protection one)
3) mirror + dump/snapshots (depending on FileSystem) <- This is my recommendation.
 
Sounds like I have lots of choices then :)

Because the NAS machine will run quite static ( and lightweight ) software on it not even running/accessible 24h a day like:
squeezeboxserver ( music on the mirror/raidz disks btw ), samba, nfs, cups, lighttpd, rtorrent ( media on the mirror/raidz disks btw )
I was thinking about the following options:



1) ZFSonRoot and zfs mirror the 2 1tb disks == > 1 tb space mirrored now and possibility of 1,5 or 2tb mirror if I upgrade the two disks at some point enlarging the mirror ( I presume it is possible to do. is it ? ) . Good is that if one disk breaks, I just put a new hard disk in, without the hassle of reinstallin the OS somewhere else. Bad would be not to have a disk dedicated for the OS, but being quite static and not even accessible 24/h and max by 2 users it might not be a big issue, not ?

2) similar to the 1st option, just buy a new 1tb disk, then instead of using a mirror I would use a raidz, same faulty risk (just one disk), but more disks involved ( 3 instead of 2 ), still redundancy for the OS, more space ( 2 tb ).

3) OS on the smaller 250GB hard disk on UFS, and zfs mirror of 1tb with the 2 1tb disks. Os on dedicated disk, still redundancy. OS might break and I would need to reinstall on a new hd to access data again and to bring up the server.

4) similar to the 3rd, just buy another 1tb disk and do a raidz instead of a zfs mirror.


Thing is, at the moment I am using 700GB on the "old server". I would like to be covered for a while, at the same time I wouldn't like to have to save data samewhere else across one day ( simply I won't have enough space and time :) ). But I would say that 2TB will be enough for a good long time.
So space is not the very first thing I am after eventought having something scalable would be great. Considering the disk space the new server has is 4 bay, and 4 will be on such a server, I might need to think also about the hardware scalability.



What do you people suggest by reading the above?



Many thanks to all of you that are helping me with this.
 
You know my suggestion but either way is good. You might want to read the ZFS Best Practices Guide and the limitations in the wiki.
Also, you might want to perform test installations with your scenarios since you already have the server. Do some benchmarking and see what suits your needs.
Enjoy your new server ;)
 
I'll have to go with gkontos for this one since I remember when I was in your shoes; I just had to try all possible combinations :)

Whatever you choose, good luck :)
 
Back
Top