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:

#!/bin/bash
today=$(date '+%d_%m_%y')
sudo tar -cf /mnt/whs-backup/"$today"_feng_community.tar 
/var/www/feng_community

I saved this file as backup-feng-community.sh

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

#!/bin/bash
mysqldump --defaults-extra-file=/etc/fengdb.cnf fengdb >
/mnt/whs-backup/fengdb.sql

I saved this file as backup-fengdb.sh.

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:

[client]
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/backup-feng-community.sh
*  1 * * * /home/username/backup-fengdb.sh

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 restore-feng-community.sh:

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

Tar command:

sudo tar -xf /mnt/whs-backup/*_feng_community.tar 
var/www/feng_community

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

The second script (to restore the MySQL database) I named restore-fengdb.sh:

#!/bin/bash
mysql --defaults-extra-file=/etc/fengdb.cnf fengdb <
/mnt/whs-backup/fengdb.sql

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 192.168.0.50 so I added the following line to my /etc/hosts file:

192.168.0.50 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:

username=vmbackup
password=password

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.