Lab 4 Disk Mirroring Objective : Practicing disk mirroring commands and their effect on selected columns of master..sysdevices. 1. Initialize a new test device using the command: disk init name = "test", physname = "C:\devices\sap\test.dat", size=5120, vdevno=10 This inserts the following values into columns of master..sysdevices: name phyname
mirrorname status
test C:\devices\sap\test.dat NULL
2
Status 2 indicates that the device is a physical disk. Since the device mirrored bit (64) is off and the mirrorname column is null, this device is not mirrored.
2. Mirror the test device: a. Enable Disk Mirroring if not done already sp_configure 'disable disk mirroring', 0 b. Mirror the Device disk mirror name = "test", mirror = "C:\devices\sap\test.mir" This changes the master..sysdevices columns to: name phyname
mirrorname
status
test C:\devices\sap\test.dat C:\devices\sap\test.mir 738 Status 738 indicates that mirroring is currently active (512) on this device. Reads are mirrored (128), and writes are mirrored (64) and serial (32). The device is a physical disk (2).
3. Disable the mirror device (the secondary side), but retain that mirror: disk unmirror name = "test", side = secondary, mode = retain name phyname
mirrorname
status
test C:\devices\sap\test.dat C:\devices\sap\test.mir 2274 Status 2274 indicates that mirror device has been retained (2048) but mirroring has been disabled (512 bit off), and only the primary device is used (256 bit off). Reads are mirrored (128), and writes are mirrored (64) and serial (32). The device is a physical disk (2).
4. Remirror the test device: disk remirror name = "test" This resets the master..sysdevices columns to: name phyname
mirrorname
status
test C:\devices\sap\test.dat C:\devices\sap\test.mir 738 Status 738 indicates that mirroring is currently active (512) on this device. Reads are mirrored (128), and writes are mirrored (64) and serial (32). The device is a physical disk (2).
5. Disable the test device (the primary side), but retain that mirror: disk unmirror name = "test", side = "primary", mode = retain This changes the master..sysdevices columns to: name phyname
mirrorname
status
test C:\devices\sap\test.dat C:\devices\sap\test.mir 482 Status 482 indicates that mirroring has been disabled (512 bit off) and that only the secondary device is used (256). Reads are mirrored (128), and writes are mirrored (64) and serial (32). The device is a physical disk (2).
6. Remirror the test device: disk remirror name = "test" This resets the master..sysdevices columns to: name phyname
mirrorname
status
test C:\devices\sap\test.dat C:\devices\sap\test.mir 738 Status 738 indicates that mirroring is currently active (512) on this device. Reads are mirrored (128), and writes are mirrored (64) and serial (32). The device is a physical disk (2).
7. Disable the test device (the primary side), and remove that mirror: disk unmirror name = "test", side = "primary", mode = remove This changes the master..sysdevices columns to: name phyname
mirrorname
test C:\devices\sap\test.mir NULL
status 2
Status 2 indicates that the device is a physical device. Since the mirrorname column is null, mirroring is not enabled on this device.
8. Remove the test device: sp_dropdevice test