SYMBIAN OS SECTION
  -My-Symbian.com-
MAEMO  SECTION
-My-Maemo.com-
MEEGO  SECTION
-My-MeeGo.com-
SOFTWARE STORECONTACT


My-Symbian.com Forums

 
My-Symbian ~ My-Maemo ~ My-MeeGo
Symbian & Linux based Communicator and Smartphone Info Center
The Oldest Symbian Community Website - Since 1999
 
 Watched TopicsWatched Topics   FAQFAQ   SearchSearch   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   RulesRules   Log inLog in 
Lightweight, simplified version of the forumsMobile version
opt fs running out of memory

 
Post new topic   Reply to topic    My-Symbian ~ My-Maemo ~ My-MeeGo Forum Index -> Maemo 5 Fremantle
View previous topic :: View next topic  
Author Message
Casanunda
Site supporter
Site supporter



Joined: 01 Dec 2009

Posts: 434

Thanks received:
52 in 48 posts
Thanks given: 316


Phone: n900, Jolla

PostPosted: Thursday, 27.Dec.2012 14:02    Post subject: opt fs running out of memory   Reply with quote   

Hi!

lately I'm having problems with my n900 running out of memory on the /opt filesystem.
two weeks ago I uninstalled some apps to get some free space back on /opt. after that I had something like 80 MB free.
Now, my phone is becoming slow again, not even able to save a new contacr in my adress book.

Code:
df

shows only 5 MB free on /opt.

I don't know what's eating up my memory - no new apps installed lately, no excessive use of any "big" apps.

can anyone give me a hint how to find out where my free space has gone / which apps use a lot of space in /opt ?

