Skip to content


如何快速解决linux只读系统 Read-only file system

io频繁的系统可能经常会出现分区不可写的情况,用fsck修复

1.查看有多少分区入格式
cat /etc/fstab
/dev/VolGroup00/LogVol03 /opt ext3 defaults 1 2

2.在每个分区下测试能否写入
cd /opt
touch x
touch: cannot touch `x’: Read-only file system

3.手动修复/opt分区
fsck前分区要先卸载
umount /opt
遇到系统忙可以使用fuser
fuser -mk /opt

以ext3格式修复
fsck -t ext3 /opt

再重新挂载分区就可以写入了
mount /opt

ps:
不修复直接以读写方式重新挂载分区
mount -o rw,remount /opt

系统重启时会自动执行fsck的操作

建议/var 目录单独分区

Posted in linux 维护优化.

Tagged with , .


No Responses (yet)

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.



Some HTML is OK

or, reply to this post via trackback.