read-only file system how to fix remote
Jerry Geis
jerry.geis at gmail.com
Thu May 2 19:56:01 UTC 2024
On Thu, May 2, 2024 at 3:42 PM Andrew J. Caines via ubuntu-users <
ubuntu-users at lists.ubuntu.com> wrote:
> 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
>
>
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Thanks I tried this
mount -o rw,remount /
mount: /: cannot remount /dev/sda2 read-write, is write-protected.
there is no hardware issue - it was simply read-only due to power outage I
presume.
Everything was installed on just /
Its the read only files system
df -h
Filesystem Size Used Avail Use% Mounted on
udev 1.7G 0 1.7G 0% /dev
tmpfs 350M 1.6M 348M 1% /run
/dev/sda2 109G 28G 77G 27% /
tmpfs 1.8G 20M 1.7G 2% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 1.8G 0 1.8G 0% /sys/fs/cgroup
/dev/sda1 511M 6.1M 505M 2% /boot/efi
/dev/loop0 56M 56M 0 100% /snap/core18/2796
/dev/loop1 56M 56M 0 100% /snap/core18/2812
/dev/loop3 64M 64M 0 100% /snap/core20/2105
/dev/loop5 92M 92M 0 100% /snap/lxd/24061
/dev/loop6 92M 92M 0 100% /snap/lxd/23991
/dev/loop7 41M 41M 0 100% /snap/snapd/20671
tmpfs 350M 28K 350M 1% /run/user/1000
/dev/loop8 64M 64M 0 100% /snap/core20/2182
/dev/loop2 40M 40M 0 100% /snap/snapd/21184
tmpfs 350M 0 350M 0% /run/user/0
Thanks
Jerry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20240502/561993cb/attachment.html>
More information about the ubuntu-users
mailing list