Notifications
Clear all

Deleted files after restart  

Page 1 / 2
  RSS
georgag
(@georgag)
Active Member
Deleted files after restart

I am running PrusaLink and PrusaConnect for my MK3S using a Raspberry Pi Zero W connected directly to the pins on the board. Overall this works, but I am having an issue where uploaded files get deleted after I restart the printer and restart the Raspberry Pi. Is this a bug, a feature, or something I am doing wrong? 

Thanks.

Posted : 16/07/2023 6:40 pm
Hello
(@hello)
Noble Member
RE: Deleted files after restart

@tojik probably your best option go settings on prusalink and download sys log here and also do u have SD card in printer 

Please help me out by downloading a model it's free and easy but really helps me out https://www.printables.com/@Hello_474427/models

Posted : 21/07/2023 10:03 am
Tojik
(@tojik)
Member Moderator
RE: Deleted files after restart

This can happen. The OS caches the files in RAM and writes in bursts. If you reset without shutting down the pi first (no good option from the UI available, sorry) It might just not have written it to the SD yet and the file vanishes. I'll add a manual call, so the file gets written to the internal SD after an upload. Thanks

Posted : 21/07/2023 1:38 pm
georgag
(@georgag)
Active Member
Topic starter answered:
RE: Deleted files after restart

Yes, I do have an SD in the printer. Attached are the logs. Usually, I switch the printer OFF after a print is done. Based on that, there is a lot of time between upload time and power OFF. 

Thanks

Posted : 21/07/2023 2:00 pm
Hello
(@hello)
Noble Member
RE: Deleted files after restart

I've had if the pi turns off while processing or anything like that it can corrupt the files on the pi I've had this before did you enable ssh on the pi 

Please help me out by downloading a model it's free and easy but really helps me out https://www.printables.com/@Hello_474427/models

Posted : 21/07/2023 7:51 pm
georgag
(@georgag)
Active Member
Topic starter answered:
RE: Deleted files after restart

I don't remember if SSH is enabled. I followed the online interactions carefully. Can I check if it's enabled and would that create this issue?  

Posted : 21/07/2023 10:26 pm
Hello
(@hello)
Noble Member
RE: Deleted files after restart

Open up the rpi imager chose the prusalink image then click settings and upload screen shot here

Please help me out by downloading a model it's free and easy but really helps me out https://www.printables.com/@Hello_474427/models

Posted : 21/07/2023 10:36 pm
Hello
(@hello)
Noble Member
RE: Deleted files after restart

@georgag it will help us to find the issue 

Please help me out by downloading a model it's free and easy but really helps me out https://www.printables.com/@Hello_474427/models

Posted : 21/07/2023 11:18 pm
georgag
(@georgag)
Active Member
Topic starter answered:
RE: Deleted files after restart

I can do that, but that will not tell us what my settings are, this is just for a new setup, correct? 

Posted : 23/07/2023 12:31 am
georgag
(@georgag)
Active Member
Topic starter answered:
RE: Deleted files after restart

Here is the screenshot

Posted : 23/07/2023 12:39 am
georgag
(@georgag)
Active Member
Topic starter answered:
RE: Deleted files after restart

What is the trick to attach logs? It seems that .zip files cannot be included as an attachment file. 

Posted : 23/07/2023 12:48 am
Hello
(@hello)
Noble Member
RE: Deleted files after restart

Go chose file under the text box

Please help me out by downloading a model it's free and easy but really helps me out https://www.printables.com/@Hello_474427/models

Posted : 23/07/2023 3:00 am
Hello
(@hello)
Noble Member
RE: Deleted files after restart

That screen shot shows us that ssh is not enabled you might be better off enabling ssh doing a new setup and then see if it does it if it still does it then you can issue a ssh command to shutdown the server that should stop data loss

Please help me out by downloading a model it's free and easy but really helps me out https://www.printables.com/@Hello_474427/models

Posted : 23/07/2023 3:02 am
georgag
(@georgag)
Active Member
Topic starter answered:
RE: Deleted files after restart

OK, I can try that. 

Here are the logs. 

Posted : 23/07/2023 3:32 am
Hello
(@hello)
Noble Member
RE: Deleted files after restart

You are probably going to every tome have to issue a ssh command to the pi

Please help me out by downloading a model it's free and easy but really helps me out https://www.printables.com/@Hello_474427/models

Posted : 23/07/2023 5:15 am
karl-herbert
(@karl-herbert)
Illustrious Member
RE: Deleted files after restart

Before you turn off the printer, you should shut down the pi zero via ssh -> https://www.makeuseof.com/shutdown-raspberry-pi/

wbr,

Karl

Statt zu klagen, dass wir nicht alles haben, was wir wollen, sollten wir lieber dankbar sein, dass wir nicht alles bekommen, was wir verdienen.

Posted : 23/07/2023 4:11 pm
georgag
(@georgag)
Active Member
Topic starter answered:
RE: Deleted files after restart

It seems to me this is a major reason not to install a Pi Zero in the printer and use PrusaLink/Connect. Does everyone using this configuration shut down the Pi first using SSH? 

Posted : 23/07/2023 6:50 pm
karl-herbert
(@karl-herbert)
Illustrious Member
RE: Deleted files after restart

I don't use prusalink myself (octoprint, mainsail, klipper). I just use a menu item to start a bashscript that turns off the printer and then shuts down the pi. The pi is powered by an external power source.

Vice versa, i start the pi with a reset (pi hardreset) button, which then turns on the printer (GPIO controlled relays).

wbr,

Karl

Statt zu klagen, dass wir nicht alles haben, was wir wollen, sollten wir lieber dankbar sein, dass wir nicht alles bekommen, was wir verdienen.

Posted : 23/07/2023 7:15 pm
Hello
(@hello)
Noble Member
RE: Deleted files after restart

Yes I do that's why I was trying to get you to enable ssh

Please help me out by downloading a model it's free and easy but really helps me out https://www.printables.com/@Hello_474427/models

Posted : 23/07/2023 7:24 pm
Tojik
(@tojik)
Member Moderator
RE: Deleted files after restart

Yep, I felt like I could make a solution that would safely shut down the Pi on the printer's cap power, buut, I don't think I will be allowed to pursue that among all the other things that need to be done. It would probably end up super difficult as there is not that much time to do it, I would have to constantly sync everything to the SD shortening its lifespan and even then the zero might not be able to do anything preventing the data loss in the few seconds left after the power switch is switched to the off position. Maybe adding a way to shut down the pi remotely might be a good, straightforward middle ground.

This is all speculation on my part, I'll bring it up tho

Posted : 31/07/2023 9:49 am
Page 1 / 2
Share: