0

I am not able to write on a particular partition. The mysql data directory is hosted on that partition and it suddenly became read-only when mysql crashed on a query.

[root@ESERVER new_dir]# > /data/test.txt
-bash: /data/test.txt: Read-only file system

[root@ESERVER ~]# tail -f /var/log/messages
Jul 15 11:02:29 ETIMPURGE_SERVER kernel: handlers:
Jul 15 11:02:29 ETIMPURGE_SERVER kernel: [<ffffffff813a8150>] (ata_sff_interrupt+0x0/0x110)
Jul 15 11:02:29 ETIMPURGE_SERVER kernel: [<ffffffff813a8150>] (ata_sff_interrupt+0x0/0x110)
Jul 15 11:02:29 ETIMPURGE_SERVER kernel: Disabling IRQ #19
Jul 15 11:02:33 ETIMPURGE_SERVER kernel: sd 2:0:0:0: [sdb] Unhandled error code
Jul 15 11:02:33 ETIMPURGE_SERVER kernel: sd 2:0:0:0: [sdb] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
Jul 15 11:02:33 ETIMPURGE_SERVER kernel: sd 2:0:0:0: [sdb] CDB: Write(10): 2a 00 c9 80 01 3f 00 00 08 00
Jul 15 11:02:33 ETIMPURGE_SERVER kernel: __ratelimit: 129 callbacks suppressed
Jul 15 11:02:33 ETIMPURGE_SERVER kernel: Buffer I/O error on device sdb3, logical block 422576160
Jul 15 11:02:33 ETIMPURGE_SERVER kernel: lost page write due to I/O error on sdb3
Jul 15 11:15:29 ETIMPURGE_SERVER kernel: sd 2:0:0:0: [sdb] Unhandled error code
Jul 15 11:15:29 ETIMPURGE_SERVER kernel: sd 2:0:0:0: [sdb] Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
Jul 15 11:15:29 ETIMPURGE_SERVER kernel: sd 2:0:0:0: [sdb] CDB: Read(10): 28 00 d1 bf c3 ff 00 00 08 00
Jul 15 11:15:29 ETIMPURGE_SERVER kernel: sd 2:0:0:0: [sdb] Unhandled error code

Is is possible that a partition may become read-only due to heavy query?

shantanuo
  • 3,459
  • 8
  • 47
  • 64

2 Answers2

0

The issue is certainly the reverse.

The IO error Buffer I/O error on device sdb3, logical block 422576160 will have caused the file system to be mounted read-only. You will likely see this in /var/log/messages further down.

This is very likely to be due to a degraded disk or a firmware bug.

Joshua Griffiths
  • 2,164
  • 14
  • 19
-2

file system which is booted in read only mode(ro) and user not able to create any file in / directory:--

first check current format of root file system

mount

it will show like /dev/sda1 is mount on / as ro or rw if it is in ro mode we have to run manual fsck command but remember DO NOT RUN THIS COMMAND ON A MOUNTED FILE SYSTEM IT MAY CURRUPT DATA for that boot system in recovery mode or recue mode

fsck /dev/sda1 -y

reboot

mount -o remount,rw /dev/sda1 (To mount file system in rw mode)