Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 18 Apr 2014, 21:42
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
HowTo fix "no space left on device" with Opera
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [16 Posts]   Goto page: 1, 2 Next
Author Message
MU


Joined: 24 Aug 2005
Posts: 13642
Location: Karlsruhe, Germany

PostPosted: Thu 29 May 2008, 04:34    Post subject:  HowTo fix "no space left on device" with Opera  

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:
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

_________________
my recommended links

Last edited by MU on Thu 29 May 2008, 20:22; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
MU


Joined: 24 Aug 2005
Posts: 13642
Location: Karlsruhe, Germany

PostPosted: Thu 29 May 2008, 09:52    Post subject:  

instead of "rm -rf" I now use:

Code:
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:
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

_________________
my recommended links
Back to top
View user's profile Send private message Visit poster's website 
Dingo


Joined: 11 Dec 2007
Posts: 1411
Location: somewhere at the end of rainbow...

PostPosted: Thu 29 May 2008, 16:42    Post subject:  

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
Back to top
View user's profile Send private message Visit poster's website 
MU


Joined: 24 Aug 2005
Posts: 13642
Location: Karlsruhe, Germany

PostPosted: Thu 29 May 2008, 19:19    Post subject:  

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:
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 Smile
Mark

_________________
my recommended links
Back to top
View user's profile Send private message Visit poster's website 
Dingo


Joined: 11 Dec 2007
Posts: 1411
Location: somewhere at the end of rainbow...

PostPosted: Fri 30 May 2008, 04:38    Post subject:  

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
Back to top
View user's profile Send private message Visit poster's website 
MU


Joined: 24 Aug 2005
Posts: 13642
Location: Karlsruhe, Germany

PostPosted: Fri 30 May 2008, 06:25    Post subject:  

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

_________________
my recommended links
Back to top
View user's profile Send private message Visit poster's website 
floborg


Joined: 25 Oct 2007
Posts: 194
Location: Fort Worth, TX

PostPosted: Sat 31 May 2008, 01:02    Post subject:  

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

Code:

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:

#!/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
Back to top
View user's profile Send private message 
panzerpuppy

Joined: 02 Oct 2007
Posts: 632

PostPosted: Wed 04 Jun 2008, 07:36    Post subject:  

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:
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, 19:57; edited 1 time in total
Back to top
View user's profile Send private message 
MU


Joined: 24 Aug 2005
Posts: 13642
Location: Karlsruhe, Germany

PostPosted: Wed 04 Jun 2008, 08:00    Post subject:  

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.php?t=27407&start=30

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

Mark

_________________
my recommended links
Back to top
View user's profile Send private message Visit poster's website 
panzerpuppy

Joined: 02 Oct 2007
Posts: 632

PostPosted: Wed 04 Jun 2008, 19:51    Post subject:  

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)
Back to top
View user's profile Send private message 
Dingo


Joined: 11 Dec 2007
Posts: 1411
Location: somewhere at the end of rainbow...

PostPosted: Wed 18 Jun 2008, 05:43    Post subject:  

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
Back to top
View user's profile Send private message Visit poster's website 
mdisaster2

Joined: 22 Dec 2006
Posts: 107
Location: Rome, Italy

PostPosted: Wed 18 Jun 2008, 15:58    Post subject: Temporary workaround
Subject description: Just tell Opera not to cache files on disk...
 

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...
Back to top
View user's profile Send private message 
silverojo


Joined: 30 Jul 2006
Posts: 139

PostPosted: Wed 18 Jun 2008, 21:37    Post subject: Re: HowTo fix "no space left on device" with Opera  

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:




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....
Back to top
View user's profile Send private message 
MU


Joined: 24 Aug 2005
Posts: 13642
Location: Karlsruhe, Germany

PostPosted: Wed 18 Jun 2008, 21:42    Post subject:  

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

Mark

_________________
my recommended links
Back to top
View user's profile Send private message Visit poster's website 
silverojo


Joined: 30 Jul 2006
Posts: 139

PostPosted: Fri 20 Jun 2008, 00:35    Post subject:  

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. Smile
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 2 [16 Posts]   Goto page: 1, 2 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
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
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0867s ][ Queries: 11 (0.0050s) ][ GZIP on ]