Operating System - Linux
1824293 Members
4949 Online
109669 Solutions
New Discussion юеВ

Read-only file system Error

 
SOLVED
Go to solution
Pramod M
Regular Advisor

Read-only file system Error

Hi,
I am getting a read-only filesystem error on /opt. But some times it will be writable after a reboot.
I got the following error log while a DP agent installation.
[root@pwbsrmpm01a tmp]# more da-rpm.log
error: package OB2-DA is not installed
Preparing... ##################################################
OB2-DA ##################################################
error: unpacking of archive failed on file /opt: cpio: chown failed - Inappropri
ate ioctl for device
[root@pwbsrmpm01a tmp]# more cc-rpm.log
error: package OB2-CC is not installed
Preparing... ##################################################
OB2-CC ##################################################
error: unpacking of archive failed on file /opt: cpio: chown failed - Inappropri
ate ioctl for device

# df -h
/dev/mapper/vg00-lvol02
50G 283M 47G 1% /opt

There no more hints related to this in /var/log/messages.
Any help will be apreciated.

Thanks
Pramod
4 REPLIES 4
Patrick Wallek
Honored Contributor

Re: Read-only file system Error

Is the file system mounted rw or ro? What does the ouput of 'mount' show with regards to the /opt filesystem?

Steven1970
Occasional Advisor

Re: Read-only file system Error

As well as checking the mount options of the file system, I would also be inclined to unmount the /opt file system and run a full fsck.

The times I have seen file systems flip to readonly after a successful boot is when the file system has issues, but isn't picked up on boot. When the kernel hits the bad part of the file system it flips it read only to protect the data on there.
Matti_Kurkela
Honored Contributor
Solution

Re: Read-only file system Error

And if the filesystem has flipped from rw to ro in mid-use, the "mount" command will not always display the "ro" mount option, because it gets its data from /etc/mtab.

The /etc/mtab file is updated only when the "mount" command is used to mount or unmount filesystems: if the kernel changes the state of a filesystem because of a disk error, it won't be reflected in /etc/mtab.

Only /proc/mounts will display current information in this case, because all the information in /proc filesystem is dynamically generated by the kernel whenever it's requested, so it will always be up to date.

To find read-only filesystems, please run:

grep "ro," /proc/mounts

(The comma is important for avoiding false detections.)

MK
MK
Qcheck
Super Advisor

Re: Read-only file system Error

Recently we went through the same issue. Ended up to be a bad disk. Reboot is clearing the issue but again will eventually ends up to be a read only filesystem on different filesystem. Did you check all your disks?