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。
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda9 during installation
UUID=26c5f098-2160-44a6-8922-68eb754817a7 / ext4 errors=remount-ro 0 1
# /boot was on /dev/sda8 during installation
UUID=cc1e86af-456f-44d3-892a-aa3cdc8e2b42 /boot ext3 defaults 0 2
# swap was on /dev/sda7 during installation
UUID=3cea8f55-ecdc-4384-b257-741482f2ba5c none swap sw 0 0
#workspace
UUID=0E4108860E410886 /media/workspace ntfs-3g default,locale=zh_CN.UTF-8 0 0
#factory
UUID=0E410A3C0E410A3C /media/factory ntfs-3g default,locale=zh_CN.UTF-8 0 0
#for virtualbox's usb devices
#none /sys/bus/usb/drivers usbfs devgid=802,devmode=664 0 0
挂载时增加参数或修改 /etc/fstab
如 mount -o uid=<user id>,gid=<group id>, umask=0013 之类
chmod挂载点。。。