VirtualBox trashed my drive

I am constantly amazed at the dichotomy of quality in Free Open Source Software.  Some is amazingly powerful, well tested, and supported.  However, much is not and unfortunately there are times when software you might expect to be very stable and well made, isn’t.  For example, I was using Oracle VirtualBox this past weekend to create a virtual mahcine equivalent of a limited number of physical machines that are used for a very specialized task.  Each physical machine is an exact clone of the others so a virtual machine is a naturally superior solution.  I booted a live Linux CD in the virtual machine and partitioned its disk.  Then I connected a physical hard disk to the VM via a USB ↔ SATA adaptor and mounted the hard disk as read only while running the live CD and proceeded to manually construct the virtual hard disk by porting over the contents of the physical disk.  After porting part of the contents over I decided to test the new VM by rebooting it so I unmounted the VM and physical disk volumes and rebooted.  Later, after testing the VM, I booted the live CD again and attempted to mount the physical hard disk only to find that the partition table was trashed.  This surprised me because there were never any writes to the physical disk and its volumes were mounted read only.  I manually reconstructed the partition table on the physical hard disk and found the the volumes were trashed.  Something went terribly wrong along the way.  I know that most will assume that it was operator error and I must have made a mistake, but I assure you that I was extremely careful to prvent this.  My  USB ↔ SATA adaptor also has no problems I know of.  I’ve been using it for about two years and have never had any problems working with either PATA or SATA drives in both Windows and Linux.  All I can figure is that VirtualBox falls in the not so well developed and/or tested category – but to be fair, I got exactly what I paid for.  Let this be a lesson to all others out there that are banking their busniess on free software.  Be careful and do your due dilligence.  If you’ve got money or jobs on the line then it’s probably best to stick with very old and well tested free software and/or software with commercial backing.  I’ve found that commercially backed software is typically much more polished and bug free because when it’s not the company producing it loses business (or goes out of business), so they’re highly motivated and responsive to paying enterprise level customers. Don’t get me wrong; there are many very responsive FOSS developers out there that are even more responsive than a corporation and who make very polished very high quality software. This post is not intended to imply that FOSS is somehow beneath propritary software – because it is not. Both are simultaneously awesome and flawed.

P.S.  I was able to build the VM using VMware and encountered no problems.  To my surprise, the VMware VM also seems to run quite a bit faster, but this could be caused by the configuraiton or something.  I didn’t spend time analyzing it to find out.

P.P.S.  I got lucky.  Fortunately I had one clone of the physical hard disk that was trashed  so I didn’t lose the machine.  But if I hadn’t had that clone then I would have suffered a severe unrecoverable loss.

About these ads
  1. #1 by ThisNameIsFalse on October 9, 2010 - 2:05 pm

    > I booted a live Linux CD in the virtual machine
    > and partitioned its disk. Then I connected a
    > physical hard disk to the VM via a USB-SATA adaptor
    > and mounted the hard disk as read only
    > while running the live CD and proceeded to
    > manually construct the virtual hard disk by
    > porting over the contents of the physical disk.

    You should have done the read-only mount operation from the host operating system (outside VirtualBox, I assume outside VirtualBox was also a Linux system), and never inside VirtualBox.

    After, you should share the directories of the read-only disk, so LiveCD inside VirtualBox could get the files by virtual network (vboxfs, or some real netowrk protocol like SAMBA, http://FTP...).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: