// Name: Disable Drive Migration 
// 
// Date: 01-23-2006 
// Revision: 1.5
//   Version 1.4 fixed the misleading on/off comment - CMVC 296330. 
//   Version 1.5 change the wording about the expected value. 
// Comments: 
// This script is intended to work with controllers at Firmware 05.30.xx.xx and 
// higher only. 
// This script allows the addition of disk drives while the system is running 
// and by clearing the configuration of any drives as unused capacity 
// regardless of past configuration of these drives. 
// 
// Attention: This setting should not be left active after the new disks
// have been added to the subsystem. Leaving this setting active could 
// cause the configuration for the DS4000/FAStT to be lost if the DS4000/FAStT 
// is power cycled. Please run the EnableDriveMigration.scr after all of 
// the disks are added. IN ADDITION, DO NOT USE THIS SCRIPT IF YOU WANT
// TO PRESERVE THE DATA IN THE DRIVES THAT YOU ARE PLANNING TO ADD INTO
// THE EXISTING DS4000 STORAGE SUBSYSTEM CONFIGURATION. Please refer to
// the DS4000 adding capacity and drive migration publication for more 
// information.
// 
// This script will reboot both controllers in the FAStT unit. If your 
// hosts are configured for multi-path support, this can be done with I/O 
// running to the controllers. If your hosts are not configured for 
// redundant access you much schedule downtime before running this 
// script. 
//
// Show the current state of Drive Migration 
show "Showing the current state of Drive Migration. The return value should";
show "have bit 1 set to 0, which means drive migration is enable. This should";
show "be the default setting for the DS4000 controllers. Note: The value will";
show "be returned as a hex value. Normally, the return value will be either";
show "0x80 or 0x0 (bit7 .... bit1bit0=xxxx xx0x).";
show " ";
show controller[a] nvsrambyte[0x35]; 
show controller[b] nvsrambyte[0x35]; 
//
// Setting Drive Migration to Disable 
show "Setting Drive Migration to Disable"; 
set controller[a] nvsrambyte[0x35] = 0x02,0x02; 
set controller[b] nvsrambyte[0x35] = 0x02,0x02; 
show "Showing the new state of Drive Migration. The return value should have";
show "bit 1 set to 1, which means drive migration is disable. Please run"; 
show "the enableDriveMigrationScript.scrscript as soon as you complete the";
show "inserting of new drives into the DS4000 storage subsystem slots.";
show "Note: if the dislayed value before the setting change is either 0x80"; 
show "or 0x0, the displayed value after the change will be either 0x82 or 0x2"; 
show "(bit7 .... bit1bit0=xxxx xx1x). ";
show " ";
show controller[a] nvsrambyte[0x35]; 
show controller[b] nvsrambyte[0x35]; 
//
// Reset Controllers to make changes active 
// To prevent the controllers from restarting, add ’//’ to the beginning 
// of each of the lines below. This will comment out the restart of the 
// controllers. Important: The controllers will have to be restarted for
// the changes in this script to take effect. 
show "Resetting controller A"; 
reset Controller [a]; 
show "Resetting controller B"; 
reset Controller [b]; 
//
show "Drive Migration is now disabled. Add the new drives to the subsystem,";
show "then execute the EnableDriveMigrationScript.scr to re-enable drive ";
show "migration.";
