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?

  • 1
    I would sooner expect the reverse, an IO error on the partition caused MySQL to crash... – HBruijn Jul 15 '14 at 6:39
  • 1
    It's most likely the other way around mysql crashed because of the underlying hardware had problems. – user9517 Jul 15 '14 at 6:39
  • Should I restart the server? – shantanuo Jul 15 '14 at 6:47
  • What type of server? Hardware? Storage? Anything interesting in dmesg | tail -200 – ewwhite Jul 15 '14 at 8:02
  • Before doing anything else make sure you have a backup. – user9517 Jul 15 '14 at 8:38
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.

-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)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.