Before you throw away your old server you may be able to convert it to a NAS. This is how I saved my workplace from having to buy commercial NAS by resurrecting an old Supermicro 1U server. This was formerly used as our Windows 2003 File & Print server. The Open Source software which makes this possible is called OpenMediaVault. For the rest of this how-to I will refer to OpenMediaVault as OMV.
How to install and setup OpenMediaVault NAS for TimeMachine and NFS storage
There is no manual method to partition the drive during installation. The first time I installed OMV the server could not find the OS after the reboot. What happened was since I had all four hard drives installed during installation OMV installed the boot loader into another drive while the rest of the installation was on a different drive. As a work around I re-did the installation but this time pulling out all three hard drives while leaving one for OMV to install on. Installation is very easy just follow the prompts, once it completes you will see the console similar to the image below.
On the console will be the IP address you will use to connect to from your web browser. For security reasons I have blotted out my IP.
At the login prompt use the default login as admin for username and openmediavault for password.
After login you will need to change the session timeout to zero for now so we don’t end up constantly being logged out as we setup OMV. On the General Settings menu go to Web Administration Tab change session timeout to zero. Click save and apply.
Change the default admin password. From the Web Administration Password tab. Click save and apply.
Next will be to update the system. Click on Update Manager, click all then install. Depending on how many packages need to be updated this could take a long time. Be patient allow the installation to complete itself.
When update is complete you can close update message box.
Set time and date for our OMV NAS. From the Date & Time menu pick your time zone and set it to sync using a public time server. Click save and apply.
Setup our notification alerts to send us system reports. Put in your mail server settings and on the notifications tab choose which ones to monitor. Click save and apply.
If you want to schedule a reboot during the weekends you could do so under the Power Management menu. Click to add schedule. The save. Below I have OMV rebooting every Sunday at 1 am. Click save and apply.
Now that OMV has been installed I will also install Webmin which I can use to manage the whole server from a Web Interface. We will use Webmin later on to set per user quota when setting up Apple Time Machine. How To install Webmin click here.
OMV has available plugins which extends core functionality. Heading over to Plugins we can pick and choose which we want to install. You can choose to install all or just click the box next to your choice of plugin to install. Once your choice has been made click install. I am going to install openmediavault-clamav for virus scanning. Next will be openmediavault-netatalk, for Mac TimeMachine which we will setup later on.
Note: Don’t forget to install openmediavault-netatalk otherwise this how to will not work!
Preparing Disks for RAID
Under Storage menu go to Physical Disks. Mine shows three 1 TB disks and one 250 GB disk which is where OMV is installed. Each of the three 1 TB disks I will prepare by clicking a disk and clicking wipe. I am using a quick wipe only. Doing so will clear out any data on disk. If you look closely for /dev/sda the wipe button is greyed out to prevent you from inadvertently wiping out your installed OMV OS.
Under Raid Management click Create wait for system to scan all physical disks available for RAID use. Choose your type of RAID to use. This will depend on how many drives you have available to use. Since I only have three drives I am going with RAID5. Click save and apply.
I like to point OMV was unable to detect the on board RAID controller on my old Super Micro box but OMV was able to configure the physical drives for software raid automatically!
Choose RAID level. I am going with RAID 5. Click save and apply. The RAID disk state shows real time disk preparation it will indicate how much time left.
Let the system complete the RAID preparation before creating any shared folders. STOP here! Go grab a cup of coffee.
When the system indicates RAID is finally active you could proceed with creating your network shares.
With the RAID active we can proceed with creating a filesystem. Under File systems click create. Click top drop down to choose our RAID drive we created. Choose your file system type, I am using EXT4. Click OK. Answer yes to formatting alert.
Close the window. Let the system complete the RAID drive formatting before you’re able to share this file system.
Now that the RAID volume has been formatted the next part to do is to mount the file system. Clicking the RAID device /dev/md0 then clicking Mount.
After you click Apply the system will indicate the RAID drive is now ready to be shared.
OpenMediaVault Apple Time Machine setup
At my work place ninety nine percent of users are on Mac’s except for our last remaining Windows hold out user. We rely solely on Time Machine to backup all office Mac’s over the network. Setting up TimeMachine on OVM is very easy after installing openmediavault-netatalk plugin an apple icon will appear on the left menu, clicking on this will allow you to setup your TimeMachine volume.
Let us create a TimeMachine Share by going to menu Services > Apple Filing > Shares > Click Add. Will bring up the window below. Click on the + plus symbol.
Then click drop down arrow next to Volume. Choose the RAID drive we created earlier. Click Save.
On the next window click Time Machine Support (Enable Time Machine support for this share.) Read through the rest of the options and choose which ones to use for your setup. Click Save and apply.
To prevent TimeMachine from using up all available space on this volume enter your desired quota limit under Quota. On mine I have it set to 716800 Megabytes which is equivalent to 700 Gigs.
I wish though there was a way to enable quota per user but as of right now there is none. As a work around I went ahead and installed Webmin which I can use to set per user quota. Webmin has a neat quota module which will do the trick. From Webmin menu > System > Disk Quota.
I entered my username. The click go edit user quota.
I have set my Quota limits as shown below.
Under the General Settings make sure this is click enabled. Click save and apply.
One last thing to do is to make sure all of the Mac’s on the same network as our OMV will be able to find the Time Machine share we just created. Go to the Network menu > Service Discovery. Make sure Apple Filing is clicked enabled! Click save and apply.
Now create a user which will have access for this TimeMachine share. By default this user is a member of the users group. Under Access Rights Management > User > Click Add user fill out user info.
How to Connect Mac Laptop to OpenMediaVault TimeMachine Share
Go to System Preferences > Time Machine > Click Add or Remove Backup Disk. Under Available Disks find the TimeMachine Share we created earlier. Click disk then Click Use Disk.
Setup an NFS share on OpenMediaVault
Under Services menu go to NFS. Click settings tab and click enable. Then go to Shares tab click Add. The window below comes up. Click on the green plus sign.
When you click on the green plus sign the window below comes up. Click on the drop down arrow on Volume. Choose the RAID drive we created earlier. Create a name for your NFS share. Click on path, this will automatically populate the path to the share. Change the Privileged setting to Read/Write if you allow users to copy and save to this share. For the client part add your local network or if you limit a connecting from one IP enter it here. Click save and apply.
Testing the NFS share from my Proxmox VE hypervisor I am able to see the share. I used OMV as a storage for my Virtual Machine backups off my Promxox VE host.
If you ran into issues which related to no write access even after you have connected to your NFS share you could further control access under Access Rights Management > Shared Folders. Click on Privileges or ACL to control access.
Your TimeMachine setup in OpenMediaVault is not discoverable.
Under the Network menu > Service Discovery. Make sure Apple Filing is clicked enabled! Click save and apply
This concludes the tutorial. Go resurrect that old server you have gathering dust convert it to be a NAS using OpenMediaVault.