Page 1 of 1

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

Posted: 12. Oct 2010, 02:14
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

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

Posted: 13. Oct 2010, 20:06
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.

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

Posted: 14. Oct 2010, 17:21
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