I have a problem with an Oracle Cluster Filesystem (ocfs2) attached to a cluster of Ubuntu 20.04 servers. The file system keeps getting mounted as read-only. Unfortunately, I know the cause since the system was rebooted in the middle of a file copy. I'm not surprised there are issues with some of the files but I would even be happy to delete all of these files and re-copy, but the file system keeps getting mounted as read-only.
So far, I've disconnected all servers from this file system. Then, I ran fsck.ocfs2
from one server as follows: sudo time fsck.ocfs2 -P -t -t -f (filesystem)
. Everything was fine, except this part:
...
Pass 1: Checking inodes and blocks
[Scanning inodes 100%]
I/O read disk/cache: 1000MB / 392MB, write: 0MB, rate: 2.10MB/s
Times real: 11m57.073s, user: 4m1.084s, sys: 0m1.030s
Pass 2: Checking directory entries
pass2: Bad magic number in directory block while reading dir block 1439634968
pass2: Bad magic number in directory block while reading dir block 1439634969
pass2: Bad magic number in directory block while reading dir block 1439634970
I/O read disk/cache: 16MB / 2239MB, write: 0MB, rate: 1.48MB/s
Times real: 0m11.971s, user: 0m1.156s, sys: 0m0.041s
Pass 3: Checking directory connectivity
[DIR_DOTDOT] Directory inode 4273782381 is referenced by a dirent in directory 4273782380 but its '..' entry points to inode 0. Fix the '..' entry to reference 4273782380? <y> y
fix_dot_dot: Bad magic number in directory block while iterating through dir inode 4273782380's directory entries.
I/O read disk/cache: 0MB / 1MB, write: 0MB, rate: 0.00MB/s
...
All passes succeeded
Seems I have two separate errors during Pass 2 and Pass 3.
I can repeat this command many times, but the messages do not change. I guess the file system isn't being repaired.
When I mount it, it is mounted as read-write. However, once I do something in the directory with the problem, it switches to read-only.
I used debugfs.ocfs2
to find out what is there (i.e., findpath <4273782381>
) and I can confirm I do not need what's there. I can delete it if I could.
Many of the questions asked by others seem to imply that fsck
(i.e., even the version for ext4
) will repair things automatically if ran multiple times. I'm happy to do something manually to help fsck.ocfs2
along but I don't know what I can do...
Any help would be appreciated! Even suggestions specific for ext4
will help me so that I can search on-line for what equivalent commands I could use for ocfs2
.