Linux系统挂载存储变成只读的解决方案

Linux系统挂载存储变成只读的解决方案

1、mount:
用于查看哪个模块输入只读,一般显示为:
[root@localhost ~]# mount
/dev/cciss/c0d0p2 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/cciss/c0d0p7 on /home type ext3 (rw)
/dev/cciss/c0d0p6 on /var type ext3 (rw)
/dev/cciss/c0d0p3 on /usr type ext3 (rw)
/dev/cciss/c0d0p1 on /boot type ext3 (rw)
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)
/dev/dm-0 on /home/book/upload/BookFile1 type ext3 (rw)
/dev/dm-1 on /home/book/upload/BookFile2 type ext3 (rw)
/dev/dm-2 on /backup type ext3 (rw)
/dev/dm-3 on /home/book/upload/BookFile3 type ext3 (ro)

2、如果发现有ro,就重新mount,或者umount以后再remount

3、umount /dev/dm-3

如果发现有提示“device is busy”,找到是什么进程使得他busy
fuser -m /mnt/data 将会显示使用这个模块的pid
fuser -mk /mnt/data 将会直接kill那个pid
然后重新mount即可。

4、还有一种方法是直接remount,命令为
mount -o rw,remount /mnt/data 没有用过,看到网络上有这么写。

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/19803.html