Sudden RO on external drive

  • So after running my Pi 2 with LE (currently at 9.2.6) for 5 years nearly 24/7 I got the first problem I can't solve on my own.


    I have multiple harddrives added to it using hard drives with active powersupply and/or an active usb hub, this setup is working since the beginning of my pi 2 journey back in 2015 (pre LE time). These drives also change over time, replacement, data exchance, data sync etc etc, usually I disconnect the drive from the Pi for such things. Usually, all my hard drives are NTFS, not ideal for linux but for now it worked fine and is also needed on some other computers here as well

    However, the problem I got:

    ONE of my hard drives (Lithium) is now mounted as read only, 2 days before it was mounted just fine as rw. So I checked this forum looking for answers.

    - there are no errors on the drive itself (fsck is fine, also smart is good with no errors/warnings and chkdsk also found no errors)

    - I can still read the disk just fine, even if accessing it over my network, reading is no problem at all

    - Of course I rebooted the pi....multiple times

    - Power supply is good (no errors on pi as it was replaced just 6 months ago)

    - Also, Lithium changed from sdc1 to sdd1 with the occurance of the problem, but this shouldn't be a problem

    Here are some readings with the most used drives (Hydrogen, Helium, Lithium), 2 other drives (Beryllium and Boron) are being used on a different machine right now, so not available

    blkid

    dmesg

    mount

    The last thing I changed (beside an un/replug of a hard drive) was to update my samba share settings about 2 months ago, more specific I set the lowest smb version to 2 within the menu on the TV as it was still on default values from....years ago. Therefore I thought it was a samba problem, but after having a closer look I saw the read only status on Lithium.

    The most similar topics I could find in this topic were due to failing hard drives. My hard drives (yes, all of them! but especially Lithium) are fine, therefor this can't be the problem. Most recent topic was with a Pi4, yet unsolved? (RPI4 USB NTFS drive mounts as Read-only)

    So far, from my side. Any suggestions or questions?

  • Isn't there a problem when there is a key icon in the partition entry..?

    Is GParted's partition check okay?

    Just checked it again, it is just an indicator that the drive is currently mounted. If I unmount the drive, the key will disappear

    Edit: also found no errors with gparted

    Edited once, last by Evilbolzen: forgot something (June 29, 2021 at 3:42 PM).

  • Sooo, good news everyone.

    For reasons I don't understand... all you have to do is the (automatic) windows ntfs consistency check.....the one that pops into your view and holds you back from work when plugging in a random usb drive. It has to be the automatic one, if you "force run" a consistency check by tools or from the command prompt it will show no errors and prints out the lie that everything is "fine".

    Since I don't wanted to corrupt my filesystem on purpose, the only way I could come up with is to use a filesystem check from a linux machine: ntfsfix

    I spend quite some time finding a way to fix the RO issue as safe as possible, since I don't wanted to risk a data loss. So my solution seems a bit over engineered, however it's the safest way to get the automatic windows consistency check doing it's magic.

    Below you'll find my guide to fix the problem. The problem occured on a second drive (Beryllium) as well, but funny enough I could fix Beryllium just with the first two steps, Lithium however needed all 4 steps.

    How to fix it:

    1st step: On windows machine, open command prompt as admin, enter "chkdsk X: /f" with X as the assigned letter. The /f will force chkdsk when your drive is RO on windows (happens sometimes, not always).

    2nd step: Unmount your drive properly on windows (icon tray and wait until the drive disappear from explorer. Now plug it into your libreelec machine (eg pi) or a linux machine and make sure that your drive is "rw", if so: Hurray, you reached your goal, if not....proceed with step 3

    3rd step: In this case you have to toggle the automatic ntfs consistency check on a windows machine, to do this you'll need a linux based pc (or a pi where apt is available). Unmount your usb drive (not safe removal!) and run "sudo ntfsfix /dev/sdb1" (if sdb1 is the usb drive, check on your individual machine the exact mounting point and replace if necessary!).

    4th step: disconnect your drive from your linux machine and plug it back in into the windows machine, you'll be greated by the "your drive needs to be fixed" which is my nearly 4AM translation for the german "Es liegt ein Problem mit ihrem Datenträger vor" dialog. Let windows fix the drive.

    After you've done this your drive will be RW again, just disconnect your drive properly over the icon tray and you are good to go.

    Greetings and good night