Active Topics

 



Notices


Reply
Thread Tools
peterleinchen's Avatar
Posts: 4,118 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#21
Hey sup,

standard mount is strong enough.
I am mounting with:
Code:
echo /home/user/MyDocs/.maps.vfat.img /home/user/MyDocs/.maps vfat loop,noauto,nodev,noexec,nosuid,noatime,nodiratime,utf8,uid=29999,shortname=mixed,dmask=000,fmask=0133,rodir 0 0 >> /etc/fstab
mount /home/user/MyDocs/.maps
first line adds loop device to fstab
second line mounts with Maemo standrad mount (busybox enhanced installed. but I think I installed it later and it worked with default bb mount also)

But hey, if your mount2 works too ...


Here is my full automatic start/mount in /etc/event.d/
Code:
description "starting my own mounts and python server for Nokia Maps"

author "peterleinchen"

#start on MOUNTS_OK
start on started ke-recv
stop on starting shutdown

console output

pre-start script

# mmc(s) should be mounted after ke-recv has started, but currently
# started notification seems to be emitted before it's actually ready.
# this is a temporary workaround, we should fix this in ke-recv or c-r
# properly.

#	sleep 4
	sleep 30

end script


script

  echo /home/user/MyDocs/.maps.vfat.img /home/user/MyDocs/.maps vfat loop,noauto,nodev,noexec,nosuid,noatime,nodiratime,utf8,uid=29999,shortname=mixed,dmask=000,fmask=0133,rodir 0 0 >> /etc/fstab
  mount /home/user/MyDocs/.maps

end script
with MyDocs/.maps.vfat.img as the 4GB file and MyDocs/.maps as the mount point.
 

The Following User Says Thank You to peterleinchen For This Useful Post:
Posts: 197 | Thanked: 91 times | Joined on Dec 2010
#22
Originally Posted by peterleinchen View Post
Hey sup,

standard mount is strong enough.
I am mounting with:
Code:
echo /home/user/MyDocs/.maps.vfat.img /home/user/MyDocs/.maps vfat loop,noauto,nodev,noexec,nosuid,noatime,nodiratime,utf8,uid=29999,shortname=mixed,dmask=000,fmask=0133,rodir 0 0 >> /etc/fstab
mount /home/user/MyDocs/.maps
first line adds loop device to fstab
second line mounts with Maemo standrad mount (busybox enhanced installed. but I think I installed it later and it worked with default bb mount also)

But hey, if your mount2 works too ...
Well that strange, I tried echoing fstab too. Maybe that I had uid=user instead of uid=29999, but as you said, mount2 works too. Thanks for replying!
 
Posts: 1,680 | Thanked: 3,685 times | Joined on Jan 2011
#23
Originally Posted by woody14619 View Post
I've been using ModRana for the past year, since Mappero (last I looked) was no longer being maintained. It supports multiple download sources, and can store things in sqlite database format, which is both compressed, and gets around losing chunks of space on every tile based on FS granularity.

Also: Google has become quite a pain when it comes to tile cacheing. If it detects you're doing it (too many too quickly) it cuts you off. Silly, since it means you're probably going to lessen the load on their servers over time, but then they want to control when/where/if tiles update. :P

Thanks for the refresher/tutorial on creating loopback file systems though. I'm sure several people have uses for such things!
You can move your maps to /opt. Just move the folder and bind mount it to ../MyDocs/maps.

All you have to do is add a line to ke-recv to remount it when you disconnect a USB mass storage mode.
__________________
N900: One of God's own prototypes. A high-powered mutant of some kind never even considered for mass production. Too weird to live, and too rare to die.
 
