Pi Zero W losing files

Posted by j4ck 
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
Now, this forum is in read-only mode. You find details Details hereContinue on /r/PirateBox
Pi Zero W losing files
March 14, 2019 01:49PM
I've searched all over the forums and the web and having found a solution to this problem. If I shut down PB gracefully on a Pi Zero, it retains the files. But if I unplug it, or it loses power and doesn't shut down gracefully, the shared files disappear. I've been trying to figure out the problem for days now.

I'm running build piratebox_rpi_1.1.4-27-02-2018.img and have updated using pacman.

Please help!
Re: Pi Zero W losing files
March 14, 2019 06:41PM
Do the complete files disappear? Are only the just uploaded files gone?

Have a look s_adjustments" rel="nofollow">here (OS Adjustments of piratebox)

Quote:
Quote

(Kernel) vm.dirty_expire_centisecs = 30000 (5 minutes) is default value is '3000' which is 30s. This means a page is written to disk latest after vm.dirty_expire_centisecs. This means that a powered off PirateBox will loose data which is up to 5 Minutes old.
Re: Pi Zero W losing files
March 14, 2019 06:57PM
The files I upload completely disappear. I saw that topic and did test it. I left it up for about 20 minutes and pulled the power. The files I uploaded disappeared. I even looked in /opt/piratebox/share/Shared/ to verify and they were gone. I've only seen this with the Pi Zero. I've installed PB on a Pi 3 and haven't had any problems.

Matthias Wrote:
-------------------------------------------------------
> Do the complete files disappear? Are only the just
> uploaded files gone?
>
> Have a look
> s_adjustments" rel="nofollow">here
> (OS Adjustments of piratebox)

>
> Quote:
>
Quote

> (Kernel) vm.dirty_expire_centisecs = 30000 (5
> minutes) is default value is '3000' which is 30s.
> This means a page is written to disk latest after
> vm.dirty_expire_centisecs. This means that a
> powered off PirateBox will loose data which is up
> to 5 Minutes old.
>
Re: Pi Zero W losing files
March 14, 2019 07:34PM
I stand corrected Matthias. I just tested it again, giving it about 20 minutes, and the files were still there after I pulled the power. I guess the other time I tested it, it was a fluke. Thanks!
Re: Pi Zero W losing files
March 21, 2019 10:02AM
I've experienced the same issue. Sometimes waiting a few minutes worked, other times it didn't. Updating (pacman -Syu) seemed to help.
Re: Pi Zero W losing files
April 16, 2019 01:50PM
Mh, doesn't really makes sense to me.

Are you all using an USB stick as a storage, or does everbody use the SDCard for storing the data?
Re: Pi Zero W losing files
April 18, 2019 07:24AM
Per the Raspberry Pi how to page:

Note: Our RPi images since 1.1.3 contain some customization which should treat the SDCard well. One of the consequences of these changes is, that you should shutdown the RPi properly. The Linux Kernel will write data on the disk on a 5 minute interval during being idle to preserve some SDCard cycles. You can learn more about it on our RapsberryPi Operating System Adjustments page.

Per the OS Adjustments page:

(Kernel) vm.dirty_expire_centisecs = 30000 (5 minutes) is default value is '3000' which is 30s. This means a page is written to disk latest after vm.dirty_expire_centisecs. This means that a powered off PirateBox will loose data which is up to 5 Minutes old.