Enabling Write back cache using hpacucli

Hi,

Write back cache enabled systems are mostly more optimized because writing into the cache is faster than writing into the disk. Lets look how can we enable this feature for the controller using hpacucli.

To Display :
hpacucli ctrl all show config detail

This command’s output is starting with :

Smart Array P400 in Slot 1
Bus Interface: PCI
Slot: 1  <<< This is the Slot# (We will use it to enable Write back cache)
Serial Number: PXXXXXXXXX
Cache Serial Number: PXXXXXXX
RAID 6 (ADG) Status: Enabled
Controller Status: OK
Chassis Slot:
...
Cache Board Present: True
Cache Status: OK
Accelerator Ratio: 25% Read / 75% Write
Drive Write Cache: Disabled <<< This Means Write back cache is disabled
Total Cache Size: 512 MB <<< This is the size of cache
No-Battery Write Cache: Disabled <<< This means when Battery is Not OK, WRB will be automatically get disabled.
Cache Backup Power Source: Batteries
Battery/Capacitor Count: 1 <<< One Battery is present
Battery/Capacitor Status: OK <<< Battery is OK
SATA NCQ Supported: True
....

To enable WBC please run this command :

ctrl slot=1 modify dwc=enable

When you run this command a warning message is shown about possible loss of data in the event of power failure.
Warning: Without the proper safety precautions, use of write cache on physical
drives could cause data loss in the event of power failure.  To ensure
data is properly protected, use redundant power supplies and
Uninterruptible Power Supplies. Also, if you have multiple storage
enclosures, all data should be mirrored across them. Use of this
feature is not recommended unless these precautions are followed.
Continue? (y/n) y

If no problem with this message , you can pree y and go on.

That’s all.

Good luck 🙂  

Find command tips

Deleting old files from Linux is handy for DBAs. You can do it automatically using find command.

find is a powerful binary to explore your host.

Lets see some examples :

PS: As you know  “.” means here.

find . -mtime +1      ###  Find all files which are modified more than 1 day
find . -mtime -1       ###  Find all files which are modified less than 1 day
find . -perm 644      ### Find all files whose permission is set to 644
find . -size +400k    ### Find all files whose size is more than 400 KB
find . -size -400k    ### Find all files whose size is less than 400 KB
find . -size 400k    ### Find all files whose size is 400 KB

You can automatically delete files from file system appending “-exec rm {} \;” at the end of the command like :

find . -mtime +1 -exec rm {} \;  ### Find all files which are modified more than 1 day and delete them from file system.

Good Luck 🙂