Reset Search
 

 

Article

How to check a VDX for CF Issue using the “badblocks” command

« Go Back

Information

 
TitleHow to check a VDX for CF Issue using the “badblocks” command
Objective
How to check a VDX for CF Issue using the “badblocks” command
Environment
VDX 6740 Product family only
NOTE: "badblocks" is a linux command and not tied to NOS, therefore this command will execute on a 6740 running any version of NOS
Procedure
The following process is Potentially Intrusive and should be executed with caution.

Any customer planning to run the "badblocks" command should be prepared with a spare as the check itself can cause an outage including, but not limited to; reboot, rolling reload, lost partition, or failed Compact Flash.

This process should only be executed in a Scheduled Activity (SCA) as this is a possible intrusive procedure that may trigger the to switch reboot/fail and need to be swapped with spare replacement switch.
 

Initial required data:

  1. Enable telnet for standby partition
Example:
RB2# 
RB2# conf t
Entering configuration mode terminal
RB2(config)# rbridge 2
RB2(config-rbridge-id-2)# telnet server standby enable
  1. Enable root login
Example:
RB2(config-rbridge-id-2)# root enable
  1. Validate which partition is standby
Example:
RB2# show ver
 
Network Operating System Software
Network Operating System Version: 6.0.2
Copyright (c) 1995-2015 Brocade Communications Systems, Inc.
Firmware name:      6.0.2g
Build Time:         19:34:56 Jan  3, 2018
Install Time:       14:03:57 Oct  9, 2018
Kernel:             2.6.34.6
 
BootProm:           1.0.1
Control Processor:  e500mc with 4096 MB of memory
 
Slot    Name    Primary/Secondary Versions                         Status
---------------------------------------------------------------------------
SW/0    NOS     6.0.2g                                             STANDBY
                6.0.2g                                              
SW/1    NOS     6.0.2g                                             ACTIVE*
                6.0.2g

How to check CF for Bad Blocks:

  1. Login as root and issue the “badblocks -v /dev/sda[1|2]” command on both the Primary and Backup of the Active Partition:
Example:
root> badblocks -v /dev/sda1   
root> badblocks -v /dev/sda2  
Expected output while command is running:
root> badblocks -v /dev/sda1                                      
Checking blocks 0 to 1951743
Checking for bad blocks (read-only test):  98.85% done, 1:13 elapsed
Expected output once command is complete (no issue)    
root> badblocks -v /dev/sda1
Checking blocks 0 to 1953791
Checking for bad blocks (read-only test):  done                                
Pass completed, 0 bad blocks found.
  • In total for all 4 partitions to be checked the process should take around 10 min.
  • If any single test runs for over 20 min it is an indicator that the Compact Flash is marginal and on the verge of failing.  In this scenario, use the key combo CTRL+C to return to the command line and RMA the switch.

Telnet to the Standby partition

  • Referring back to your “show version” output depending on which slot is in standby use the following IP address:
    • If SW/0 is STANDBY use IP 127.2.1.0
    • If SW/1 is STANDBY use IP 127.2.2.0
Example:
                root> telnet 127.2.1.0
Trying 127.2.1.0...
Connected to 127.2.1.0.
Escape character is '^]'.
 
Network OS (RB2)
 
6.0.2g
 
RB2 login: root
Password: ******* (fibranne)
  1. Repeat process on Primary and Secondary of Standby Partition
Example:
root> badblocks -v /dev/sda1   
root> badblocks -v /dev/sda2
 

How to consolidate the process into a single command:

 
To simplify the process you can consolidate the commands into a single string to check both Active and Standby Partitions on the local switch:
 
Setup the environment to ensure the script runs properly:
sw0# term len 0
sw0# term time 0
sw0# show version
sw0# unhide foscmd
Password: ******** (fibranne)
sw0# fos bash | no
Access FOS Bash and run the following:
bash-2.04# df; date; /usr/bin/rsh 127.2.1.0 /sbin/badblocks -v /dev/sda1; /usr/bin/rsh 127.2.1.0 /sbin/badblocks -v /dev/sda2; /usr/bin/rsh 127.2.2.0 /sbin/badblocks -v /dev/sda1; /usr/bin/rsh 127.2.2.0 /sbin/badblocks -v /dev/sda2
 
Example:
RB2# term len 0
Successfully set This Session Terminal Length to  0.
RB2# term time 0
Successfully set This Session Idle Timeout to 0 seconds.
RB2# fos bash | no
<adblocks -v /dev/sda1; /usr/bin/rsh 127.2.2.0 /sbin/badblocks -v /dev/sda2  
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/root              1923084   1061988    763408  58% /
/dev/sda2              1921036    853404    970048  47% /mnt
Fri Oct 19 19:23:24 GMT 2018
Checking blocks 0 to 1953124
Checking for bad blocks (read-only test): done                                
Pass completed, 0 bad blocks found.
Checking blocks 0 to 1952767
Checking for bad blocks (read-only test): done                                
Pass completed, 0 bad blocks found.
Checking blocks 0 to 1953791
Checking for bad blocks (read-only test): done                                
Pass completed, 0 bad blocks found.
Checking blocks 0 to 1951743
Checking for bad blocks (read-only test): done                                
Pass completed, 0 bad blocks found.
bash-2.04#
 
  • In total for all 4 partitions to be checked the process should take around 10 min.
  • If any single test runs for over 20 min it is an indicator that the Compact Flash is marginal and on the verge of failing.  In this scenario use the key combo CTRL+C to return to the command line and RMA the device.
For additional confirmation, customers can upload the output of the following for Engineering to review:
 
bash-2.04# date && cat /sys/devices/virtual/block/sda/sda1/stat; date && cat /sys/devices/virtual/block/sda/sda2/stat; sleep 15; /usr/bin/rsh 127.2.2.0 date && /usr/bin/rsh 127.2.2.0 cat /sys/devices/virtual/block/sda/sda1/stat; /usr/bin/rsh 127.2.2.0 date && /usr/bin/rsh 127.2.2.0 cat /sys/devices/virtual/block/sda/sda2/stat

If a firmware upgrade is needed, please review the NOS Firmware Upgrade Best Practices KB article. 
 
Additional notes

Feedback

 

Was this article helpful?


   

Feedback

Please tell us how we can make this article more useful.

Characters Remaining: 255