HowTo fix "no space left on device" with Opera

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

HowTo fix "no space left on device" with Opera

#1 Post by MU »

Errors like this were reported several times, but I'm too busy, to search the messages.
This is, how I could solve it (hopefully)

If you run Opera for some weeks, your Puppy might react very strange.
Programs don't start, and in the console you get errors like
"no space left on device", though the freememapplet shows a lot of free space.

The problem is:
Opera creates and deletes many files, that remain as .wh files in /initrd.
On the system here, it were more than 3600 of them.
This seems to break unionfs, or ext2 (?).

Solution:
add this line to
/root/.xinitrc
after the line "#!/bin/sh":

Code: Select all

find /initrd/pup_rw/$HOME/.opera -type f -name '.wh.[^dir][a-z]*[A-Z]*[0-9]*' -exec rm -f {} ';'
That seems to fix it.
If you are so far, that you cannot even boot with your savefile:
run Puppy from CD with the option
puppy pfix=ram

Click on your savefile in ROX to mount it.
Delete all .wh. files in
/mnt/MOUNTEDFOLDER/initrd/pup_rw/root/.opera/
Instead of MOUNTEDFOLDER use the name used on your system.
Click on the "eye" symbol, to see hidden files, that begin with a ".".
Then click on your savefile again, to unmount it.
Then type in a console:
e2fsck /mnt/hda1/pup_save.2fs

Instead of hda1 and pup_save.2fs use the names used on your system.

We might have to search for other apps, that create many of these files, and add a clean-up routine.
I think, some former versions already had such a routine in initrd.gz already?

Now away for work, see you...
Mark
Last edited by MU on Fri 30 May 2008, 00:22, edited 1 time in total.
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#2 Post by MU »

instead of "rm -rf" I now use:

Code: Select all

find /initrd/pup_rw/$HOME/.opera -type f -name '.wh.[^dir][a-z]*[A-Z]*[0-9]*' -exec rm -f {} ';'
This will avoid to remove .wh.directory entries.

I also ran this to search for other .wh files in the home-folder:

Code: Select all

find /initrd/pup_rw/$HOME/ -type f -name '.wh.[^opr][a-z]*[A-Z]*[0-9]*'
This shows all except the ones from Opera.
Only very few were found on my system, so I will ignore these, and not search for them.
If you find applications, that show huge results here, please post them.

Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
Dingo
Posts: 1437
Joined: Tue 11 Dec 2007, 17:48
Location: somewhere at the end of rainbow...
Contact:

#3 Post by Dingo »

Now I have looked into my pup_save file. I have seen that also gftp writes many .wh files (I have found about 3.000) in its hidden directory
replace .co.cc with .info to get access to stuff I posted in forum
dropbox 2GB free
OpenOffice for Puppy Linux

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#4 Post by MU »

Ah yes, you're right, thanks.
I remember this from my own system, just forgot about that on the testsystem.

I now use these two lines:

Code: Select all

find /initrd/pup_rw/$HOME/.opera -type f -name '.wh.[^dir][a-z]*[A-Z]*[0-9]*' -exec rm -f {} ';'
find /initrd/pup_rw/$HOME/.gftp -type f -name '.wh.[^dir][a-z]*[A-Z]*[0-9]*' -exec rm -f {} ';'
I added them in the beginning of
/usr/sbin/browsercache (see: http://www.murga-linux.com/puppy/viewtopic.php?t=28420 )
and
/etc/rc.d/rc.shutdown

We will have to observe, how good it works :)
Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
Dingo
Posts: 1437
Joined: Tue 11 Dec 2007, 17:48
Location: somewhere at the end of rainbow...
Contact:

#5 Post by Dingo »

So I put these lines in /etc/rc.d/rc.shutdown and not in /root/.xinitrc ? I saw that, at least the first time, putting these lines in /root/.xinitrc, the server x started after a big delay
replace .co.cc with .info to get access to stuff I posted in forum
dropbox 2GB free
OpenOffice for Puppy Linux

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#6 Post by MU »

You can put them in /root/.xinitrc AND /etc/rc.d/rc.shutdown.

In general, it is not good, to modify something in /initrd.
But to avoid trouble, we must do it.
The best is, to delete the files at shutdown, then when Puppy restarts, it has nothing more to delete.
So usually the instructions in /root/.xinitrc then will delete nothing, only if you did not shut down properly.

