Yesterday my CentOS Linux 7 (Core) server experienced a hard disk problem. The HDD has since been replaced but the main partition is in read-only mode.
I'm trying to get the main partition usable again (making it read and write) but am having many issues.
mount as rw
mount -n -o remount,rw / but this resulted in:
mount: / not mounted or bad option In some cases useful info is found in syslog - try dmesg | tail or so
dmesg | tail resulted in:
[ 177.305240] Loading iSCSI transport class v2.0-870. [ 177.419722] NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory [ 177.446940] NFSD: starting 90-second grace period (net ffffffffa32fca00) [ 233.475427] systemd-readahead: Failed to open pack file: Read-only file system [ 267.629924] nfsd4: failed to purge old clients from recovery directory v4recovery [ 428.141830] EXT4-fs (md2): error count since last fsck: 1 [ 428.141889] EXT4-fs (md2): initial error at time 1542775899: ext4_xattr_block_get:298: inode 6947097 [ 428.142014] EXT4-fs (md2): last error at time 1542775899: ext4_xattr_block_get:298: inode 6947097 [ 748.786866] EXT4-fs (md2): Couldn't remount RDWR because of unprocessed orphan inode list. Please umount/remount instead [ 770.787648] EXT4-fs (md2): Couldn't remount RDWR because of unprocessed orphan inode list. Please umount/remount instead
I tried repairing the orphaned inode list using:
e2fsck -f /dev/md2 e2fsck 1.42.9 (28-Dec-2013) /dev/md2 has unsupported feature(s): metadata_csum e2fsck: Get a newer version of e2fsck!
As the filesystem is in read-only mode I'm unable to download a newer version of
tune2fs -O ^metadata_csum /dev/md2 and got:
tune2fs 1.42.9 (28-Dec-2013) tune2fs: Filesystem has unsupported read-only feature(s) while trying to open /dev/md2 Couldn't find valid filesystem superblock.
How can I get this partition to be read and write again?