My setup uses the Proxmox hypervisor. At the workplace we’re 99% Mac users. To backup user desktop and laptop computers we only use time machine. After trying out a number of Open Source NAS solution with Time Machine capability I decided to go with OpenMediavault.
These are my specs for the KVM Openmediavault virtual machine.
Openmediavault requires a separate drive to hold the operating system. I am using the first hard disk to install Openmediavault which is 32 GB. I then have to add four 450 GB virtual hard disks which will hold the storage volume for time machine. Each drive uses a VirtIO driver for best performance. Formatted as raw disk for speed.
Installing OpenMediavault uses the default text based Debian install. Once that is complete you can use the web panel by using the IP address used during installation. The default login info is admin, openmediavault for password.
After logging you can change the default password from the General Settings menu. Then click OK to apply new setting.
Change the default login session to desired value.
I set my network setting to use a static IP by going to network then click edit.
Set correct time zone.
To get alerts from OpenMediavault I set my internal mail server’s IP address and my email address to send alerts to.
I also want my OpenMediavault server to reboot every night at 12:30 am. By adding a schedule under the power management menu.
I created a group account hold my users through the Access Right Management menu.
Then I had to create my user accounts through the same menu. When creating the usernames they should not contain any spaces. I also made sure the account won’t have shell access for security reasons.
To enable this Openmediavault install to be our Time Machine backup storage I needed to install the plugin openmediavault-netatalk by highlighting the plugin then clicking install. While on the plugins section I also installed openmediavault ClamAV and LVM2 plugins.
Next come preparing the storage volume by using the raid management tool.
Once I clicked create I am able to see the virtual disks I added earlier to this KVM virtual machine. I am going with Raid 5 to get the most storage space with redundancy. I was thinking too what is the point of creating all these virtual hard disks when in actuality everything is virtual. I tried just creating one virtual disk but Openmediavault’s Raid management tool will not allow to use only one disk.
After clicking OK I was able to see the raid disk being prepared.
To increase software Raid5 write speed I added the following into rc.local so I don’t lose the setting during a reboot. This was suggested based on this forum discussion. I found the raid tuning below fails to apply when there is an LVM volume created using the Raid drive. If this was an actual Raid controller and physical drives the result might be different.
echo 8192 > /sys/block/md0/md/stripe_cache_size
I am going to create a volume storage using the Logical Volume Management menu choosing the Raid5 disk group I created earlier. There was an issue where I was unable to delete a logical volume even though I have deleted any filesystem or shared folder associated with it using the LVM manager. But since I have Webmin installed I was able to delete it by using Webmin’s LVM module manager.
Click yes to confirm.
Next I need to create a volume group using the physical volume I just created.
Next is to create the logical volume using the timemachine_volume_group. I am using the full size available for I don’t intend to do snapshots on this volume.
Create a filesystem on the timemachine_logical_volume using EXT4. Click yes to format.
After formatting the logical volume with EXT4. I need to mount the logical volume so I can use it as a Time Machine storage. From the Filesystem menu click mount.
I am going to set quotas for each user who connects to this Time Machine share. Clicking quota > Click on username and enter values desired.
I could also check how much timemachine storage each user is using.
From under the Services menu I will setup my Apple time machine storage. Under general settings click to enable service.
For the shares tab click add > enable the following especially the one mark time machine support for this share.
Then click plus for shared folder. Choosing from drop down the logical volume which was formatted earlier. Under path will be the name (this needs to start with /) of actual folder to contain individual user time machine backups. Click OK.
Then do the same for the next window that comes. Not sure why this extra step when I already set my options earlier but anyway just Click OK.
Any Apple computer on the same network with OpenMediaVault should be able to see the share. Opening my Time Machine preferences on my Mac laptop, clicking select disk sometimes if it does not show up immediately I had to click OK the enabled settings again. If it still does not show up just keep on clicking OK.
By then it shows up as one of the available disks to use. Mine appears as OpenMediavault-KVM – AFP. Clicking on it to use disk.
I am prompted for a login. Entering the username and password I created earlier.
Time Machine on my Mac will start the process preparing backup.
Since I installed the Clamav Antivirus plugin I will schedule a scan for my Time Machine storage. Under the Services menu add a job and schedule scan time. Don’t forget to use one of the clamav mirrors to use for updating the virus signatures.
I found out during a scheduled ClamAV run for the timemachine storage backup one of my users laptop had a virus after OpenMediavault sent me an email. What a great addition to have for a NAS!
OpenMediavault’s web control panel offers a vast amount of control to manage a NAS device making it easy and fun to use. Another great Open Source project provided by OpenMediaVault.