The delay you encountered should appear only the first time, as then 3000 files or so are searched and deleted, the junk that remained from the last weeks.
After this initial cleanup, the following ones next time should be much faster.

On my own system, I encounter no further delays, after it ran the first time.

Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
floborg
Posts: 199
Joined: Thu 25 Oct 2007, 12:12
Location: Fort Worth, TX

#7 Post by floborg »

Wouldn't work for me. I used this instead:

Code: Select all

find /initrd/pup_rw/root/.opera -type f -name '.wh.[^dir]*' -exec rm -f {} ';'
I put that in a script I've been using for a while:

Code: Select all

#!/bin/sh
echo "Cleaning up Opera"
cd /root/.opera/cache4
rm *.flv
rm *.swf
rm *.mpg
rm *.mpeg
rm *.avi
rm *.jpg
rm *.jpeg
rm *.png
echo "Cleaning up fake files"
find /initrd/pup_rw/root/.opera -type f -name '.wh.[^dir]*' -exec rm -f {} ';'
Ubuntu 10.10 Maverick
Core 2 Quad 2.4 GHz | 2 GB RAM

panzerpuppy
Posts: 632
Joined: Tue 02 Oct 2007, 07:39

#8 Post by panzerpuppy »

Before I create a script and delete all this junk from my installation,I have a few important questions for you:

- Is it safe to remove everything,for example:

Code: Select all

find /initrd/pup_rw -type f -name '.wh.*' -exec rm -rf {} ';'
as a 'full system cleanup' that is to be done only once and then use the normal cleaning script for opera/gftp/etc.?

- Why is it important to leave the .wh.directory entries?

- What are all those .wh.__dir_opaque files used for? Are they safe to remove as well?

- Is it safe to also do this during a running session (not just at startup or shutdown)?

Note: I did everything listed above on a test savefile and it looks like there are no issues so far,but I just want to be sure before I do the same with my main save file.

List of the worst junk-producing apps:
----------------------------------------------
- Opera (installed): [ /initrd/pup_rw/root/.opera ] 10,000 files !
- Opera (portable,after multiple updates): [ /initrd/pup_rw/root/opera ] ~6,000 files
- KDE sfs: [ /initrd/pup_rw/root/.kde/share/config ] ~2,200 files
- WINE [ /initrd/pup_rw/root/.wine ] ~1,000 files
- OSS4 compiled from source: [ /initrd/pup_rw/usr/lib/oss/build ] ~2,500 files
Last edited by panzerpuppy on Wed 04 Jun 2008, 23:57, edited 1 time in total.

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#9 Post by MU »

no, do NOT delete all .wh files!

They mark files, that were deleted in a merged filesystem.
Puppy is using layers.
The bottom layer is the write-protected pup_301.sfs.
You cannot delete files in it.
So the unionfs-driver adds a .wh file, to mark it as deleted.
The driver then ensures, that outside /initrd/, that file becomes "invisible", so it looks like, that it was deleted.

With Opera and Gftp, it is different.
The folders /root/.opera/ and /root/.gftp/ are not in pup_301.sfs.
So if .wh files appear here, they make no sense.
You do not need to mark "deleted" files in these folders, as they can be deleted physically.
So here it is safe to delete .wh files, but not in other folders, that might be merged with write-protected folders.

These also should be safe, to delete all .wh files:
/initrd/pup_rw/root/.kde/share/config
/initrd/pup_rw/root/opera

Here I am not sure:
/initrd/pup_rw/usr/lib/oss/build
Please search in
/initrd/pup_ro1
to:
/initrd/pup_ro5
if that folder exists there.
If it exists, it is merged, and you should not delete .wh files.
If it does not exist, it should be safe, just as with the others.

Concerning .wh.directory and others:
there are not many, so I leave them untouched.
We would not gain much by deleting them, but would risk, to confuse unionfs.
Every access to /initrd/ is critical, and should be reduced to the absolute necessary minimum.

Another thing:
it seems, that aufs is more reliable than unionfs, see this message:
http://murga-linux.com/puppy/viewtopic. ... 7&start=30

But I did not check yet, if with aufs, my solution here becomes obsolete.

Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

panzerpuppy
Posts: 632
Joined: Tue 02 Oct 2007, 07:39

#10 Post by panzerpuppy »

Thanks for the detailed info,Mark.

usr/lib/oss/build doesn't exist in any of the pup_ro dirs,so I added the dir to the cleanup script.

/root/.wine is another directory that can be added to the 'universal crap cleaning script' (~600 fake files found)

