Storage Server

Storage Server


The storage server was originally going to be based on FreeNAS.  But it turned out that the minimum requirements have grown quite a bit over the years and it's turned into quite a bit more than just a NAS device.  Since MANY of the features it provides are going to be unused in a simple lab setup like this, I decided to just build a simple NFS server using Debian Buster.  I decided on NFS because of the simplicity of the setup.   For people looking for a GUI to manage the server, I would point them at Webmin.  Since this server should never have anybody connecting to it from the outside world it should be OK with the base Webmin install.  I would be careful if the server has any public addresses on it.  There are ways to make it reasonably secure to connect to but beyond this post, maybe a future blog post.




The storage server is a Dell Optiplex 755 I bought from Free IT Athens for $15.  I bought an additional 2 250GB disks for $24.

Hardware

  • Intel(R) Core(TM)2 Duo CPU E8200
  • Built-in Intel(R) PRO/1000
  • ASIX AX88178 USB 2.0 Ethernet
  • 4G - DDR2 PC2-6400
  • software raid
    • ST3250620NS
    • GB0250EAFJF
    • WDC WD2500JS-22N

Software

  • debian buster
  • nfs-kernel-server
  • nfs-common

Additional Configs

Besides the normal installation for the server that is covered very well in other locations, there are a few configurations beyond the base install worth mentioning.  The 3 disks were assembled into a software RAID-5.   The raid 5 was then partitioned into a root partition a swap partition and a Linux LVM partition that will be used as /exports/data on the server.   

Command (m for help): pDisk /dev/md0: 465.4 GiB, 499726155776 bytes, 976027648 sectorsUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 524288 bytes / 1048576 bytesDisklabel type: dosDisk identifier: 0x5a6ece79
Device     Boot     Start       End   Sectors   Size Id Type
/dev/md0p1 *           63   9767519   9767457   4.7G 83 Linux
/dev/md0p2      967916250 976013009   8096760   3.9G 82 Linux swap / Solaris
/dev/md0p3        9767520 967916249 958148730 456.9G 8e Linux LVM

I chose LVM on the export partition because of the flexibility to add additional raids without reworking everything. 



/etc/exports

# /etc/exports: the access control list for filesystems which may be exported# to NFS clients.  See exports(5).## Example for NFSv2 and NFSv3:# /srv/homes       hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)## Example for NFSv4:# /srv/nfs4        gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)# /srv/nfs4/homes  gss/krb5i(rw,sync,no_subtree_check)#/exports/data 192.168.199.0/255.255.255.0(rw,sync,root_squash,no_subtree_check)

/exports/data is only exported to the SAN network(which is not routed to any other network)


/etc/network/interfaces

# This file describes the network interfaces available on your system# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo enp0s25 enx803f5d086b11
iface lo inet loopback
# The primary network interface
allow-hotplug enp0s25
iface enp0s25 inet static
address 192.168.199.254
netmask 255.255.255.0
broadcast 192.168.5.255
network 192.168.199.0
mtu 9000
allow-hotplug enx803f5d086b11
iface enx803f5d086b11 inet static
address 192.168.200.254
netmask 255.255.255.0
broadcast 192.168.1.255
network 192.168.200.0
gateway 192.168.200.1

 I also modified the network configuration to set the MTU for the storage area network to 9000 on the e1000 builtin NIC on the SAN network. 



No comments: