"Save" not flushing ram to pup_save file on flash card?

Please post any bugs you have found
Post Reply
Message
Author
brucehohl
Posts: 58
Joined: Thu 07 Jun 2007, 11:47
Location: Ohio

"Save" not flushing ram to pup_save file on flash card?

#1 Post by brucehohl »

I am running Puppy from CF. Thanks for any comments on the following.

I have an icon of a USB stick with a red arrow on my desktop. When I click this icon a yellow box appears that says "Request to save is queued ..." then an orange box appears that says "Flushing ram to pup_save file".
Is this the process as when Puppy Linux is shutdown?

I have seen the orange box with "Flushing ram to pup_save file" pop up during use of Puppy without clicking the icon. Is this process scheduled to run periodically?

valpy
Posts: 67
Joined: Wed 18 Apr 2007, 20:38
Location: Looking at the tapestry

#2 Post by valpy »

Yes, in 2.16 it's supposed to happen every 30 minutes.

I think there was a bug in the save daemon, making it flush every 5 mins - if you search the forums you will find the fix that Barry Kauler made available - it's just a case of replacing one file.

valpy
Posts: 67
Joined: Wed 18 Apr 2007, 20:38
Location: Looking at the tapestry

#3 Post by valpy »

Found it - the file is /usr/sbin/savepuppyd

see this topic

http://www.murga-linux.com/puppy/viewto ... 39&t=18315

brucehohl
Posts: 58
Joined: Thu 07 Jun 2007, 11:47
Location: Ohio

#4 Post by brucehohl »

valpy thanks for the replies. On my install it does appear that "flush ram to pup_save file" occurs every 30 minutes. I'm using 2.16. And, when the "usb/red arrow" icon is clicked Puppy also does "flush ram to pup_save file".

Questions:
Just as Bert asked on the linked post: "Does this flushing really write to the usb-key? I am asking this, because there seems to be no activity in the USB-key, while the flushing happens. "

Hence, it appears that in order to save change to usb I have to actually shutdown Puppy. Is this correct?

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#5 Post by Flash »

brucehohl wrote:... there seems to be no activity in the USB-key, while the flushing happens.

Hence, it appears that in order to save change to usb I have to actually shutdown Puppy. Is this correct?
This subject has come up in the forum before. Since I don't save on a USB flash memory I didn't pay much attention, but I believe that Puppy doesn't necessarily immediately save to the USB key when you click the save arrow. I'm not sure. One way to find out would be to click the save arrow, wait a few seconds to let Puppy finish saving, then simulate a power failure by unplugging the computer. See if what you saved is there when you restart. AFAIK, Linux should handle a power failure without corrupting anything except whatever data might have been in transit at the time, but it would be prudent to back up your save file before trying it anyway. :)

brucehohl
Posts: 58
Joined: Thu 07 Jun 2007, 11:47
Location: Ohio

#6 Post by brucehohl »

Flash, I performed the test you suggested as follows:

1- Booted Puppy
2- Deleted a file "abc.txt" from /root.
3- Used the "usb/red arrow" icon to "flush ram to pup_save file".
4- Waited another 2 minutes to give time for any sync operation.
5- Pressed the power button.
6- Started Puppy again.

Result: Deleted file "abc.txt" was included in /root.

So two two questions remain:

(1) What exactly is the purpose of "flush ram to pup_save file" process.

(2) How can I get Puppy to write to flash all changes I make without shutting down. It would be nice to have both a manual and scheduled (cron job) approach for this.

puppylinuxw
Posts: 67
Joined: Mon 06 Nov 2006, 18:18

#7 Post by puppylinuxw »

I encountered the same behaviour.
In contrast to the 2.16 behaviour a Puppy 2.00 writes immediately to the save file when flushing.

There seems to be another difference too.
If i wrote in Puppy 2.00 to /initrd/mnt/dev_save everything was writen at once on media!
In 2.16 it seems not to be possible anymore to write directly to thumb drive. Even if i mount it with Mut and write to /mnt/sda1 there seems to be no activity when writing on it!

I liked the possibility writing to media directly for some reason:
- possibilty backup singular documents at once on the boot media without flushing everything
- Some files like downloaded mp3 i dont want generally in the pup_save i want them on the thumb drive as they are.

Maybe it could implemented in 2.17 again the possibility writing straightly to the boot USB media as a suggestion.

best regards
Last edited by puppylinuxw on Sat 30 Jun 2007, 11:23, edited 1 time in total.

brucehohl
Posts: 58
Joined: Thu 07 Jun 2007, 11:47
Location: Ohio

#8 Post by brucehohl »

Thanks for confirming this behavior in Puppy 2.16. I don't like this set-up because a reboot is required to save session changes to the pup_save.2fs. This is really not a good arrangement. I planned to keep this computer on all the time, hence, there is no automatic way in 2.16 to have data saved. How do I explain to non technical users that in order to really save your data you must reboot! I hope this is a bug that is fixed in 2.17.

John Doe
Posts: 1681
Joined: Mon 01 Aug 2005, 04:46
Location: Michigan, US

#9 Post by John Doe »

I noticed this also, with pmedia=usbhd or usbflash (no manual flush).

If I boot download wait for the "flush" message and then hold the power down till it shuts and reboot, the file is gone.

I think it's an AUFS bug that we only observed in hindsight. I noticed another bug with it also. Perhaps this is part of the reason Barry mentioned switching back to UFS.

Although I really liked the flush idea, I think AUFS was needed to do that to a certain extent.

gourdo
Posts: 7
Joined: Fri 10 Aug 2007, 20:59

Still a problem with 2.17.1

#10 Post by gourdo »

I am still experiencing this bug with 2.17.1. I also am running from flash, with PMEDIA=ideflash in syslinux.cfg

I've sprinkled some 'echo' lines through savepuppyd to see how far I'm getting... I'm definitely inside the main 'if' loop:

Code: Select all

if [ \( $CNTSPD1 -ge $SLEEPTIME -a ! -f /root/Choices/NO_30min_SAVING \) -o $TMPFREEK -lt 500 -o -f /tmp/snapmergepuppyrequest ];then
It's also running yaf-splash properly, but not sure what's going on with the snapmergepuppy references -- I assume this is where the magic happens. snapmergepuppy could be my problem, but I can't make heads or tails of this file.

Any ideas?

PaulBx1
Posts: 2312
Joined: Sat 17 Jun 2006, 03:11
Location: Wyoming, USA

#11 Post by PaulBx1 »

Try it with 3.00 beta2. I just did and it worked. Both after creating a large file, and again after deleting it. I did not wait any time after the flush message was complete either; just powered it down immediately after that.

However I got the message about the save being queued, and it took 3 minutes for that to proceed.

I think Barry did some fixing in this area for the latest revision.

gourdo
Posts: 7
Joined: Fri 10 Aug 2007, 20:59

#12 Post by gourdo »

I'll give it a shot. Incidentally, I just noticed that /usr/sbin/snapmergepuppy is actually just a soft link to snapmergepuppy-unionfs which has a date of 3-17-2007, so it clearly hasn't been updated in a while. I'll see what 3.00beta2 does.

John Doe
Posts: 1681
Joined: Mon 01 Aug 2005, 04:46
Location: Michigan, US

#13 Post by John Doe »

gourdo wrote:...snapmergepuppy-unionfs which has a date of 3-17-2007, so it clearly hasn't been updated in a while.
this is just a guess but i think we will find that the solution to the problem might be in the latest unionfs upgrade and not the snapmergepuppy script logic.

Post Reply