Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
rpi 4 with usb drive -> suddenly readonly fs
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
blubberbaer
Tux's lil' helper
Tux's lil' helper


Joined: 15 Mar 2016
Posts: 81

PostPosted: Mon Jun 14, 2021 3:17 pm    Post subject: rpi 4 with usb drive -> suddenly readonly fs Reply with quote

Hy Everybody,

during emerge i get this error:

Code:

--- Logging error ---
Exception in callback PipeLogger._io_loop_done(<Task finishe...file system')>)
handle: <Handle PipeLogger._io_loop_done(<Task finishe...file system')>)>
Traceback (most recent call last):
  File "/usr/lib/python3.8/asyncio/events.py", line 81, in _run
  File "/usr/lib/python3.8/site-packages/portage/util/_async/PipeLogger.py", line 141, in _io_loop_done
  File "/usr/lib/python3.8/site-packages/portage/util/_async/PipeLogger.py", line 137, in _io_loop
OSError: [Errno 30] Read-only file system
Terminated
pi4_04 ~ #
pi4_04 ~ #
pi4_04 ~ #
pi4_04 ~ #
pi4_04 ~ # df
bash: df: command not found
pi4_04 ~ # ls
bash: ls: command not found
pi4_04 ~ # dmesg
bash: dmesg: command not found


Out of the sudden, my filesystem becomes a readonly filesystem .... ;-(

it is kind of difficult too debug, cause i can't enter any command.

I've attached an usb-adapter from renkforce with an SSD mounted on it ....

/ is placed on the ssd, boot is done from sd card ....

any clues where to start searching ?


Greetings,

blubberbaer
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3309
Location: Rasi, Finland

PostPosted: Mon Jun 14, 2021 4:19 pm    Post subject: Reply with quote

Try to run the commands with full path.
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54028
Location: 56N 3W

PostPosted: Mon Jun 14, 2021 6:44 pm    Post subject: Reply with quote

blubberbaer,

It looks like something nasty has happened to the filesystem or the drive.
It gone read only due to errors.

Those command not found errors suggest that it may have gone away entirely, or your $PATH has become unset.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
ShorTie
Tux's lil' helper
Tux's lil' helper


Joined: 12 Feb 2006
Posts: 101

PostPosted: Tue Jun 15, 2021 9:00 am    Post subject: Reply with quote

Sorry to say but
Quote:
bash: ls: command not found

Happens to my sdcards right before I throw them away.
Maybe try reformatting the drive on another pc maybe.
Back to top
View user's profile Send private message
Irre
Guru
Guru


Joined: 09 Nov 2013
Posts: 434
Location: Stockholm

PostPosted: Tue Jun 15, 2021 9:04 pm    Post subject: Reply with quote

USB3 works really bad on my rpi4. I connect my fast USB3 Samsung SSD T5 and LaCie d2 Professional only to USB2. There they work fine and fast, but when I try USB3 the system hangs and I had to repair the filesystem (ext4).
uname -a: rpi4-500g-sda1 5.4.45-v8-3b41649ff96d-p4-bis+ #2 SMP PREEMPT Tue Jun 16 14:11:43 GMT 2020 aarch64 GNU/Linux
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3309
Location: Rasi, Finland

PostPosted: Wed Jun 16, 2021 8:48 am    Post subject: That's a flash controller protecting your data Reply with quote

ShorTie wrote:
Happens to my sdcards right before I throw them away.
That's a feature.
When sd card flash controller detects a problem it cannot fix, it goes to ro state.
Zeroing fash based storage with dd for example may cause this if you're not careful.
    I know this from experience. I zeroed one of my USB stick with dd.
    It (probably) overfilled the flash area reserved for normal storage and wrote over the area that is reserved for spare flash cells and/or data for flash controller... and thus made the stick ro (right after it next time needed some data from the portion that I accidentally zeroed).
So at least at the point when a spare cell is needed and there's none left, your flash card will become read only to protect itself and gives you a window of opportunity to still retrieve your data to a safer place.
That's a feature you want. Especially on such flash cards you would use on a digital camera for example.
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
flysideways
Guru
Guru


Joined: 29 Jan 2005
Posts: 409

PostPosted: Wed Jun 16, 2021 5:30 pm    Post subject: Re: rpi 4 with usb drive -> suddenly readonly fs Reply with quote

blubberbaer wrote:
Hy Everybody,

...

I've attached an usb-adapter from renkforce with an SSD mounted on it ....

/ is placed on the ssd, boot is done from sd card ....

...

Greetings,

blubberbaer


You may already know this but for others that find this thread, the Pi 4 can be booted from a usb attached drive with no sd card. The outcomes can vary when using a usb attached ssd or hard drive depending upon the usb adapter used. I have no problem using Samsung T7 drives in the usb3 ports.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54028
Location: 56N 3W

PostPosted: Wed Jun 16, 2021 6:00 pm    Post subject: Reply with quote

Irre,

I've seen that with a firmware upgrade. It was the USB3 power management upgrade that destroyed by USB3 performance.
Downgrading just the USB3 firmware fixed it.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Irre
Guru
Guru


Joined: 09 Nov 2013
Posts: 434
Location: Stockholm

PostPosted: Thu Jun 17, 2021 6:07 pm    Post subject: Reply with quote

NeddySeagoon,
thank you for information on USB3 firmware. :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum