3

Basically my root (/) ext4 partition keeps being mounted as read-only when I apply internal journaling feature. I understand that this should be default, but today I had been trying to apply external journals to ramdisk for each of my ext4 partitions since I am using an SSD and wanted to obtain maximum performance from it (which journaling impedes: http://raid6.com.au/posts/fs_ext4_external_journal/). I'd gotten myself into a mess when after applying external journals to ramdisk, I rebooted my machine to find that it would no longer boot since the ramdisk's were not persistent and the ext4 partitions were trying to load/apply external journals at ramdisks that no longer existed so I then had to "rescue" the installation with the CentOS 7 Live CD "rescue" feature.

So basically, I can no longer apply the internal journal on my root partition. I have corrected it on my other partitions (which strangely enough only /opt will unmount without being "busy"). IS there a way to fix this? I'd like to have internal journaling on while I properly get round implementing journaling to external ramdisk.

I am trying to turn back on the internal journaling feature of the ext4 partition with:

tune2fs -O has_journal /dev/sda3

But when rebooting, the root partition mounts as read-only, and I cannot unmount it and remount as rw. So I have to turn it off with:

tune2fs -O ^has_journal /dev/sda3

All feedback welcome.

  • 1
    If you're trying to put your journal on a ramdisk, you'd be better off running without a journal at all. A journal's whole purpose is to help the filesystem recover cleanly if it gets interrupted by a power outage or system crash. This won't work if the journal is on a ramdisk. – Jander Jul 19 '15 at 18:23
  • I see. So pointless exercise then. But still, the question remains, how would I fix the read only problem that I am experiencing when re-applying the internal journal? – uncle-junky Jul 19 '15 at 18:53
  • Is there anything in your logs that explains why the root filesystem is being mounted read-only when you enable the journal? – mjturner Jul 20 '15 at 10:45
  • I already checked that from dmesg and checked /var/log/messages. Nothing obvious. – uncle-junky Jul 20 '15 at 13:22
  • From fs_ext4_external_journal_caveats When the journal device is lost: 1) Remove invalid journal: tune2fs -O ^has_journal /dev/ext4-device and run fsck to check/repair file system. 2) Internal journal can be created with the following command: tune2fs -O has_journal /dev/ext4-device – tuk0z May 1 '16 at 20:06

Your Answer

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

Browse other questions tagged or ask your own question.