For this to work you will need a number of RAID0 disks that you will rotate by plugging/unplugging them.
On HP smart arrays there is no option to remove gracefully a RAID0 unit, and moreover it will place the unit in a "dirty" configuration upon reconnect, even if there was no I/O at the time of disk removal. This is quite a shame, so if you need a more robust solution, go for a D2D disk solution based on LSI 3Ware for instance.
Basically, there are two scheduled tasks, one for removal, and the other for reconnect. The first script will :
- Unmount the drive from the system using diskpart
- Tell the HP smart array to ignore the status of the disk and make it online anyway (you can check the status in ACU before and after the first subtask execution).
- Make it online and mount it in Windows (using diskpart)
dim oshell set oshell = createobject("wscript.shell") oshell.run "diskpart /s diskpart-remove.script",0, true
The diskpart "diskpart-remove.script" file :
select volume 3 remove select disk 1 offline disk
And for reconnect :
dim oshell set oshell = createobject("wscript.shell") oshell.run chr(34) & "C:\Program Files (x86)\Compaq\Hpacucli\Bin\hpacucli.exe" & chr(34) & " ctrl slot=0 ld 2 modify reenable forced",0, true wscript.sleep 60000 oshell.run "diskpart /s diskpart-add.script",0, true wscript.sleep 10000 oshell.run "diskpart /s diskpart-add2.script",0, true
The diskpart "diskpart-add.script" file :
rescan select disk 1 online disk
and finally, the diskpart "diskpart-add2.script" file :
rescan select volume 3 assign
Note :
On Windows 2008 R2 (did not test on 2008) the diskpart "assign" command will mount the volume on the same drive letter it had at the moment of the diskpart "remove" command.
Do not forget to change the disk/volume IDs according to your configuration, and make sure that there are no I/O (backups) at the moment of drive disconnect !
I hope you will find these scripts useful !
No comments:
Post a Comment
Fell free to comment : share your opinion and experienced, provide feedback, help me to correct mistakes, and ask for help if you need any !