of course i could flash my phone, but I would prefer an easier method... (and i would like to know what's happenig, too...)
Back to top
Michal Jerz
Admin/Founder/Owner
Admin/Founder/Owner



Joined: 01 Sep 1999

Posts: 29354

Thanks received:
1084 in 691 posts
Thanks given: 285

Location: Poland
Phone: Jolla, BB Z10, BB Passport, N950, N900, N8, Nexus 4 (Ubuntu Touch), Lumia 920

PostPosted: Thursday, 27.Dec.2012 21:20    Post subject:   Reply with quote   

I guess the best way is to use Midnight Commander (or other file manager, but IMO mc will show it the most clearly and is the easiest/quickest to operate using the keyboard) and simply browse optfs partition folder by folder and check what's taking so much space. Not a quick or straightforward method but I doubt it can be done quicker than that...
Back to top
Ketilk
Site supporter
Site supporter

Please add your avatar!

Joined: 19 Dec 2011

Posts: 506

Thanks received:
50 in 45 posts
Thanks given: 6


Phone: Jolla, N9 , N900, N97-mini

PostPosted: Thursday, 27.Dec.2012 22:22    Post subject:   Reply with quote   

You can use the du command for checking which directories or files takes the space. I have a lot of linux experience and command line experience, but unfortunately lack maemo experience. I guess this will work. I have assumed busybox compatible commands in case maemo use that instead of GNU coreutils. This syntax should be compatible with both.

Code:
du  /opt



If you want to sort the output with smallest first. (-g for sort means that 100 is sorted after 99. You can replace it with n if you want. I don't know the difference. | means pipe output to new application)
Code:
du /opt | sort -g


If you want to show output in megabytes(-m is megabytes, -k is kilobytes and default)
Code:
du -m /opt | sort -g


If you want to save the output for reading in another application(replace usedspaceinopt with what name you want. If you are in a directory you don't have writable access to, please write path first or change directory to one you have write access. > means redirect output to file)
Code:
du /opt | sort -g > usedspaceinopt


Use pager sorted in reverse order(I am not sure which pager is installed, but I guess more will work. -r means reverse order)
Code:
du /opt -r| sort -g|more


You quit more by typing q and get the next line by pressing enter.

You can also do the same including files.

Code:
du -a /opt


Sorted
Code:
du /opt | sort -g


Sorted in MB
Code:
du -m /opt | sort -g


Sorted and redirected to file
Code:
du -a /opt | sort -g > usedspaceinopt


Sorted in reverse order and piped to more
Code:
du /opt -r| sort -g|more
Back to top
Michal Jerz
Admin/Founder/Owner
Admin/Founder/Owner



Joined: 01 Sep 1999

Posts: 29354

Thanks received:
1084 in 691 posts
Thanks given: 285

Location: Poland
Phone: Jolla, BB Z10, BB Passport, N950, N900, N8, Nexus 4 (Ubuntu Touch), Lumia 920

PostPosted: Thursday, 27.Dec.2012 23:13    Post subject:   Reply with quote   

Maybe also the DiskUsage utility can be of some help.... It probably uses the du command anyway and just shows the output graphically with its GUI, but this way it may be more 'user friendly' to someone who's not too familiar with the X-Terminal and command line based utilities... I haven't used it for ages so I don't remember how detailed output it provides (if it goes through all subfolders or just the ones directly under the root folder), but I guess it's worth checking.
Back to top
Casanunda
Site supporter
Site supporter



Joined: 01 Dec 2009

Posts: 434

Thanks received:
52 in 48 posts
Thanks given: 316


Phone: n900, Jolla

PostPosted: Friday, 28.Dec.2012 01:05    Post subject:   Reply with quote   

thanks for the hints.
ketilk, your commands (combination of "du" with "sort") was very helpful.

I had the partitions wrong in my mind - the 2GB partition is not /opt but /home (with /opt mounted n /home/opt).

Code:
du -ma /home |sort -g

gave me a nice sorted long list of files and directories in /home.
Since a lot of the bigest files are actually in the MyDocs folder which is on another partition mounted under /home/user/MyDocs, I combined the two commands with the "grep" command:

Code:
 du -ma /home |grep -v MyDocs |sort -g


made me realize that the e-mail client "modest" is taking up over 800MB of my /home partition because I set the option to allow "offline imap" feature so I can read my mails even without internet connection...
Back to top
Ketilk
Site supporter
Site supporter

Please add your avatar!

Joined: 19 Dec 2011

Posts: 506

Thanks received:
50 in 45 posts
Thanks given: 6


Phone: Jolla, N9 , N900, N97-mini

PostPosted: Friday, 28.Dec.2012 01:31    Post subject:   Reply with quote   

It's great to be able to help. The power of unix and shell are some of the reasons for why I love linux phones. You can do just about anything with the combination of many relatively simple tools.

You can also combine "du" with the -x argument as that skips files on other file systems. That option is great if you don't want to spend time searching for files on different partitions(or writing grep pipes). If you ever want to check / then it would be very useful. If maemo use busybox for coreutils then you can find it's manual here.
Back to top
Casanunda
Site supporter
Site supporter



Joined: 01 Dec 2009

Posts: 434

Thanks received:
52 in 48 posts
Thanks given: 316


Phone: n900, Jolla

PostPosted: Friday, 28.Dec.2012 19:17    Post subject:   Reply with quote   

is there a sensible way to move the data for modest from the /home partition to /MyDocs ?
I actually like the "offline imap" feature...

I know I can move files and create a symlink, but since /MyDocs is partitioned as Fat32, there is no support for ownership and access rights.
reformatting the internal memory seems a bit too big of a step to me...
Back to top
Ketilk
Site supporter
Site supporter

Please add your avatar!

Joined: 19 Dec 2011

Posts: 506

Thanks received:
50 in 45 posts
Thanks given: 6


Phone: Jolla, N9 , N900, N97-mini

PostPosted: Friday, 28.Dec.2012 20:36    Post subject:   Reply with quote   

Maemo have installable root access. This method does not really make it any more secure than the file on the fat partition. The applications using the mountpoint will think it's a real linux-filesystem and inside the file it will support octal permissions or optionally acl even though the file itself is bound by vfat's permissions. If might look into encryption for more secure setup, but we will see.

Make an empty file 1024MB big named filesystem1 in your current directory. bs=1024 means that it will write 1kb at a time. count=1048576=1024*1024. Feel free to replace the bs and/or the count to your liking. The total size of the file in bytes is the bs-number times the count number. Feel free to replace of= to your liking. This is the file you are making your filesystem in. Please do this and the next steps as user until I say you need root. It's too easy to do something harmful if there is one space too much in the wrong place. Your phone will be very slow while it writes the data.
Code:

dd if=/dev/zero of=./filesystem1 bs=1024 count=1048576


Make a filesystem on the newly created file. Ext2 is non-journaled and ext3 and ext4 are journaled. In PR1.3 ext2 and ext3 are reasonable choices. Ext4 and Ext4dev are probably too unstable in kernel version 2.6.28. Ext4dev is probably for compability reasons and should not be used for new filesystems. Anything but ext3 seems to need "-t ext2" or "-t ext4" for the mount command.
Code:

/sbin/mkfs.ext3 filesystem1

Make a mountpoint for the filesystem if it doesn't exist. I have assumed /home
Code:

mkdir /home/user/filesystem1


Mount the filesystem in the directory you made(as root. Beware that that command is insecure. I think I will disable passwordless packagemanagement because of that.).
Code:

mount filesystem1 /home/user/filesystem1




For mounting as a user you will need some sudo rules. I can explain that if you want, but this fstab line could provide automatically mounting, but I don't know. It still needs root access.
Code:

/home/user/MyDocs/filesystem1 /home/user/filesystem1 ext3 defaults 0 0
Back to top
Ketilk
Site supporter
Site supporter

Please add your avatar!

Joined: 19 Dec 2011

Posts: 506

Thanks received:
50 in 45 posts
Thanks given: 6


Phone: Jolla, N9 , N900, N97-mini

PostPosted: Saturday, 29.Dec.2012 17:52    Post subject:   Reply with quote   

I am sorry that this did not work correctly. I believe the old version worked before the mount or fstab command. If you did mkfs.ext2 like I wrote first then you will need to write "-t ext2" after the mount command
Code:
mount -t ext2 filesystem1 /home/user/filesystem1
I also had to clean up some unsupported commands in fstab. I changed ext2 to ext3 in my code because of that. You can skip the dd-step if you have already done that and just mkfs again, or just use my new mount code. You also need to rework the fstab entry either with ext2 or ext3.

Ext3 is journaled and is more secure in case of a crash or unclean unmount. Ext2 is more lightweight.

I have checked the commands on my new (used) N900 now.
Back to top
Casanunda
Site supporter
Site supporter



Joined: 01 Dec 2009

Posts: 434

Thanks received:
52 in 48 posts
Thanks given: 316


Phone: n900, Jolla

PostPosted: Sunday, 30.Dec.2012 10:38    Post subject:   Reply with quote   

Great, thanks a lot for the help.
I will try later...
Back to top
Display posts from previous:   
Post new topic   Reply to topic    My-Symbian ~ My-Maemo ~ My-MeeGo Forum Index -> Maemo 5 Fremantle All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
View previous topic :: View next topic

Similar Topics on this forum
Topic Author Forum Replies Posted
No new posts Not enough Memory to Open Application v-9anuch Maemo 5 Fremantle 1 Saturday, 28.Apr.2012 16:50 View latest post
No new posts internal memory not accessible lforu2 Maemo 5 Fremantle 2 Tuesday, 26.Apr.2011 04:38 View latest post
No new posts Maemo 5 running on Nokia E7 Woj2007 Maemo 5 Fremantle 3 Friday, 01.Apr.2011 21:35 View latest post
No new posts Memory card not recognized ! nok9300i Maemo 5 Fremantle 1 Wednesday, 22.Dec.2010 16:28 View latest post
No new posts Not enough space in app.install memory roferofe Maemo 5 Fremantle 30 Friday, 09.Jul.2010 10:57 View latest post
No new posts Email running slow Dr. Nitun Maemo 5 Fremantle 19 Thursday, 08.Jul.2010 03:02 View latest post

Posting/discussing/exchanging warez/cracks/serial numbers/links to web sites offering such resources and/or any other illegal content
is FORBIDDEN on this forum and results in an immediate BAN.


Symbian and all Symbian-based marks and logos are trade marks of Symbian Software Limited.
This website is not in any way endorsed or supported by Symbian Software Limited.    (C) 2001 My-Symbian.com All Rights Reserved