系统文件系统只读(read-only file system)
linux系统提示只读文件系统,无法创建文件(read-only file system)
解决办法:
1.重启看是否可以修复(很多机器可以),原因吗,就是服务器在开机的时候会自检,可能会自动修复。
2.使用用fsck – y 来修复文件系统
3.如果,在进行修复的时候有的分区会报错,重新启动系统问题仍然存在,查看下分区结构:
[root@localhost client]# more /etc/fstab [root@localhost ~]# more /proc/mounts [root@localhost ~]# mount /dev/sda3 on / type ext3 (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw,gid=5,mode=620) /dev/sda1 on /boot type ext3 (ro) tmpfs on /dev/shm type tmpfs (rw) none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw) sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)查看ro挂载的分区,如果发现有ro,就重新mount
[root@localhost ~]# umount /dev/sda1 [root@localhost ~]# mount /dev/sda1 /boot如果发现有提示“device is busy”,找到是什么进程使得他busy
[root@localhost ~]# fuser -m /boot //将会显示使用这个模块的pid [root@localhost ~]# fuser -mk /boot //将会直接kill那个pid然后重新mount即可
4.直接remount,命令为
[root@localhost ~]# mount -o rw,remount /boot