Linux – NFS server under Linux over multiple disks

linuxnfsquotaraid

I am running Debian, and need to setup an NFS server. My server has five identical 2TB disks. I will need to setup folder quotas. I am planning to use software raid by putting 3 of the five disks into one raid 5 pool and using the remaining two disks as backup space. I feel that using RAID and quotas and NFS is a little painful to manage. I would love to use a ZFS like tool to make all this work easier, but I want to know if there are any competitive software in Linux.

Being a novice sysadmin, I want to know if there is a better system to do all this under Linux.

Best Answer

The answer really depends on how you envisage your backup drives being used. If you're imagining using it as a hot spare, I'd recommend using all your drives and using RAID6, so you have the ability to lose two drives before you risk losing data by having a third disk failure. If you were just using it to make a backup in case of a filesystem issue or accidental deletion of data, then I'd recommend using all your drives as RAID5.

I have slowly come the the realisation that hardware raid is more effort than it's worth. Software raid is not considerably slower, and in some cases is much faster than hardware raid. Software RAID easier to manage and hardware RAID is just another component to fail, with incompatible metadata standards.

What I would recommend is that you configure LVM (Logical Volume Management) on top of your RAID array. This allows far more flexibility than any standard partitioning would. You can increase the size of partitions and in the case of some filesystems, decrease their size. Most file systems allow you to increase the size while the filesystem is mounted. It also allows you to do other management tasks like migrate filesystems from one device to another easily while they are in use by adding and removing block devices from the volume groups. One useful tip is that, because some file systems like XFS can't be shrunk, you should start by creating your filesystems as small as you first need and leave plenty of space for you to grow your filesystems as and when you need to.