0

I have strange problem.

In a directory on a internal HDD I have started a script and it is running from 10 days right now.

Yesterday the disk went to read-only mode (I don't know why). The script seems to run as previously. I wonder if there will be problem so that script could not write the results to a disk. I suppose I could not remount the disk right now because it would stop the script.

I use Ubuntu 18.04.4 LTS

Best Wishes,

2 Answers 2

0

When the file-system switches to read-only mode it is usually an indication of a severe fault that it could not mitigate. This could be a soft-corruption of some kind on the (presumably ext4?) FS partition or possibly a failing HDD hardware.

You might be able to figure out some details looking at the system logs.
Try the dmesg command or look at /var/log/syslog* etc. files that are the latest.

Now, if the FS that has switched to read-only mode is the root (/) itself, these might not have any updates.

At this time, it would be safer to shutdown the script and consider taking a backup of your system (unless it is a test platform and has no critical data).

3
  • Do you think that my script can write results to this HDD? So that it could have permissions to write to this HDD? Or disk in this state is completely not writeable? Mar 9, 2020 at 15:51
  • No. Once the fs goes read-only nothing can be written. You need to stop the script, do an fsck if the partition and analyze logs to ascertain what kind of fault has developed.
    – nik
    Mar 10, 2020 at 3:11
  • Ok, thanks. I describe what I have done to retrieve my data, maybe it would help someone. The disk was not readable in the installed OS. I burned the system rescue cd on DVD and booted the machine from it. The DVD-booted OS allowed me to copy the data from the malfunctioning disk to the other. Mar 13, 2020 at 9:56
0

I had the same Issue on Ubuntu 20.04 as well. There are some reasons that end up to this problem. My system is dual boot (Windows 10 & Ubuntu 20.04). And whenever i have an incomplete windows shutdown, this problem Happens.

I've seen some Answers that suggested Disabling Fast Startup in Windows 10 but haven't tried it yet. this might solve your problem too.

Here is what i did directly from Ubuntu:

  1. Open Terminal and type the command: sudo lsblk and at the end of the list you'll see Your Disk List known as SDA(If it's HHD). Find the drive you have problem with.(For me it was sda6). You'll see the drive name by their volume column in the list.

    Hint: You can also open Files and select Other Locations in the left column to see the Drives List and their name. (at the right of their name and volume).

2.In Terminal type the command: sudo ntfsfix /dev/sdxX and before hitting the ENTER, change the end xX to the Selected Drive Name. (in my case it was sda6 so the command would be sudo ntfsfix /dev/sda6).

This was the only way that fixed my problem. Hope it works for you too.

NOTE: this way works for HHD dirves and SSD Drives might have a different approach or set of commands. If you have a SSD, use this method AT YOUR OWN RISK

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .