由于errors=remount-ro
底层 NFS 故障导致我的根挂载被重新挂载为只读。我知道没有什么问题需要我担心。如何在不重新启动服务器的情况下将其重新挂载为 rw?
一些测试:
simon@steve:~$ sudo hdparm -r /dev/sda1
/dev/sda1:
readonly = 0 (off)
simon@steve:~$ sudo blockdev --setrw /dev/sda1
simon@steve:~$ sudo blockdev --setrw /dev/sda
simon@steve:~$ sudo hdparm -r /dev/sda1
/dev/sda1:
readonly = 0 (off)
simon@steve:~$ sudo hdparm -r /dev/sda
/dev/sda:
readonly = 0 (off)
simon@steve:~$ sudo mount -o remount,rw /
mount: cannot remount block device /dev/sda1 read-write, is write-protected
答案1
mount -o remount,rw /mountpoint