0

I have a VM with an LVM. Occasionally when updates are performed, and the system has restarted it will go into a read-only state. This is an issue because I perform daily backups. Unfortunately, for me, I have been assigned to fix this issue since our sysadmin is on leave. I have a snapshot folder that backs up every day that is now read-only. I run the following command:

[root@aetest /]# mount -o remount /snapshots

After doing this nothing happens. no error, loading, or any indication it worked. I then move over to the snapshot folder and type the following:

[root@aetest /]# touch mytest.dat

and I get this:

touch: cannot touch "mytest.dat": Read-only file system

Any ideas of what I can try? Lost here. thanks!

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

What was located in the /etc/fstab is pasted below. I am not seeing anything wrong here..

/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
5
  • What is the output of mount? What are the contents of /etc/fstab? What if you change the command ro mount -o remount,rw /snapshots? Commented Jul 12, 2021 at 23:37
  • If /etc/fstab contains the ro flag, it is normal that the filesystem is mounted read-only. If not, it might be mounted read-only because of inconsistencies, to prevent further damage to the data. I would check for relevant kernel messages, for example dmesg | tail right after mounting, or journalctl -k -e if systemd is used. I would also run the filesystem checker that is appropriate for the filesystem type, for example xfs_repair or fsck. You should find the filesystem type in /etc/fstab, or run blkid as superuser. Commented Jul 13, 2021 at 1:08
  • I've looked through both of your suggestions but I am not seeing anything other than an I/0 error on snap2. Which I don't use a floppy. I've added the code from fstab and dmesg if you people want to have a look. Commented Jul 13, 2021 at 13:09
  • There is no content that appears when I run mount. Just proceeds to accept another command. Commented Jul 13, 2021 at 13:16
  • looks like C.M. Was correct. mount -o remount, rw /snapshots resolved my issue. Thanks! Commented Jul 13, 2021 at 19:34

1 Answer 1

2

For anybody else reading this and wanting a clearer answer:

  • Is it the filesystem vs the device that is readonly.

If it's the filesystem, then per the comments:

mount -o remount,rw ${MOUNTPOINT_OR_DEVICE}

If it's the device, then you need:

lvchange --permission rw $VG/$LV
1
  • 1
    ....and if its a NFS/CIFS/other network filesystem then you also need write permission at the server. Commented Jun 9, 2023 at 16:30

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.