大网数据广告活动
服务器运维问答

remount as read and write

· 52CE 我爱测

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

问题原文

原帖链接 · Magick · CC BY-SA 4.0

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

I tried 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[2002]: 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

e2fsck

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 e2fsck.

tune2fs

I tried 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?

Thanks

已采纳解答

原帖链接 · womble · CC BY-SA 4.0

You need to boot from a rescue system new enough to support the filesystem features you're using. However, given that the filesystem apparently was damaged even though (I assume) you were using a redundancy-providing RAID level, be prepared for the filesystem to be unrecoverable. Time to warm up the backups.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2018-12-28)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。