I use an external luks encrypted usb3 disk to store some common data used by an application that i have installed in various linux machines. Suddenly after fedora 35 upgrade this disk turned to “read-only filesystem” and my application cant work that way. Tried to change permissions with nautilus but system message says that this is a read-only file system and permissions cant be changed. I unplugged the same disk from fedora 35 laptop and use it on another ubuntu laptop. No problem there. Return it back to fedora 35 and “Read only filesystem” message returns.
What happened? this disk worked as expected on fedora 32,33,34
If you want more than general suggestions you should provide enough information for us to truly analyze the issue.
What are the messages you see with dmesg | tail
and with journalctl -b | tail -100
immediately after plugging in the disk? I assume you have unlocked the encryption or it would not be mounted and you would not be able to read the data.
You do not say where the device is mounted, and unless it has a designated mount point in /etc/fstab we have to assume that a removable device is mounted (as is standard with fedora) at /run/media/user/<mountpoint>. Thus to see if the issue is actually permissions or ownership, or something else maybe you could send the output of ls -ld /path/to/mount/point
(with the device attached) so we can actually see the permissions. It may be permissions or it may be something else and we need to see the details to identify the issue.
Also send us the output of mount
& cat /etc/fstab
so we can actually see where the device is mounted and how.
With enough information we can try to solve your issue.
well disk is a removable device mounted at /run/media/user/mountpoint
from journalctl -b | tail -100
Νοε 15 19:52:55 linux-laptop kernel: sdb: sdb1
Νοε 15 19:52:55 linux-laptop kernel: sd 2:0:0:0: [sdb] Attached SCSI disk
Νοε 15 19:52:57 linux-laptop udisksd[1799]: Unlocked device /dev/sdb1 as /dev/dm-4
Νοε 15 19:52:57 linux-laptop kernel: EXT4-fs warning (device dm-4): ext4_clear_journal_err:5704: Filesystem error recorded from previous mount: IO failure
Νοε 15 19:52:57 linux-laptop kernel: EXT4-fs warning (device dm-4): ext4_clear_journal_err:5706: Marking fs in need of filesystem check.
Νοε 15 19:52:57 linux-laptop kernel: EXT4-fs (dm-4): warning: mounting fs with errors, running e2fsck is recommended
Νοε 15 19:52:57 linux-laptop kernel: EXT4-fs (dm-4): recovery complete
Νοε 15 19:52:57 linux-laptop kernel: EXT4-fs (dm-4): mounted filesystem with ordered data mode. Opts: errors=remount-ro. Quota mode: none.
Νοε 15 19:52:57 linux-laptop udisksd[1799]: Mounted /dev/dm-4 at /run/media/nikos/INTENSO on behalf of uid 1000
Νοε 15 19:52:57 linux-laptop systemd[2256]: Started dbus-:1.2-org.gnome.Shell.HotplugSniffer@2.service.
Νοε 15 19:53:02 linux-laptop kernel: EXT4-fs error (device dm-4): ext4_validate_block_bitmap:390: comm ext4lazyinit: bg 625: bad block bitmap checksum
Νοε 15 19:53:02 linux-laptop kernel: Aborting journal on device dm-4-8.
Νοε 15 19:53:02 linux-laptop kernel: EXT4-fs (dm-4): Remounting filesystem read-only
and from dmesg | tail
[22381.229019] sdb: sdb1
[22381.245613] sd 2:0:0:0: [sdb] Attached SCSI disk
[22383.822443] EXT4-fs warning (device dm-4): ext4_clear_journal_err:5704: Filesystem error recorded from previous mount: IO failure
[22383.822446] EXT4-fs warning (device dm-4): ext4_clear_journal_err:5706: Marking fs in need of filesystem check.
[22383.891248] EXT4-fs (dm-4): warning: mounting fs with errors, running e2fsck is recommended
[22383.922933] EXT4-fs (dm-4): recovery complete
[22383.922937] EXT4-fs (dm-4): mounted filesystem with ordered data mode. Opts: errors=remount-ro. Quota mode: none.
[22388.349776] EXT4-fs error (device dm-4): ext4_validate_block_bitmap:390: comm ext4lazyinit: bg 625: bad block bitmap checksum
[22388.349781] Aborting journal on device dm-4-8.
[22388.460266] EXT4-fs (dm-4): Remounting filesystem read-only
ls -ld /path/to/mount/point
drwx------. 4 nikos nikos 4096 Αυγ 30 2020 /run/media/nikos/INTENSO
So i assume that i have to run
e2fsck
things get little complicated because this is an encrypted disk. How to do it? there are 2 devices /dev/sdb1 and /dev/mapper/luks-xxxxxxxx
ok
e2fsck find several problems on /dev/mapper-luks-xxxxxx
after that disk mounted as expected.
Thanks JV for the guidance!
You are quite welcome.
Glad to be of assistance and hope you remember these troubleshooting steps for future use if needed.