zoukankan      html  css  js  c++  java
  • linux常见故障一:linux 文件系统变只读

    1. 重启系统看是否可以自动修复。

    2. 使用fsck -y /dev/sda1 进行自动修复。(用”-y”选项来执行该命令对硬盘进行检查和修复)
       添加参数:fsck -y -C -t ext3 /dev/sda1 (一般情况下修复完成后,所有文件移动到 lost+found目录,文件名会被改变)
       (-C 显示进度条 -t 指定文件系统类型 -y 默认自动yes修复)

    3. 如果fsck修复完成后,启动系统依然自读。
       查看分区结构:

    [root@localhost ~]# more /etc/fstab
      
    [root@localhost ~]# more /proc/mounts
    
    [root@localhost ~]# mount
    /dev/sda2 on / type ext3 (rw)
    proc on /proc type proc (rw)
    sysfs on /sys type sysfs (rw)
    

    查看ro挂载的分区,如果发现有ro,就重新mount

    umount /dev/sda1
    mount /dev/sda1 /boot
    

    如果发现有提示“device is busy”,找到是什么进程使得他busy

    fuser -m /boot ##将会显示使用这个模块的pid
    fuser -mk /boot ##将会直接kill那个pid
    

    然后重新mount即可。

    4. 直接remount

    [root@localhost ~]# mount -o rw,remount /dev/sda1
  • 相关阅读:
    Python装饰器
    Python常用内建模块
    Python文件的操作
    Python集合的操作
    Python字典的操作
    Python列表元组的操作
    os.path
    Python字符串的操作
    线性回归
    随机森林
  • 原文地址:https://www.cnblogs.com/ginvip/p/6375672.html
Copyright © 2011-2022 走看看