[root@SERVER .ssh]# mount|grep -i " / "
/dev/mapper/rootvg-root_lv on / type ext3 (rw)
[root@SERVER .ssh]# mount -o remount /
mount: block device /dev/rootvg/root_lv is write-protected, mounting read-only
[root@SERVER .ssh]#
如何在不重新启动的情况下使“/”再次可写?
[root@SERVER ~]# lsb_release -a
LSB Version: :core-3.1-amd64:core-3.1-ia32:core-3.1-noarch:graphics-3.1-amd64:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: RedHatEnterpriseServer
Description: Red Hat Enterprise Linux Server release 5.4 (Tikanga)
Release: 5.4
Codename: Tikanga
[root@SERVER ~]#
更新:
[root@SERVER ~]# lvdisplay rootvg/root_lv
Locking type -1 initialisation failed.
[root@SERVER ~]# lvdisplay rootvg/root_lv --ignorelockingfailure
--- Logical volume ---
LV Name /dev/rootvg/root_lv
VG Name rootvg
LV UUID 2Cccd4-oGrx-ssQW-xzK5-MZuA-g4NS-tFDFpd
LV Write Access read/write
LV Status available
# open 1
LV Size 2.00 GB
Current LE 64
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0
[root@SERVER ~]# lvchange -p rw rootvg/root_lv
Locking type -1 initialisation failed.
[root@SERVER ~]#
[root@SERVER ~]# lvchange --ignorelockingfailure -p rw rootvg/root_lv
Only -a permitted with --ignorelockingfailure
Run `lvchange --help' for more information.
[root@SERVER ~]#
我应该使用“-a”功能吗?
答案1
查看lvdisplay rootvg/root_lv
。如果显示 LV 处于只读模式,则需要将其设置为可读写。假设 LV 处于健康状态,这可以通过以下方式完成lvchange -p rw
。
答案2
我认为 mount -o remount,rw /
应该这样做不会起作用,如下面的评论所述。
答案3
有同样的错误,搜索该错误,我找到了一个答案,该答案说我们应该以单用户模式重新启动并在有问题的磁盘上运行 fsck。这解决了我们的问题。