Thursday, 21 October 2010

Moving files

This morning I went out on a short walk round the nearby field to try and get some sunrise photos. It was a nice sunrise, but the clouds were a bit far away. Really could have done with more clouds.

When I got back home I uploaded a few photos to my photo website, but then my Ubuntu VM kept complaining that it only had 1.7GB of free space.

So when the photos had finished uploading and the website had processed them, I decided to expand the VM's virtual hard drive. I loaded up the VMWare Server 2 web interface, but when I tried to expand the drive size I got the error
Insufficient disk space on datastore ''.
I had enough free space on the drive where the datastore was located, but only about 5-10GB. I thought that maybe it needed some extra spare capacity for expanding the virtual drive, or maybe it creates a new virtual drive and then deletes the old one.

So I went through some folders deleting old stuff I didn't need any more, then tried expanding the virtual hard drive in VMWare Server 2 again. But I still got the same message about Insufficient disk space on datastore ''.. I did some googling and found lots of info, but they all seemed to be about VMWare ESX, and the solutions didn't seem to be applicable to my situation.

I checked what the VMWare Server 2 Web Interface said about the free space level of the datastore, and while it was over 9000 (MB), it was less than the actual free space on the drive. I refreshed the page, but it still reported the same amount of free space.

So I restarted the PC, and then the VMWare Server 2 Web Interface finally reported the correct amount of free space for the datastore. I tried expanding the virtual hard drive again, thinking that maybe it didn't work previously as VMWare wasn't detecting the amount of free space correctly, but I still got the same message Insufficient disk space on datastore ''..

In the afternoon I finished adding metadata to all the photos that I had taken a couple of weeks ago, and then moved them across from my 'Needs sorting' folder, which is on the same drive as the VMWare datastore, to my 'Pictures' folder, which is on a different drive.

When that was done I did a backup and checked my email.

When doing the backup, I noticed that one of the backup drives had much less free space than the drive in the PC that it was backing up, even though it was meant to be a mirror backup. The Recycle bin said it was empty, but when I checked the folder sizes on the backup drive and the computer drive, I found they were both the same.

So it was like there was some hidden files on the backup drive that were filling it up. It turned out there was - it seems that the Recycle bin on the computer doesn't register drives plugged in after you've already booted. So while there were files in the Recycle bin on the backup drive, you couldn't see them.

The solution was to either
  • In Windows Explorer go to Tools > Folder Options, and then untick 'Hide protected operating system files (Recommended)' on the view tab. On the disk root there now appears a hidden Recycle bin folder that you can access and delete its contents.
  • Otherwise, if you right-click on the drive in Windows Explorer and choose 'Properties', and then on the 'General' tab there is a 'Disk Cleanup' button you can use to empty the recycle bin.
After doing this, the backup drive still had less free space than the drive it was mirroring though. I thought that if it was due to fragmentation, then this should be reflected in the 'size on disk' of the folders (which were the same as the drive being mirrored). Still, I thought I would check fragmentation in case this wasn't as I thought.

But when I analysed the drive, it showed 0% fragmentation. So both disks have the same amount of fragmentation, the same amount of data, and the same size, but differing amounts of free space. Weird.

When the backups were complete I tried expanding the virtual hard drive for my Ubuntu VM again. This time it worked, though it took absolutely ages. I think it must be that VMWare Server 2 requires at least the size of how large the resized disk will be in free space before it will allow you to resize the disk. This would mean that if you had a VM with a 100GB drive, and you wanted to resize it to 101GB, you would need at least 101GB in free space, even though you're only increasing the disk size by 1GB.

When the drive resize was finally finished, I then had to move the VM partitions about and extend the main partition using gparted. Again, this took quite a while to do.

When that was done I wrote up this long, boring, useless blog post.

In the evening I went out to try and get some photos of the sunset. It was a nice firey red sunset, but unfortunately the area of the clouds being lit up was rather limited and quite far away.

After dinner I watched an episode of Power Rangers, two Masked Rider episodes, and one Chojin Sentai Jetman episode with Belly.

After that I watched Autumn Watch with Clare and Brian (and Belly watched the first half too). Then I uploaded some more photos from my walk two weeks ago and geo-coded the photos from today.

No comments: