Category Archives: Windows Home Server

Windows 7 – TV Archive Does Not Have Permissions to Access This Folder

I recently installed Windows 7 in a virtual machine on VMware vSphere so that I could start recording TV shows again with my HDHomerun.

Everything was working fine and all of a sudden I noticed that my recorded TV shows were not being moved to my Windows Home Server (WHS).

When I checked the activity of the TV achive in my Media Center I found the following status: TV Archive Does Not Have Permissions to Access This Folder.

I checked access to the Recorded TV folder on WHS from my Media Center using Windows Explorer and it worked fine. I double checked the user settings and folder permissions on WHS and they were fine too.

I had accessed WHS from my Media Center using another account and figured that might be the cause of the issue. So I set about removing the cached credentials for the non Media Center account as follows:

Press the Windows key and R to open the run dialogue box and then enter: control userpasswords2

Click the Advanced tab and then click the Manage Passwords button.

Locate the IP address for your WHS and then expand the selection and click Remove from vault.

This resolved the issue for me.

Windows Home Server – Windows 8 (VMware) Backup and Restore

Now that I have been playing around with Windows 8 (Release Preview) for a while I was curious to see if I could install the Windows Home Server (WHS) Connector Software and perform a backup and restore.

As you can see I was able to backup my VMware Windows 8 virtual machine (VM) just fine. Similarly I did not have any issues restoring it to a new VM either.

I do not have a spare physical machine for testing though and I have read that WHS does not support restoring to a machine that boots with UEFI.

Apart from this – and the potential for driver issues during restore (for networking or storage) – I hope to be able to continue to use the WHS backup and restore feature for Windows 8. I would much prefer to be able to do this for physical rather than just virtual machines though …

My Transition From WHS (Windows Home Server) to ZFS: HP Microserver & FreeNAS 8

I’ve decided to begin my transition to a ZFS based system before my Windows Home Server (WHS) gives up the ghost. ZFS provides protection against data corruption – which is mostly what attracted me to it.

Hardware-wise I settled on the HP Microserver N40L for a number of reasons and had to accept the limitations that this (and other choices) entailed.

The main reasons that I chose the Microserver were the 4 (non hot-swap) hard drive bays and the price. Swapping drives in and out of my WHS tower system is a pain so I wanted something with drive bays that slid out to install and replace drives. As my WHS is working fine I did not want to spend a lot of money on my transition to ZFS. And because I did not have a good experience installing Advanced Format drives in my WHS box I plan to gradually de-comission it as the drives die.

The Microserver is not the most powerful machine around but I figured that it should be fine for basic ZFS file duties, as I do not plan on using advanced features such as de-duplication. To keep costs down I added 4Gb of ECC RAM to the 2Gb that the N40L came with. I also purchased 2x 2Tb Western Digital Green drives.

Upgrading the RAM requires disconnecting cables from the motherboard and sliding the motherboard out to access the RAM slots. To remove the Mini-SAS connector on the motherboard squeeze the clip and then push down before pulling the connector up.

Why did I only purchase 2 drives and not plan to set up a Raid-Z pool in my system? Well partly due to cost – but also practicality. If I create small mirrored drive pools I have fairly good redundancy and I only have to buy 2 drives to upgrade the pool if I need to in the future. Writing to a mirrored pool should not be any slower than it is with my WHS box (which has duplication turned on for all folders) and read speeds will easily be good enough for streaming media to my living room.

My setup is in fact pretty basic and I made some decisions that forced me down that path. Firstly I wanted all of the drive bays to be dedicated solely to storage. Secondly, because I am adamant about ease of hard drive maintenance I elected not to install any additional drives in the CD / DVD drive bay. This limits me to 4 storage drives and means that I will not be installing a SSD for caching functions (which would improve the storage performance). This also limited me to finding a solution that would boot from a Jump drive.

I first tried installing VMware vSphere on a jump drive and then installing Nexenta Community Edition on a small virtual hard disk (10Gb) on one of the Western Digital drives. I then created two 1.81 Tb .vmdk files and mirrored them in Nexenta. Sadly the performance was not too great.

