read-only file system how to fix remote

Andrew J. Caines A.J.Caines at halplant.com
Thu May 2 19:40:19 UTC 2024


On Thu, May 02, 2024 at 02:07:38PM -0400, Jerry Geis wrote:
> If I have a computer ext4 and ubuntu 22.04.3 with a read only file system
> how do I fix that remotely ???

That will depend on
  1. Which filesystem is mounted read-only,
  2. Why that filesystem is mounted read-only, and
  3. How you access the system when it's not on the network.

The fact that you know a filesystem is mounted read-only strongly
suggests that right now you have access to it over the network, which
gives you some options.

It should do no harm to try simply remounting the filesystem read-write,
eg.
  $ sudo mount -o rw,remount /mount/point

Even if this works, the next step should be investigating the cause of
the read-only mount in the journal and logs. If this investigation
reveals hardware failures or irreparable filesystem damage, then your
first priority is to ensure that all unique important data is saved to
and accessible from elsewhere.

If, as is likely, the filesystem is damaged and cannot be automatically
fixed, then you may be able to fix it with a filesystem check, e.g.

  $ sudo fsck.ext4 -nv /dev/mapper/ubuntu--vg-data
  $ sudo fsck.ext4 -ypv /dev/mapper/ubuntu--vg-data

Be sure you understand the options and potential outcomes of a
filesystem check before starting one and that you need to finish once
started, i.e. not interrupt the process.

Even if you fix the filesystem, the underlying cause likely remains, so
plan accordingly. If you are unable to fix the filesystem and it's a
system filesytem, then you will likely need to be able to access the
console and soon, as the system will likely not keep running safely or
at all for long.

Good luck. Capture what you did, the results and follow up here with
those details.


PS. Your regular updates should have reached 22.04.4 some time ago.

--
-Andrew J. Caines-   Unix Systems Architect   A.J.Caines at halplant.com
  "Machines take me by surprise with great frequency" - Alan Turing






More information about the ubuntu-users mailing list