[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Flash Drive suddenly read only?



(I've replied publicly again, as I'm not the only person who may be able
to advise you on this, and I don't see any reason for this to have been
taken off-list. If your reply being direct instead of via the list was
intentional, then I apologize.)

On 2021-01-31 at 08:28, kaye n wrote:

> On Sun, Jan 31, 2021 at 8:53 PM The Wanderer <wanderer@fastmail.fm>
> wrote:
> 
>> On 2021-01-31 at 07:30, kaye n wrote:

>>> The dbf files seem to be READ WRITE EXECUTE for OWNER, GROUP,
>>> and OTHER
>> 
>> What do the following commands say (substituting in the actual
>> paths to the file and the mount directory of the USB drive)?
>>
>> $ ls -lh /path/to/file.dbf
>>
>> $ mount | grep /path/to/mount/directory

> ls -lh /media/marlon/acval/ACPAY.DBF
> -rwxrwxrwx 1 homet users 0 Jan 19 21:04 /media/marlon/acval/ACPAY.DBF

This shows that the file is read/write in all cases.

> mount | grep /media/marlon
> /dev/sdd1 on /media/marlon type vfat (rw,nosuid,nodev,relatime,uid=1000,gid=100,fmask=0000,dmask=0000,allow_utime=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro,user,x-systemd.device-timeout=5s)

This shows that the partition is mounted rw, which is to say,
read/write. It also shows fmask 0000, which corresponds to and likely
explains the file permissions seen from the other command.

It also shows 'errors=remount-ro', which is expected: that tells the
system that if there are errors involving this mount path, the mount
should be changed from read-write to read-only.

When you ran these commands, was the file being reported as read-only by
your other means of testing?

If not, then these results aren't useful; please reproduce the problem
and try the commands again while the system is in the problematic state.

If so, then we may need to dig deeper.

> dmesg
> It's too long. What should I be looking for?

Anything that:

* Mentions the device name, /dev/sdd1.

* Mentions the mount path, /media/marlon.

* Mentions the filesystem type, FAT / vfat.

* Mentions the word 'remount' (not case-sensitive).

* Has a timestamp which is around the same time as most recent point
when the "read-only" errors started to manifest. (dmesg timestamps tend
to be presented as 'seconds since boot', so reading them may not be the
easiest thing in the world.)

-- 
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man.         -- George Bernard Shaw

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: