How Can I Modify the dyntrk and fc_err_recov Parameters for FC HBAs?
You can modify the dyntrk and fc_err_recov parameters for FC HBAs using the following methods as required:
Method 1
If the host can be restarted, use method 1 to modify the parameters.
- Run the chdev -l fscsiX -a dyntrk=yes -P and chdev -l fscsiX -a fc_err_recov=fast_fail -P commands to modify the attributes of all HBAs that connect to switches.
-bash-3.00# chdev -l fscsi0 -a dyntrk=yes -P fscsi0 changed -bash-3.00# chdev -l fscsi0 -a fc_err_recov=fast_fail -P fscsi0 changed
- Restart the host for the modification to take effect.
Method 2
If the fscsi device connected to Huawei storage has no virtual disks or has virtual disks that can be deleted, use method 2. If it has virtual disks that cannot be deleted or may not be deleted, use method 3 instead.
- Run the rmdev -l fscsiX -R command to set the states of all fscsi devices connected to Huawei storage to Defined.
-bash-3.00# rmdev -l fscsi0 -R fscsi0 Defined
- Run the chdev -l fscsiX -a dyntrk=yes and chdev -l fscsiX -a fc_err_recov=fast_fail commands to modify the attributes of all fscsi devices connected to Huawei storage.
-bash-3.00# chdev -l fscsi0 -a dyntrk=yes fscsi0 changed -bash-3.00# chdev -l fscsi0 -a fc_err_recov=fast_fail fscsi0 changed
- Run the cfgmgr -l fscsiX command to reconfigure all fscsi devices connected to Huawei storage.
-bash-3.00# cfgmgr -l fscsi0 -bash-3.00#
Method 3
If each virtual disk attached by Huawei storage is connected to multiple fscsi devices, use method 3 (no virtual disks need to be deleted). If there is only one fscsi device connected to each virtual disk, use method 1 or 2.
- Run the lspath command to confirm the fscsi devices in use. In the following figure, hdisk1 and hdisk2 are virtual disks attached by Huawei storage, which are connected to fscsi0 and fscsi1.
-bash-3.00# lspath Enabled hdisk0 scsi0 Enabled hdisk1 fscsi0 Enabled hdisk2 fscsi0 Enabled hdisk1 fscsi0 Enabled hdisk2 fscsi0 Enabled hdisk1 fscsi1 Enabled hdisk2 fscsi1 Enabled hdisk1 fscsi1 Enabled hdisk2 fscsi1
The preceding command output indicates that hdisk1 and hdisk2 are virtual disks attached by Huawei storage through fscsi0 and fscsi1.
- Run the rmdev -l fscsi0 -R command to set the state of fscsi0 to Defined.
-bash-3.00# rmdev -l fscsi0 -R fscsi0 Defined
- Run the chdev -l fscsi0 -a dyntrk=yes and chdev -l fscsi0 -a fc_err_recov=fast_fail commands to modify the attributes of fscsi0.
-bash-3.00# chdev -l fscsi0 -a dyntrk=yes fscsi0 changed -bash-3.00# chdev -l fscsi0 -a fc_err_recov=fast_fail fscsi0 changed
- Run the cfgmgr -l fscsi0 command to reconfigure fscsi0.
-bash-3.00# cfgmgr -l fscsi0 -bash-3.00#
- Run the lspath command to ensure that all virtual disk paths are normal.
-bash-3.00# lspath Enabled hdisk0 scsi0 Enabled hdisk1 fscsi0 Enabled hdisk2 fscsi0 Enabled hdisk1 fscsi0 Enabled hdisk2 fscsi0 Enabled hdisk1 fscsi1 Enabled hdisk2 fscsi1 Enabled hdisk1 fscsi1 Enabled hdisk2 fscsi1
- Run the rmdev -l fscsi1 -R command to set the state of fscsi1 to Defined.
-bash-3.00# rmdev -l fscsi1 -R fscsi1 Defined
- Run the chdev -l fscsi1 -a dyntrk=yes and chdev -l fscsi1 -a fc_err_recov=fast_fail commands to modify the attributes of fscsi1.
-bash-3.00# chdev -l fscsi1 -a dyntrk=yes fscsi1 changed -bash-3.00# chdev -l fscsi1 -a fc_err_recov=fast_fail fscsi1 changed
- Run the cfgmgr -l fscsi1 command to reconfigure fscsi1.
-bash-3.00# cfgmgr -l fscsi1 -bash-3.00#
- Run the lspath command to ensure that all virtual disk paths are normal.
-bash-3.00# lspath Enabled hdisk0 scsi0 Enabled hdisk1 fscsi0 Enabled hdisk2 fscsi0 Enabled hdisk1 fscsi0 Enabled hdisk2 fscsi0 Enabled hdisk1 fscsi1 Enabled hdisk2 fscsi1 Enabled hdisk1 fscsi1 Enabled hdisk2 fscsi1