我有一个带有 LVM 的虚拟机。有时,当执行更新并且系统重新启动时,它会进入只读状态。这是一个问题,因为我每天都会执行备份。不幸的是,对我来说,由于我们的系统管理员休假,我被指派去解决这个问题。我有一个每天备份的快照文件夹,现在是只读的。我运行以下命令:
[root@aetest /]# mount -o remount /snapshots
执行此操作后,什么也没有发生。没有错误、加载或任何表明它有效的迹象。然后我移至快照文件夹并输入以下内容:
[root@aetest /]# touch mytest.dat
我得到这个:
touch: cannot touch "mytest.dat": Read-only file system
我可以尝试什么想法吗?迷失在这里。谢谢!
dmesg | tail
[ 7.148297] virbr0: port 1(virbr0-nic) entered listening state
[ 7.148369] IPv6: ADDRCONF(NETDEV_UP): virbr0: link is not ready
[ 7.228501] virbr0: port 1(virbr0-nic) entered disabled state
[50301439.170135] hrtimer: interrupt took 10774359 ns
[74288100.971099] fuse init (API version 7.22)
[74288166.623204] TCP: lp registered
[83201640.576424] CIFS VFS: Server SNAP2 has not responded in 120 seconds. Reconnecting...
[83201641.343342] CIFS VFS: Server SNAP2 has not responded in 120 seconds. Reconnecting...
[110561538.237685] blk_update_request: I/O error, dev fd0, sector 0
[110561538.261675] blk_update_request: I/O error, dev fd0, sector 0
/etc/fstab 中的内容粘贴在下面。我在这里没有看到任何问题..
/dev/mapper/rhel-root / xfs defaults 1 1
UUID=b45d9891-8384-4f1b-9deb-ee885707fc24 /boot xfs defaults 1 2
/dev/mapper/rhel-swap swap swap defaults 0 0
10.3.193.14:/prod_backups/q_uc4test_snapshots /snapshots nfs ro,defaults 0 0
//SNAP2/UC4BDM /opt/agent_library/finaid/snap2_uc4bdm cifs defaults,credentials=/etc/cifs.d/uc4finaid 0 0
//SNAP2/AdmAcct /opt/agent_library/finaid/snap2_admacct cifs defaults,credentials=/etc/cifs.d/uc4finaid 0 0
[50301439.170135] hrtimer: interrupt took 10774359 ns
[74288100.971099] fuse init (API version 7.22)
[74288166.623204] TCP: lp registered
[83201640.576424] CIFS VFS: Server SNAP2 has not responded in 120 seconds. Reconnecting...
[83201641.343342] CIFS VFS: Server SNAP2 has not responded in 120 seconds. Reconnecting...
[110561538.237685] blk_update_request: I/O error, dev fd0, sector 0
[110561538.261675] blk_update_request: I/O error, dev fd0, sector 0
答案1
对于其他阅读本文并想要更清晰答案的人:
- 是不是文件系统与设备那是只读的。
如果是文件系统,则根据注释:
mount -o remount,rw ${MOUNTPOINT_OR_DEVICE}
如果是设备,那么您需要:
lvchange --permission rw $VG/$LV