It is a recommended best practice to disable write cache before performing any scheduled Unity SP hardware maintenance activity or OE Upgrade. This is to avoid any potential impact in the unlikely event of a secondary issue occurring on the peer SP while the other SP is undergoing a scheduled maintenance activity or OE upgrade.
An SP hardware maintenance activity is defined as the replacement of any of the following list of parts:
Part |
---|
DIMM |
SFP |
SP |
BBU |
I/O Module |
M.2 SATA |
DPE Chassis |
Fan |
Mezzanine |
DPE PSU - Power Supply Unit |
The steps provided in this article for manually disabling write cache prior to any scheduled SP hardware maintenance activity apply to Unity OE 5.3 and lower. Write cache is automatically disabled when an SP is placed into service mode on Unity arrays running OE 5.4 and greater.
Disabling write cache is also a recommended best practice prior to performing the following upgrade activities:
Activity |
---|
Data-In Place (DIP) Upgrades |
Unity OE Upgrade (NDU) |
The steps provided in this article for manually disabling write cache prior to any scheduled Upgrade Activities apply to ALL Unity OE versions. Unity write cache is NOT automatically disabled when performing an upgrade on any Unity OE version.
The svc_cache command can be used to disable write cache, enable write cache, and display the write cache status using the three switches: --disable, --enable, and --get.
The svc_cache command is bundled with Unity OS release 5.2 and above.
For Unity OE 5.0 and 5.1 the svc_cache command must be manually loaded onto the Unity system by Dell Technical Support or an Authorized Service Provider. This will allow the cache changes to be done without the need for a root shell, and engaging a higher level of support.
The parameter used after the svc_cache command, is preceded by a -- (double hyphen) not a single - .
If the bolded commands are copied to a notepad from this KB, the double hyphen is more defined.
The svc_cache parameters listed here are explained in more detail below:
svc_cache --force-enableCacheOperations svc_cache --get svc_cache --disable svc_cache --enable svc_cache --disableCacheOperations
DETERMINING IF THE svc_cache COMMAND IS ALREADY INSTALLED
If you run one of the svc_cache commands, you can determine whether the package is installed. It responds differently depending on whether the svc_cache command has already been installed with the new commands. To test this, we use the svc_cache --get command.
If the package is not yet installed:
Running the svc_cache --get command returns the usage of the command:
19:44:58 service@APM00123456789 spa:~/user# svc_cache --get This script displays and clears the Cache Dirty or Cache Lost LUNs(CDCA) on this system. Usage: svc_cache [<qualifiers>]
19:44:58 service@APM00123456789 spa:~/user# svc_cache --get
--- ERROR: This option can only be used after enabling cache operations.
If this occurs, you must activate the commands using the following command:
svc_cache --force-enableCacheOperations
DISABLE WRITE CACHE:
Write Cache State: 3 (enabled)
Write Cache State: 7 (unknown)
Write Cache State: 8 (disabled)
See more detailed example outputs in the Additional Notes section.
The goal is to get to a state of 8 (disabled). If the output of svc_cache --get is a state of 7, this means that the dirty pages are still flushing. Rerun the svc_cache --get cmd again until the state is 8 (disabled).
If the disabling is taking some time, you can also use metrics to watch and ensure that all dirty cache pages are flushing or flushed:
uemcli /metrics/value/rt -path sp.*.blockCache.global.summary.dirtyBytes show -interval 5 -count 5
Once the svc_cache --get shows state 8, or dirty pages show 0, you may proceed with your activity.
When both SPs are back online:
ENABLE WRITE CACHE:
Finally, when you are concluded with your activity, you should disable the write cache commands:
svc_cache --disableCacheOperations
INSTRUCTIONS FOR DISABLING WRITE CACHE PRIOR TO A UNITY NON-DISRUPTIVE UPGRADE (NDU)
We strongly recommend that write cache be disabled prior to performing a Unity Non-Disruptive Upgrade (NDU, also referred to as a "code upgrade"). This ensures that, even if you encounter an unexpected system reboot during your upgrade, data integrity is far less likely to be compromised.
Additionally, we strongly recommend you print out an updated procedure from our SolVe Procedure Generator (Note: customer login is required) and reference the indicated Knowledgebase articles before you begin. This ensures that you have up-to-date information regarding any potential issues you may face during your upgrade, giving you the best chance for a successful outcome.
Steps:
EXAMPLE OUTPUTS:
svc_cache --get showing that the command set has not been installed:
19:44:58 service@APM00123456789 spa:~/user# svc_cache --get This script displays and clears the Cache Dirty or Cache Lost LUNs(CDCA) on this system. Usage: svc_cache [<qualifiers>]
svc_cache --get showing that the command set has not been enabled:
19:44:58 service@APM00123456789 spa:~/user# svc_cache --get
--- ERROR: This option can only be used after enabling cache operations.
If this occurs, you must activate the commands using the following command:
svc_cache --force-enableCacheOperations
svc_cache --get showing write cache enabled:
16:28:43 service@APM00123456789 spa:~/user# svc_cache --get execute sptool -i sptool -i output: SPA current SP-A, other SP-B execute: c4admintool -c get_cache Get Cache Info. SP WWID: wwn = 06:00:00:00:05:00:00:00:00:00:00:00:00:00:00:02 SP WWID: wwn = 06:00:00:00:05:00:00:00:01:00:00:01:01:00:00:02 System Cache Information Write Cache State: 3 (enabled) SP WWID: wwn = 06:00:00:00:05:00:00:00:00:00:00:00:00:00:00:02 System Cache Information Write Cache State: 3 (enabled) SP WWID: wwn = 06:00:00:00:05:00:00:00:01:00:00:01:01:00:00:02 ** c4admintool_main: exit CSX_STATUS_SUCCESS 16:28:48 service@APM00123456789 spa:~/user# svc_cache --get showing write cache is disabled: 16:29:00 service@APM00123456789 spa:~/user# svc_cache --get execute sptool -i sptool -i output: SPA current SP-A, other SP-B execute: c4admintool -c get_cache Get Cache Info. SP WWID: wwn = 06:00:00:00:05:00:00:00:00:00:00:00:00:00:00:02 SP WWID: wwn = 06:00:00:00:05:00:00:00:01:00:00:01:01:00:00:02 System Cache Information Write Cache State: 8 (disabled) SP WWID: wwn = 06:00:00:00:05:00:00:00:00:00:00:00:00:00:00:02 System Cache Information Write Cache State: 8 (disabled) SP WWID: wwn = 06:00:00:00:05:00:00:00:01:00:00:01:01:00:00:02 ** c4admintool_main: exit CSX_STATUS_SUCCESS 16:31:30 service@APM00123456789 spa:~/user#
svc_cache --disable:
16:28:48 service@APM00123456789 spa:~/user# svc_cache --disable execute sptool -i sptool -i output: SPA current SP-A, other SP-B execute: c4admintool -c set_cache -o disable -t write currentArg 3 argc 7 currentArg 3 argc 7 Set Write Cache Disabled SP A(0). #:2022-03-04 16:29:00.035 GMT :U:( 1:1):00007f7168fd0280:25459:Unknown:: TLDflarecons:TLDconfig.cpp :09584=>TLDconfig_SetCacheBuildTree Enable 0, Type 2, SP = 0 #:2022-03-04 16:29:00.035 GMT :U:( 1:1):00007f7168fd0280:25459:Unknown:: TLDconfig: :TLDconfig.cpp :09592=>Set cache state to disabled - 8 SP WWID: wwn = 06:00:00:00:05:00:00:00:00:00:00:00:00:00:00:02 SP WWID: wwn = 06:00:00:00:05:00:00:00:01:00:00:01:01:00:00:02 c4admintool: -TAG_REQUEST(0x10016) c4admintool: --TAG_OPERATION(0x10017) <snip> c4admintool: -------TAG_WRITE_CACHE(0x102ca) c4admintool: --------TAG_STATE(0x10079) - 8 ** c4admintool_main: exit CSX_STATUS_SUCCESS 16:29:00 service@APM00123456789 spa:~/user#
svc_cache --enable:
16:32:43 service@APM00123456789 spa:~/user# svc_cache --enable execute sptool -i sptool -i output: SPA current SP-A, other SP-B execute: c4admintool -c set_cache -o enable -t write currentArg 3 argc 7 currentArg 3 argc 7 Set Write Cache Enabled SP A(0). #:2022-03-04 16:32:47.905 GMT :U:( 0:1):00007f8011b49280:09830:Unknown:: TLDflarecons:TLDconfig.cpp :09584=>TLDconfig_SetCacheBuildTree Enable 1, Type 2, SP = 0 #:2022-03-04 16:32:47.905 GMT :U:( 0:1):00007f8011b49280:09830:Unknown:: TLDconfig: :TLDconfig.cpp :09589=>Set cache state to enabled - 3 SP WWID: wwn = 06:00:00:00:05:00:00:00:00:00:00:00:00:00:00:02 SP WWID: wwn = 06:00:00:00:05:00:00:00:01:00:00:01:01:00:00:02 c4admintool: -TAG_REQUEST(0x10016) c4admintool: --TAG_OPERATION(0x10017) <snip> c4admintool: -------TAG_WRITE_CACHE(0x102ca) c4admintool: --------TAG_STATE(0x10079) - 3 ** c4admintool_main: exit CSX_STATUS_SUCCESS 16:32:48 service@APM00123456789 spa:~/user#
svc_cache --get showing write cache enabled:
16:33:43 service@APM00123456789 spa:~/user# svc_cache --get execute sptool -i sptool -i output: SPA current SP-A, other SP-B execute: c4admintool -c get_cache Get Cache Info. SP WWID: wwn = 06:00:00:00:05:00:00:00:00:00:00:00:00:00:00:02 SP WWID: wwn = 06:00:00:00:05:00:00:00:01:00:00:01:01:00:00:02 System Cache Information Write Cache State: 3 (enabled) SP WWID: wwn = 06:00:00:00:05:00:00:00:00:00:00:00:00:00:00:02 System Cache Information Write Cache State: 3 (enabled) SP WWID: wwn = 06:00:00:00:05:00:00:00:01:00:00:01:01:00:00:02 ** c4admintool_main: exit CSX_STATUS_SUCCESS 16:33:48 service@APM00123456789 spa:~/user#