How to 'disconnect' a drive from RAID array in a running VM

This is for discussing general topics about how to use VirtualBox.
Post Reply
memilanuk
Posts: 54
Joined: 1. Jul 2009, 18:16
Primary OS: Linux other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: openSuSE, Fedora, Ubuntu, CentOS
Location: Wenatchee, WA USA

How to 'disconnect' a drive from RAID array in a running VM

Post by memilanuk »

Not sure where this one goes... Windows host, Linux guest ;)

I have a guest VM running with one 'system' drive and then three 'data' drives in a RAID5 configuration. I wanted to test the response to a drive being removed from the array (failing) with the system in operation, as well as add one back in (ala 'hot swap'), and do other things to the array (grow it, change configuration to RAID6, etc.) Some of these are going to require reboots anyway, so I could shut the VM down and 'disconnect' one of the drives before booting up - but what I wanted to see is how the system reacts to the drive failing while under normal operation, not just on boot up. Also, any suggestions on the best way to abuse a disk image of one of the drives so as to simulate data corruption on the drive and see if it can be detected from the guest OS?

TIA,

Monte
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: How to 'disconnect' a drive from RAID array in a running VM

Post by Sasquatch »

You can't disconnect a VDI from a live VM. It has to be done when the VM is shut down so you can access the settings.

If you want to simulate data corruption, then you can attach one of the drives to a different VM and try to access the data from there by any means necessary. Then when you see some data, remove a bit and attach it to the proper VM again and see what happens.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
memilanuk
Posts: 54
Joined: 1. Jul 2009, 18:16
Primary OS: Linux other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: openSuSE, Fedora, Ubuntu, CentOS
Location: Wenatchee, WA USA

Re: How to 'disconnect' a drive from RAID array in a running VM

Post by memilanuk »

I was kind of afraid of that. I had really hoped that there was some way to forcibly disconnect a drive in away simulating failure while running, but I sure couldn't find it. Thanks for confirming that!

Monte
Post Reply