So for the moment I have settled on FreeNAS 8 (on a 4Gb Jump drive). It was easy to install – and so re-installing should the jump drive fail should be straight-forward. I should be able to upgrade easily enough should the need arise – the idea of having the Microserver be more like an appliance – that I set up and rarely have to touch is quite appealing (no Windows updates to install and no Demigrator.exe to interrupt my media streams).

So far I have only done enough configuration to test write speeds to FreeNAS from my Windows box. Over a gigabit connection I average about 70 MB/s which is great, as that is pretty much what I am getting on my WHS box.

I’ll check the power consumption when I get a chance but I anticipate being able to run two Microservers with FreeNAS for more or less the same consumption as my single WHS box.

I’ve found that FreeNAS 8 has had some mixed reviews – which does concern me a little. My setup is probably as simple as it could be though. Never-the-less I do plan to do some testing before I migrate any data to it.

My to-do list is as follows:

  • Set up ZFS Data Sets, User groups and Users to control access.
  • Copy data to my ZFS mirror and then remove and format one drive from the pool and test adding the drive back in to the pool.
  • Test importing my mirrored pool back into a new FreeNAS installation.
  • Configure FreeNAS to send alerts to my Gmail account.
  • Configure the SMART schedule to check my drives.

That should be enough to keep me busy for a while … and will hopefully leave me feeling quite happy about gradually moving my data from my WHS box!

How To Create A Virtual Floppy For VMware vSphere

Last week I needed to create a virtual floppy disk to load drivers for a Windows XP Virtual Machine (VM) during the boot process. This is not a scenario that crops up too often – but in this case I wanted to restore a physical Windows Home Server backup into a VM.

I downloaded the 30 day trail version of WinImage and created a virtual floppy with the drivers that I needed as follows.

Click New and then accept the defaults for a virtual floppy:

If you want to create folders in your virtual floppy click Image then Create folder:

To add files click the Inject icon:

Browse to the location of the files you want added to the virtual floppy and select them to add them:

Here you can see that I have multiple folders created each with a different set of drivers:

To save your virtual floppy click File and then Save As:

Type a file name for the virtual floppy and add the .flp file extension to the file name.

This allowed me to take the vSphere Windows XP drivers from a VM that was backed up on WHS and put them in a virtual floppy. With the virtual floppy I was able to boot the WHS restore CD in VMware vSphere are restore a physical Windows XP WHS backup to a VM.

It’s a handy way of moving WHS backups to a VM so that you can “retire” a backup from WHS to vSphere and make room for other machines to back up.

Ubuntu Server 10.4 Lucid – Backing up Feng Office 1.7.4 (Community Edition)

The Feng Office Wiki has instructions for backing up the Feng Office installation folder and the MySQL database. This can either be done with scripts and a cron job or with a plugin that allows for configuration via the Administration web console and a cron job.

In this post I will look at the scripts and cron job – I intend to look at the plugin later on.

Backing up Feng Office for me this means backing up /var/www/feng_community as well as the fengdb database.

In my previous post I mounted a share on my Windows Home Server in Ubuntu Server using the following mount point /mnt/whs-backup.

Note: Your Feng Office installation folder, database variables and backup destination may differ so adjust them as required.

To run a nightly backup I need two brief scripts, a secure file that contains the MySQL username and password, and two cron entries to run the backups.

Update: In the comments potion pointed out that the cp command does not file owner/group or permissions. So I have added his suggested scripts for the tar command.

Here are the explanations of the tar switches used:

-c, --create               create a new archive
-f, --file=ARCHIVE         use archive file or device ARCHIVE
-x, --extract, --get       extract files from an archive

Note: the following two scripts are saved in my /home/username folder.

The first script will back up /var/www/feng_community:

Original script:

#!/bin/bash sudo cp -R /var/www/feng_community /mnt/whs-backup

Tar script:

today=$(date '+%d_%m_%y')
sudo tar -cf /mnt/whs-backup/"$today"_feng_community.tar 

I saved this file as

The second script will backup the fengdb database and query a secured file /etc/fengdb.cnf for MySQL credentials:

mysqldump --defaults-extra-file=/etc/fengdb.cnf fengdb >

I saved this file as

Now we need to make these two scripts executable:

chmod +x backup*.sh

Create a file called /etc/fengdb.cnf:

sudo nano /etc/fengdb.cnf

Add the following lines using your MySQL fengdb username and password:

host = localhost
user = fenguser
password = yourfengdbpassword

In nano press Ctrl + O and then Enter to save and then Ctrl + X to exit.

Secure /etc/fengdb.cnf as follows:

sudo chmod 600 /etc/fengdb.cnf

At this point we could execute the two scripts manually and backup Feng Office to our Windows share.

To automate the backup we use cron. This is what my cron settings look like (my two scripts are set to run everyday around 1am).

# m h  dom mon dow   command
15 1 * * * /home/username/
*  1 * * * /home/username/

Change username to your Ubuntu Server username.

To edit your cron settings use the following command:

sudo crontab -e

You can use my settings or you can easily generate your own cron settings using the online cron generator.

If you have configured Feng Office to communicate with email accounts such as Gmail be prepared for the backup of /var/www/feng_community to take a little while (depending of how many email and attachments have been downloaded).

As with any backup we also need to know how to restore the backups. For this we need two scripts. The first I named

#!/bin/bash sudo cp -R /mnt/whs-backup/feng_community /var/www

Tar command:

sudo tar -xf /mnt/whs-backup/*_feng_community.tar 

In the tar restore above the * refers to the date of the backup.

The second script (to restore the MySQL database) I named

mysql --defaults-extra-file=/etc/fengdb.cnf fengdb <

Again, make both of these scripts executable:

chmod +x restore*.sh

For the record I did test the restore process before posting! Please take precautions when you test restoring your backups (and make sure that you change the appropriate variables in the scripts to match your environment).

Sources: Feng Office Wiki, serverfault.

Ubuntu Server – Mounting a Windows Share Using the Command Line

When I started writing this post I wanted to mount a Windows share in Ubuntu and backup files from Ubuntu  onto my Windows Home Server (WHS).

Since then I have begun looking at other options like TimeDicer and rdiff-backup - so I have not decided yet on which path I will take to backup /var/www directories and different MySQL databases.

Nevertheless I did succesfully get a share on my Windows Home Server (WHS) mounted, as follows.

First I chose to create a new user on WHS called vmbackup and this process created the vmbackup user share //WHS/Users/vmbackup.

Now on to the steps that we need to complete on Ubuntu Server.

I like to use nano to edit files on Ubuntu Server – and you can install nano as follows:

sudo apt-get update
sudo apt-get install nano

Because I want to backup to a Windows share I also need to install the Samba filesystem:

sudo apt-get install smbfs

The next step is to edit the /etc/hosts file and add a reference that points to my Windows PC:

sudo nano /etc/hosts

The IP address of my WHS is so I added the following line to my /etc/hosts file: whs

In nano press Ctrl + O and then Enter to save and then Ctrl + X to exit.

Now create a local directory that we will use to map our WHS share to:

sudo mkdir /mnt/whs-backup

To mount the Windows share we need to edit /etc/fstab with the path to the Windows share and the local mount point as follows:

sudo nano /etc/fstab

Add the following line to /etc/fstab:

//whs/users/vmbackup  /mnt/whs-backup  cifs exec,credentials=
/etc/cifspw,rw,uid=ubuntu-username 0 0

Note that the above line points to /etc/cifspw for credentials for mouting the Windows share. Also note that the uid refers to your Ubuntu Server username. If you do not include a uid and username then only the root user will have write permissions to the Windows share.

Create the /etc/cifspw file:

sudo nano /etc/cifspw

Enter your credentials to the Windows share:


Obviously you will need to specify your own username and password.

Secure /etc/cifspw as follows:

sudo chmod 600 /etc/cifspw

Mount the Windows share with the following command:

sudo mount -a

At this point reboot Ubuntu Server so that it can pick up permissions for the Windows share:

sudo reboot

Quickly check that you have write permissions as follows:

cd /mnt/whs-backup
touch text.txt

You should be able to create the test.txt file without any issues.

Hopefully this will help you is you are having issues mounting a Windows Share in Ubuntu.

Sources: industriousone and the Ubuntu Forum,

Installing FreeNAS 8 on VMware vSphere (ESXi)

FreeNAS is an Open Source Storage Platform and version 8 benefits not only from a complete rewrite – it also boats a new web interface and support for the ZFS filesystem. It is also worth mentioning that FreeNAS supports Advanced Format drives (something that my Windows Home Server does not).

The features of ZFS are many but it is the data integrity and large capacity support that caught my attention when I first started to ponder alternatives to Windows Home Server (WHS).

The other ZFS contender that has piqued my interest is Nexenta whose community edition has an 18TB limit (although you can run the Nexenta Core version with a community developed GUI without any storage limit). One key difference to be aware of (and these will be moving goalposts) are the versions of ZFS that both of these projects are running. At the moment, for example, it looks like FreeNAS does not support de-duplication of data while Nexenta does.

FreeNAS is designed to be run from a flash drive which is nice in that all of your hard drives can be dedicated to storage. A 1GB drive is recommended as the minimum requirement and this can hold several FreeNAS images – so you can roll back to a previous installation if you experience troubles during an upgrade for example. I will be installing FreeNAS to a 1GB virtual hard disk instead.

I have yet to decide between FreeNAS and Nexenta yet – but for today wanted to get the ball rolling installing FreeNAS 8 in VMware vSphere 4.x.

First download the FreeNAS 8 .iso and copy it to your vSphere datastore.

Create a new virtual machine and specify the following Guest Operating System properties – Other and FreeBSD (64-bit).

I configured 4Gb of RAM with the default LSI Logic Parallel SCSI controller with a 1GB vitrual hard disk.

Finally point the virtual CD-ROM of the virtual machine to the uploaded FreeNAS .iso and boot the virtual machine:

Press 1 to begin installation:

Press Enter to install to default device:

Press Enter again to install to the VMware virtual disk:

Press Enter again to confirm installation to hard drive (installation to USB is the preferred method for FreeNAS but this is not practical on ESXi):

Wait for FreeNAS to copy the image to the virtual drive:

Reboot the virtual machine:

As you can see there are various options for configuring FreeNAS when it boots. For now I will take a quick look at the Web interface.

Open Firefox and browse to the IP address of your FreeNAS installation (as detailed in the previous screenshot).

Use admin for the Username and freenas for the password.

Welcome to the FreeNAS interface!

As you can see there are plenty of options available to configure FreeNAS and (now that installation is complete) that will be the topic of a later blog-post.

Windows Home Server – Once Upon a Failing Hard Drive

A few of days ago I began experiencing multiple error messages with a failing hard disk on my Windows Home Server (WHS). Dealing with a bad drive can be a pain – particularly with the downtime experienced – but it is for scenarios like this that I like to have duplication turned on for all my WHS folders …

The first sign of trouble was that my Media Center could not access and files on WHS. I checked Event Viewer and found lots and lots of disk errors like this:

The device, \Device\Harddisk2, has a bad block.

The Event ID was 7.

At this point I was already anticipating that I would probably have to replace the drive. For good measure I ran chkdsk /r to check all my drives and rebooted.

Then I started to see tons of errors that looked like this:

File record segment 10001 is unreadable
File record segment 10002 is unreadable

Once these had finished checkdisk started to repair these issues but that process hung so I had to give up on that.

At this point I turned my WHS off until the replacement drive arrived (I added the drive to the storage pool without any issues).

As I mentioned earlier I have duplication turned on for all my folders on WHS – for me it is a small price to pay for being able to have WHS rebuild my data from the duplicate files and get me back to where I was without too much fuss. It does however take a while to do this.

With a new drive installed I set about trying to remove the bad drive from the storage pool. Event Viewer told me that it was harddisk 2 that was having issues and thanks to my previous organization this was drive 2 in my tower connected to Sata cable number 2 on my motherboard.

I was also pretty sure that harddisk 2 was the second disk listed in the Storage tab of the WHS console – but I was not 100% confident as I had other drives with the same name listed in my storage pool too. So I downloaded and installed the free version of HDTune to double check. Sure enough the second drive in my HDTune list did not respond when I tried to list it in HDTune. HDTune let me get the serial numbers for all the working drives and by a process of elimination I used this to double-check the problem drive (I have the serial numbers written on the rear of each drive so that I can see them when I open the case).

I hoped to be able to remove the problem drive with a few clicks in WHS but I found that WHS could not remove the drive due to “file conflicts”. So I shutdown and physically disconnected the drive.

With the drive disconnected I rebooted WHS and tried to remove the now missing drive from the pool. Again I got an error message about file conflicts. I had a look around and saw that WHS was calculating sizes in the Storage tab (which I figured that was to be expected). However, when I clicked on the Network Critical button I found that I was getting an alert for each folder that contained files from the ‘missing’ drive that I had removed. I had to wait for WHS to work through all the files and folders that it expected to see on the missing drive before it would begin removing the missing drive from the storage pool.

Even then this process failed due to file conflicts. The culprits I found were my Media Center and the online backup software that I had installed on WHS. I shut these both down and rebooted WHS and finally the missing drive could be successfully removed.

The drive that I removed was a 2TB drive and it took a long time for WHS to repair itself. I probably had about 5 days of downtime in total which is far from great.

Having WHS repair itself from folder duplication saved me a lot of hassle though as there is nothing like trying to organize a couple of TB of files from a backup.

The only thing that I lost were the backups of my Windows computers. I plan to install an add-in called Windows Home Server Backup Database-Backup (BDBB) so that I can backup my backups to a network share on another machine and/or enable duplication on my WHS.

For now I am just happy that WHS did its job. Folder duplication can be a life saver when a drive fails – but I still have a backup (offsite) of my most critical data.

Amahi – Version 6 Released

Amahi (a linux based home server) reached version 6 today boasting many new improvements and features.

Amahi is now based on Fedora 14 and sees updates to the storage pooling technology (Greyhole), App installation reliability, and an improved User Interface.

The most interesting improvements / features include:

  • Greyhole (storage pooling technology) has been updated to version 0.9.
  • Greyhole now uses MySQL as a back-end with a 10x performance increase.
  • Webapp aliases make it much easier to host applications externally on the internet.
  • App installation now relies on distributed mirrors.
  • Amahi Sync – an application that allows users to sync, share and backup files online (Pro or Ninja account required).

A Pro account currently costs $7.95 per month with 50Gb of online storage, while Ninja costs $15.95 per month for 150Gb. To me this seems a little costly compared to some of the other cloud storage options that are out there.

Amahi 6 certainly looks like an interesting proposition to anyone looking for a Linux alternative to Windows Home Server

Windows Home Server – Problem With WHSBackup.exe

Tonight I decided to take a quick look at my Windows Home Server (WHS) because my recorded TV shows (stored on WHS) were stuttering when played through my Media Center PC. This is something that I had already attempted to tackle here, with demigrator.exe.

What I found was that the WHSBackup.exe process was using 50% of my CPU for long periods of time. A client backup was actually running when I looked and then the WHSBackup service failed when it got to 99%.

I rebooted WHS and then took a look in the WHS Console to discover that no machines had been successfully backed up for 6 days. So I manually set a backup running and it did complete, so I am hoping that the reboot has fixed whatever the issue was, at least for now.

Otherwise the WHS Console reports that all my drives are healthy and my system is up-to-date with Windows Update – so fingers crossed for now!