Posts: 25 | Thanked: 5 times | Joined on Jul 2010
#24
Hi,
I was just thinking about reformating /home/user/MyDocs/ partition to ext* because of the tile's size (also because of directory linking, permissions...).
On n900 I have 9.4G of OSM tiles (du -h)
the same on my PC with ext3 takes 1.4G
and apparent size on PC is 1.1G
And my PC has 4096 block size. Interesting.
I did all in the first post on my PC (with 1024 blocks) and the first thing I see is that the empty 4G file reports 3G free space after mount (on PC).
After tile-files copy - du says 1.2G and apparent size is 1.1G.
So - (before copying this 4G file to n900), the main problem is the size 3 out of 4G. This I dont understand. It looks like one block takes 256bytes?
EDIT: 4096 block says 3.8G free.... man page says inode takes 256bytes, you can change with I=128...testing it
EDIT2: test of different block sizes, all with -I 128 inodes:
4096 block : avail 3.9G; size 1.4G apparent 1.1G (0.1G;+~30% waste; tot=~38%)
2048 block : avail 3.7G; size 1.2G apparent 1.1G (9%;+ 16% waste; tot=23.6%)
1024 block : avail 3.5G; size 1.2G apparent 1.1G (15%; +10% waste; tot=23.5%)
For me, the 1024 or 2048 blocks are the same and I simply prefer 2048.
After copy to n900 it seems to work.

Last edited by jaromrax; 2011-12-01 at 15:03.
 
Posts: 197 | Thanked: 91 times | Joined on Dec 2010
#25
Originally Posted by jaromrax View Post
Hi,
I was just thinking about reformating /home/user/MyDocs/ partition to ext* because of the tile's size (also because of directory linking, permissions...).
On n900 I have 9.4G of OSM tiles (du -h)
the same on my PC with ext3 takes 1.4G
and apparent size on PC is 1.1G
And my PC has 4096 block size. Interesting.
I did all in the first post on my PC (with 1024 blocks) and the first thing I see is that the empty 4G file reports 3G free space after mount (on PC).
After tile-files copy - du says 1.2G and apparent size is 1.1G.
So - (before copying this 4G file to n900), the main problem is the size 3 out of 4G. This I dont understand. It looks like one block takes 256bytes?
I assume 1GB is taken by the filesystem - with 1024 block size, you have got four millions of them in the file and they must be stored somehwere (even though it seems strange that you need 250B to store one block, hm:-/).
 
peterleinchen's Avatar
Posts: 4,118 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#26
You see why I came to use vFAT? I did/do not see any advantages here for an ext FS. Just for storing map tiles.

4GB file ~ 4294967296 bytes

Filesystem 1K-blocks Used Available Use% Mounted on
/dev/loop0 4129759 3199535 930225 77% /home/user/MyDocs/.map
so available are:
1k*4129759 ~ 4228873216 bytes
Overhead seems to be only
66094080 bytes ~ 64MB


My disk usage:
du -xsh MyDocs/.maps
3.1G MyDocs/.maps
du -xsh --apparent-size /home/user/MyDocs/.maps
2.9G /home/user/MyDocs/.maps
to be more precise:
du -xs MyDocs/.maps
3199535 MyDocs/.maps ~ 3276323840
bytes
du -xs --apparent-size /home/user/MyDocs/.maps
3008856 /home/user/MyDocs/.maps ~3081068544
bytes
So loss for storing around 3GB map tiles is only about 191MB.


On ext there needs to be stored the inodes and also there is some space reserved for the super-user (man mkfs.ext2):
-m reserved-blocks-percentage
Specify the percentage of the filesystem blocks reserved for the super-user.
This avoids fragmentation, and allows root-owned daemons, such as syslogd(8), to continue to function correctly after non-privileged processes are prevented from writing to the filesystem. The default percentage is 5%.
5% of 4GB is quite much (204MB) space lost on ext (excluding inodes space).

