Brad MacQ's picture

Hi all, I just discovered Turnkey Linux. What a cool thing to do!! You people rock!

Anyway, I want to explore creating a file server for my company. We're small, 6 employees, 10 workstations, about 90GB of file server storage. No MS Exchange, no MS SQL Server. Just documents, graphics, etc. I've used Linux-based appliances in the past, and run Linux Mint on all our computers at home, so an Ubuntu-based system is right up my alley.

What I'd like to do is have a VirtualBox host with a TKL Fileserver - so far, vanilla. However, I'd like the data store for the file server on a separate hard drive that could be removed from the server (if needed, in time of disaster) and put into another computer so we could access the data store.

An additional benefit would be that I could build an updated Fileserver VM, boot it up, and access the data store, which would provide me with a fairly easy upgrade path, one that doesn't require backing up the data store then restoring it once the upgraded fileserver is installed.

I know I could do it without using a VM, but is it possible to access a separate hard drive from within the VM? How would you do it?

Thanks, and cheers on a great project and great product!

Jeremy Davis's picture

because I think that in some situations its a great solution. However my experience with it has been that its pretty system intensive and would definately be overkill for a simple file server. IMO TKL Fileserver appliance would be a much better fit. That would be even moreso if you plan to run inside a VM and even moreso again if the host OS is Windows in flavour (because of available system resources). OTOH if you have/plan a dedicated server (even if its only desktop hardware) then perhaps an AIO server solution such as eBox would be a good fit for a SMB such as yours. My personal preference though (as I've posted here many many times) is a headless ProxmoxVE hypervisor with Linux VMs running under OpenVZ (one of the VM engines available in PVE, it also has KVM which will support alternative OSs eg Windows). Assuming its relatively new hardware (~3-4 yrs +/-) you'll be amazed how much performance you can squeeze out and how many VMs you can squeeze in.

Anyway, back to your question... I would initially install TKL Fileserver into a VBox VM as per usual. Then format your extra HDD as a single partition: ext3 if Linux only access and if file permissions are important / FAT32 (or NTFS) for Linux & Windows access and if file permissions are not important (you should still be able to use Samba permissions under TKL). Remember if you use a Win FS you will want to occasionally run the HDD on a Windows system and chkdsk & defrag. I would then mount the physical HDD to the storage root (/srv/storage from memory) in the TKL Fileserver. How you actually allow VBox access to the physical HDD I'm not sure, but the ppl over at the VBox forums would be sure to help I reckon.

Let us know how you go.

Brad MacQ's picture

Thanks for the suggestions. I'll check out eBox and ProxMox. I've never heard of either and I'm always curious, especially when someone who's used something recommends it.

I won't be using a Windows machine as the host. It'll either be Linux or FreeBSD (which I'm most familiar with). Right now I'm playing with the fileserver appliance using VirtualBox on my Macbook Pro. Quite snappy and easy to install and work with. I'm impressed.

I've read about being able to add a virtual IDE controller to the VirtualBox machine once it's up and running. Perhaps I can do that with the second HD, partition, format and mount it, as you say, to /srv/storage.

I'll keep researching and share what I come up with. Meantime, all comments and suggestions are welcome!

Brad MacQ's picture

Per the VirtualBox manual (d'oh!), section 9.7.1:

"Starting with version 1.4, as an alternative to using virtual disk images (as described in detail in chapter 5, Virtual storage, page 87), VirtualBox can also present either entire physical hard disks or selected partitions thereof as virtual disks to virtual machines."


Off I go! Thanks!

Jeremy Davis's picture

Sounds like you're on-track to set it up, just how you want. Have fun testing eBox and PVE too!

Add new comment