Need help - USB SSD is mounted read only

  • Hi,

    as I had to increase disk space, I removed the existing USB SSD (formatted as NTFS (speed doesn't matter much)) copied the files on a Windows machine to the new larger one (also NTFS). Of course I disconnected the drives correctly in Windows to avoid open files (I actually shut down the Win machine after copy).

    When I connected the new SSD to the LE, I can see the drive and shares from the Win machine, but I am unable to write to it:

    I can see the USB SSD is mounter RO:

    ~/.config/system.d # mount | grep /dev/sda

    /dev/sda1 on /var/media/hdd type fuseblk (ro,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096)

    All other access to the SD-card for example is rw, so all works, so I wouls assume samba works correct.

    Guess Windows done something to the SSD. I read a post from Chewitt somewhere that it may be that linux consideres the drive as somehow corrupted and thus mounts/flasgs it ro.

    Before I do it, I wanted to get you opinion or experience, if it would help to unmount the SSD and run a fsck. Would this work with a NTFS drive? Would fsck -A /dev/sda1 clear a possible bad flag?

    Thanks in advance

    Edit: Just tested, umounted and ran fsck. Unfortunately didn't help, seemed fsck isn't really running, since -V didn't output anything (only fsck from util-linux 2.33.2). Of course owner is root and 777. Not sure it helps, but I did a dmesg | paste -> http://ix.io/3CJr

    Edited 2 times, last by urmale (October 24, 2021 at 11:47 PM).

  • Before I do it, I wanted to get you opinion or experience

    If you are going to use a SSD internally in a PC(?) and use LibreELEC, it's better (IMO) to format it to Linux' default EXT4 format. You'll have 100% compatibility and none of the NTFS shenanigans.

  • Thanks Klojum, so I guess I really forgot some detail here.

    The SSD is connected to raspberry pi 4 externally via USB.

    Sure ext4 is better, but I am only hosting this box for someone and when I need to create a backup on a windows machine, it's easier to attach it using NTFS.

  • Thank you Chewitt, had the hope that this can somehow been done in LE directly, but I didn't find ntfsfix or similar.

    Was desperately trying, since the little Raspi is roughly 50 km away from me ^^

  • The SSD is connected to raspberry pi 4 externally via USB.

    What counts, the OS running on that connected machine is Linux. Thus, EXT4 would still be my 1st choice.

    Then again, Ubuntu Linux has been my daily driver system for the last 11 years, so I'm a bit biassed... ;)

  • ^^ Fully understand, guess I didn't well consider that Ext4 is the best choice.

    The devil is a bit in the details for me. My server is Windows based (TV Recordings/cards, downloads, video editing, and somehow same time for my job). Windows still has issues to write Ext4 ;(

    Sure, I could have converted the disk to Ext4 remotely, but then would have to send send all of those multimedia content over the 50 kms over a 50 Mbit/s line (omg). That's why I desperately tried to correct it via SSH in first place.

    But I guess I need to go there and either check the disk or indeed convert it and store the data then somehow locally.

    Thanks for advice.

  • but then would have to send send all of those multimedia content over the 50 kms over a 50 Mbit/s line (omg).

    50Mbit isn't that bad if that's the upload speed. Using rsync or zsync would be an option, you could simply start the transfers in the evening and have them ready in the morning.

    There are also Windows tools for doing EXT4 out there. On the other hand, running a Linux Live ISO such as Ubuntu can also be done from a bootable USB stick. With SMB support out of the box in Linux' File Manager, copying files is a breeze. And Kodi also has its own File Manager which supports "all" network protocols.

  • Indeed 50Mbit/s is the uplink and the roughly 250GByte would need about 12 hours to upload, which is somewhat ok, you're right. I would for simplicity use filezilla SFTP, put it into a queue and leave it running.

    Tools for Ext4 do not really exist and WSL2 seems do cause trouble also somehow. I start liking your idea of Ext4, but there is one thing I am not sure yet, maybe you have some advice (as I never tested this before)or experience?

    So far all is setup in LE. Meaning the folders for contents have been setup in LE, like the folder for movies, Music, grabbers, etc. Is it possible to format a flagged drive at all? If so, would LE still work then as before concerning the previous set-up of folders? Would you recommend mkfs.ext4 or parted? All assuming I use the same label which is "hdd".

  • Filezilla should be fine too. Assuming the SSD will be used for storage only, the usual root folders should be created on it, so that Kodi can properly identify the individual sources types: movies, tvshows, tvrecordings, music and whatever is applicable. After that, the RPi4's Kodi sources can be pointed to those news locations, and normal operations can continue.

    I don't know which flags are currently active on the drive, but formatting the SSD should at least overwrite some of them, if not all. I know that a readonly partition can stop the formatting of a drive though. Personally I use Gparted, but in a remote ssh session your options are limited. Just use whatever works and/or is available. The disk label of a EXT4 partition can also be set in the process.