[CentOS] CentOS 5 file system read only issue

Wed Aug 21 14:13:21 UTC 2019
Gianluca Cecchi <gianluca.cecchi at gmail.com>

On Wed, Aug 21, 2019 at 3:35 PM Xinhuan Zheng <xzheng at christianbook.com>
wrote:

> Hello Everyone,
>
> We are using CentOS 5 system for certain application. Those are VM guests
> running in VMware. There is datastore issue occasionally, causing all file
> systems becoming read only file systems.
> - Xinhuan Zheng
>

Orthogonal consideration:
I don't know the version of vSphere you are using and if you are using or
not VMware Tools inside your guests.
But installing VMware tools in vSphere 4 or higher has the effect to change
disk timeout for the guest to 180 seconds, from its default of 30 seconds
(that I think is the same for RH EL/ CentOS 5,6,7)
This may or may not help you in case of short time storage problems.

Eg on a 6.5 infrastructure with an old legacy CentOS 5.9 VM I have
VMware Tools: Running, version:8305 (Unsupported older version)
and inside guest

# service vmware-tools status
vmtoolsd is running
#

# find /sys/class/scsi_generic/*/device/timeout -exec grep -H . '{}' \;
/sys/class/scsi_generic/sg0/device/timeout:180
/sys/class/scsi_generic/sg1/device/timeout:180
#

See also:
this if you have access to Red Hat Customer Portal (disk scsi timeout and
how to set it in  RH EL 5):
https://access.redhat.com/solutions/301963

Similar considerations for RH EL 6 and 7:
https://access.redhat.com/solutions/2470541

This publicly accessible for RHEL 5
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/5/html/Online_Storage_Reconfiguration_Guide/task_controlling-scsi-command-timer-onlining-devices.html

this related to vSphere:
https://kb.vmware.com/s/article/1009465

this for APD (All Paths Down) timeout that defaults to 140 seconds for
block storage
https://kb.vmware.com/s/article/2032934

HIH,
Gianluca