Bug 214927
Summary: | re-mount read-write (mount -oremount,rw) of read-only filesystem rejected with EROFS, but block device is not read-only | ||
---|---|---|---|
Product: | File System | Reporter: | Ulrich.Windl (Ulrich.Windl) |
Component: | ext3 | Assignee: | fs_ext3 (fs_ext3) |
Status: | NEW --- | ||
Severity: | normal | CC: | tytso |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 4.12.14-122.91-default (SLES12 SP5) | Subsystem: | |
Regression: | No | Bisected commit-id: |
Description
Ulrich.Windl
2021-11-03 09:49:27 UTC
The last error I saw in syslog was: kernel: print_req_error: I/O error, dev xvdb, sector 30704496 kernel: Aborting journal on device dm-4-8. Having a second look, it seems the first error was concurrently with fstrim, so possibly fstrim can play a role in the scenario: kernel: print_req_error: I/O error, dev xvdb, sector 29730024 fstrim[8864]: fstrim: /var: FITRIM ioctl failed: Input/output error fstrim[8864]: fstrim: /tmp: FITRIM ioctl failed: Input/output error ... (the final message was like 13 minutes after those above) In the case when there is a I/O error while trying to write to the journal, there's nothing that can be done safely other than to force the file system to be read-only. When there is a file system which has aborted or otherwise has run into errors, you have to unmount the file system before it is safe to remount it read/write. In fact, the ideal procedure is to umount the file system, run fsck, and then remount the file system. In the case of the root file system, you can't unmount the file system, so it is acceptable to remount it read/only (if that hasn't been done automatically), run fsck, and then reboot. The reason for this because while the file system is mounted, there may be file system corruption which was fixed by fsck, but for which some corruption (for example, a corrupted refcount) is still present in memory. So it is not safe to take a mounted root file system, and modify it using fsck, and then remount it read/write. You have to reboot so it can be freshly mounted on the reboot. |