--edit
About blocks and inode size:
1k block size and
-i bytes-per-inode
Specify the bytes/inode ratio. mke2fs creates an inode for every bytes-per-inode
bytes of space on the disk. The larger the bytes-per-inode ratio, the fewer
inodes will be created. This value generally shouldn’t be smaller than the
blocksize of the filesystem, since in that case more inodes would be made than
can ever be used. Be warned that it is not possible to expand the number of
inodes on a filesystem after it is created, so be careful deciding the correct
value for this parameter.
-i 1024 (and, the default, -I 256) will lead to this huge amount (1GB) of inode storage.

Last edited by peterleinchen; 2011-12-02 at 23:56.
 
Posts: 197 | Thanked: 91 times | Joined on Dec 2010
#27
Originally Posted by peterleinchen View Post
You see why I came to use vFAT? I did/do not see any advantages here for an ext FS. Just for storing map tiles.

4GB file ~ 4294967296 bytes

Filesystem 1K-blocks Used Available Use% Mounted on
/dev/loop0 4129759 3199535 930225 77% /home/user/MyDocs/.map
so available are:
1k*4129759 ~ 4228873216 bytes
Overhead seems to be only
66094080 bytes ~ 64MB


My disk usage:
du -xsh MyDocs/.maps
3.1G MyDocs/.maps
du -xsh --apparent-size /home/user/MyDocs/.maps
2.9G /home/user/MyDocs/.maps
to be more precise:
du -xs MyDocs/.maps
3199535 MyDocs/.maps ~ 3276323840
bytes
du -xs --apparent-size /home/user/MyDocs/.maps
3008856 /home/user/MyDocs/.maps ~3081068544
bytes
So loss for storing around 3GB map tiles is only about 191MB.


On ext there needs to be stored the inodes and also there is some space reserved for the super-user (man mkfs.ext2):
-m reserved-blocks-percentage
Specify the percentage of the filesystem blocks reserved for the super-user.
This avoids fragmentation, and allows root-owned daemons, such as syslogd(8), to continue to function correctly after non-privileged processes are prevented from writing to the filesystem. The default percentage is 5%.
5% of 4GB is quite much (204MB) space lost on ext (excluding inodes space).
Yes, I am using it now too with simiral results.
 
Posts: 105 | Thanked: 46 times | Joined on May 2011
#28
Originally Posted by peterleinchen View Post
Hey sup,

standard mount is strong enough.
I am mounting with:
Code:
echo /home/user/MyDocs/.maps.vfat.img /home/user/MyDocs/.maps vfat loop,noauto,nodev,noexec,nosuid,noatime,nodiratime,utf8,uid=29999,shortname=mixed,dmask=000,fmask=0133,rodir 0 0 >> /etc/fstab
mount /home/user/MyDocs/.maps
...
Hm, I tried your script but it doesn't do anything. Could you re-write it so that I can try out in x-term? I'm still a n00b when it comes to Linux
 
peterleinchen's Avatar
Posts: 4,118 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#29
Hey,

which "script" do you refer to?
The two lines you posted above?

Of course you need to be root to be allowed to edit/modify /etc/fstab and also you need to be root for mount/umount.

Install rootsh or sudser from extras-devel, but be aware that these kinds of modifications may brick your device (if you are a noob, as you described yourself ).

If you are already root, then maybe you do not have created the file /home/user/MyDocs/.maps.vfat.img (the vfat storage file) and/or the directory /home/user/MyDocs/.maps (the mount point).
 
Posts: 105 | Thanked: 46 times | Joined on May 2011
#30
Yes, I was referring to that one ... but you fixed it anyways :-)
I deliberately deleted the folder .maps because I thought it would interfere with mounting the image file to that directory.
Btw., how can I see that everything worked and .maps is a mounted file instead of an ordinary folder?

And one other thing: Now that everything probably works as expected I cannot access MyDocs via USB any more. Only my SD card gets mounted on my windows machine :-(
Apart from that I'm very happy that people like you come up with crazy ideas ;-)
 
Reply


 
Forum Jump


All times are GMT. The time now is 11:13.