User avatar
Dingo
Posts: 1437
Joined: Tue 11 Dec 2007, 17:48
Location: somewhere at the end of rainbow...
Contact:

#11 Post by Dingo »

MU wrote:You can put them in /root/.xinitrc AND /etc/rc.d/rc.shutdown.
Mark
Very strange!

I have added these lines to /root/.xinitrc/

!/bin/sh
find /initrd/pup_rw/$HOME/.opera -type f -name '.wh.[^dir][a-z]*[A-Z]*[0-9]*' -exec rm -f {} ';'
find /initrd/pup_rw/$HOME/.gftp -type f -name '.wh.[^dir][a-z]*[A-Z]*[0-9]*' -exec rm -f {} ';'
find /initrd/pup_rw/$HOME/.wine -type f -name '.wh.[^dir][a-z]*[A-Z]*[0-9]*' -exec rm -f {} ';'
# $Xorg: xinitrc.cpp,v 1.3 2000/08/17 19:54:30 cpqbld Exp $

but, booting from Cd-Rom in RAM (puppy pfix=ram) and mounting the pup_save to see if other .wh files are into, I have found more than 23.000 .wh files in opera cache!

So, why the scripts are not working? my fault?
replace .co.cc with .info to get access to stuff I posted in forum
dropbox 2GB free
OpenOffice for Puppy Linux

mdisaster2
Posts: 106
Joined: Fri 22 Dec 2006, 08:30
Location: Rome, Italy

Temporary workaround

#12 Post by mdisaster2 »

While the unionfs issue is sorted out it is possible to disable the disk cache of Opera in order to cut down the number of generated files.

This is not a big deal as it seems, because Opera still mantains a memory cache which is much faster and hopefully doesn't give fits to unionfs. Besides, most Opera users set up the disk cache to be deleted on exit, which sorta negates the advantages of a persistent cache anyway.

To disable the disk cache in Opera:
Tools->Preferences->Advanced->History, open the Disk Cache Size dropdown and select "Off".
Untick the "Empty on exit" checkbox, just in case.

Or else I suppose that file-happy programs could have their caches routed to a ram disk or a tmpfs of sorts ? In Opera the cache directories can be set by typing Opera:config in the address bar and typing directory in the search box, or by editing opers6.ini (while Opera is not running!), so assuming there is a ram based file system available the relevant directories (for Opera Cache4 and Temp Downloads) could be made point at it...

User avatar
silverojo
Posts: 155
Joined: Sun 30 Jul 2006, 05:40

Re: HowTo fix "no space left on device" with Opera

#13 Post by silverojo »

MU wrote: The problem is:
Opera creates and deletes many files, that remain as .wh files in /initrd.
On the system here, it were more than 3600 of them.
This seems to break unionfs, or ext2 (?).

Solution:
add this line to
/root/.xinitrc
I'm using Puppy v.2.0, and I can't find that file. The only items I find in the /root folder are:

Image
Image

Where do I find this file that you're referring to? I always use Opera, and I don't want my Puppy to slow down....

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#14 Post by MU »

.xinitrc is on the bottom picture.
"~" means "homefolder", what is /root in Puppy.

Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
silverojo
Posts: 155
Joined: Sun 30 Jul 2006, 05:40

#15 Post by silverojo »

MU wrote:.xinitrc is on the bottom picture.
"~" means "homefolder", what is /root in Puppy.

Mark
Thanks...I thought it was a text file, which is why I overlooked the different icon. Oops....

I'll have to give this a try, but I first want to back up my pup_save file, just in case I mess anything up. :)

User avatar
erikson
Posts: 735
Joined: Wed 27 Feb 2008, 09:22
Location: Ghent, Belgium
Contact:

#16 Post by erikson »

If I understand the problem correctly, Opera cache is accumulating in pup_save.

I had a similar experience with firefox, as discussed in thread Cleaning up needless cache data in pup_save.

My ultimate solution was to tell firefox to put its cache in /tmp - recall that Puppy cleans /tmp at shutdown, and never saves /tmp data into pup_save.

If Opera can be told where to cache, the same method can be applied.
[size=84][i]If it ain't broke, don't fix it.[/i] --- erikson
hp/compaq nx9030 (1.6GHz/480MB/37.2GB), ADSL, Linksys wireless router
[url]http://www.desonville.net/[/url]
Puppy page: [url]http://www.desonville.net/en/joere.puppy.htm[/url][/size]

Post Reply