Reply
Thread Tools
Posts: 9 | Thanked: 6 times | Joined on Oct 2011
#1
Hello,

I'm wondering what's the best way to get rid of the vfat filesystem used on Maemo on N900 for /home/user/MyDocs.

I particularly want to solve the following problems:
1. Small files take up too much space, in particular OpenStreetMap tiles for Mappero (and FoxtrotGPS under Easy Debian) take up 10 times more space than they should.
2. I can't use symlinks.
3. For me vfat filesystems tend to break a lot (though I can't be certain other filesystems are better)
4. The file size is limited to 4 GB (not really significant to me, but nevertheless I might want to transfer some huge files)

There's also another issue: If I plug the phone to someone else's system in mass storage mode they can access all the files, including GPS tracks and possibly mailbox folders (say I move them there). It would be great if the solution could also help with this one, though I'm willing to live with it.

I'd like to be able to retain the ability to access the files from Windows.

Will I be able to change the file system and/or partitioning easy, without too much modifications? I.e. would it be as easy as changing the filesystem and the fstab entry?

So far I've considered the following:
1. Format to ext3, install a DHCP, FTP and/or Samba server that start with PC suite mode.
Sounds like an overkill, and I'm afraid that starting PC suite mode when the phone is connected to someone else's PC might be a grave security issue. Otherwise it does all that I need, and any suggestions on the possible issues would be welcome.

2. Repartition, have a main ext3 partition and a vfat partition for the mass storage
My main issues here are that 1) I don't know if it is possible, 2) partitioning is difficult, i.e. the choice of partition sizes is always an issue, and 3) I'm not familiar with how the USB mass storage mode works, and how easy it would be to change the behaviour. Suggestions on whether it can be done, and possible divisions are welcome.

3. Format as UDF
UDF seems to be the best choice for a partition. It works under all operating systems, appears to be a fine filesystem, I can use files of any sizes – small and big, symlinks work, permissions work. Only downside I can see is that I can't really separate sensitive files from the rest, but I can live with this. Are there any issues with this option at all, or should I just go ahead and try it?

4. Install NTFS-3G and use NTFS
I don't like this as an option, because NTFS is proprietary, NTFS-3G takes too much resources on my desktop (it would be too much for the phone), and still asks you to check it on Windows if there are any errors. But it's been my filesystem of choice for external drives (because Windows XP doesn't see UDF on partitions – it does on whole disks)

5. Leave it as is, create another ext3 image in MyDocs and use it for the maps, etc.
The biggest issue is that I can't use symlinks on vfat, so I have to create many images if I want to use it for more than maps. Also, the solution I found for this is a sloppy (i.e. it waits 40 seconds until everything mounts, and mounts .maps), and I doubt I can think of a better one.

For comparison, 172 MB map tiles take up:
- 221 MB on ext4
- 236 MB on udf
- 1.4 GB on vfat

P.S. I already use Kernel Power.
 
Posts: 84 | Thanked: 76 times | Joined on Aug 2011
#2
There's an article on the wiki that may be useful, especially the part about GParted.
http://wiki.maemo.org/Repartitioning_the_flash

It seems that you're leaning towards the 3rd option. Go ahead and give it a go. Anyway, the 2nd best would be the 2nd option (because the others seem like much of a hassle).

I did some partitioning before with the n900, (actually only shrink /MyDocs and grow /home). Thing went well with GParted. According to the wiki, everything should go fine if the partitions are left in the same order and the created partition is the 4th one.

Last edited by LightRain; 2011-10-30 at 19:27.
 
Posts: 114 | Thanked: 109 times | Joined on Nov 2010 @ Finland
#3
Take a look at this
 
Posts: 9 | Thanked: 6 times | Joined on Oct 2011
#4
Thanks for the replies.

I had to give up on UDF (for now), because tar hangs when it's trying to extract ".sounds/Ringtones/Low.aac" to an UDF filesystem. Ugh.

It appears that my GNU/Linux laptop practically can't write to UDF.

I was expecting a failure much later on... And a more subtle one...
Code:
[  360.652166] tar             D ffff880051635020     0  3570   3121 0x00000000
[  360.652179]  ffff880051635020 0000000000000086 ffffea0000e4daf0 0000000000000001
[  360.652191]  ffff88007ec71590 0000000000012800 ffff8800438fffd8 ffff8800438fffd8
[  360.652201]  0000000000012800 ffff880051635020 0000000000012800 0000000000012800
[  360.652211] Call Trace:
[  360.652230]  [<ffffffff8104064c>] ? select_task_rq_fair+0x38f/0x61b
[  360.652243]  [<ffffffff813369e3>] ? rwsem_down_failed_common+0xda/0x10e
[  360.652256]  [<ffffffff811ac8a3>] ? call_rwsem_down_write_failed+0x13/0x20
[  360.652267]  [<ffffffff8111fca1>] ? bit_spin_lock.clone.13+0x22/0x22
[  360.652278]  [<ffffffff813363aa>] ? down_write+0x25/0x27
[  360.652294]  [<ffffffffa08e82c0>] ? udf_get_block+0x7b/0x112 [udf]
[  360.652304]  [<ffffffff8111f24f>] ? __block_write_full_page+0x110/0x2d7
[  360.652313]  [<ffffffff8111fca1>] ? bit_spin_lock.clone.13+0x22/0x22
[  360.652326]  [<ffffffffa08e8245>] ? udf_block_map+0xb6/0xb6 [udf]
[  360.652339]  [<ffffffffa08e5e8b>] ? udf_expand_file_adinicb+0x152/0x1fb [udf]
[  360.652352]  [<ffffffffa08e4762>] ? udf_file_aio_write+0xab/0x11a [udf]
[  360.652361]  [<ffffffff810fb7eb>] ? do_sync_write+0xb1/0xea
[  360.652374]  [<ffffffff811653e9>] ? security_file_permission+0x18/0x33
[  360.652383]  [<ffffffff810fbe02>] ? vfs_write+0xa6/0xf9
[  360.652391]  [<ffffffff810fbff7>] ? sys_write+0x45/0x6b
[  360.652401]  [<ffffffff8133bd12>] ? system_call_fastpath+0x16/0x1b

Last edited by Warrior; 2011-10-31 at 14:19.
 
Posts: 1,808 | Thanked: 4,272 times | Joined on Feb 2011 @ Germany
#5
Isn't UDF a file system for re-writable CDs?

I cannot imagine UDF being suitable for standard disks, not even for solid state.
 
Posts: 9 | Thanked: 6 times | Joined on Oct 2011
#6
Originally Posted by reinob View Post
Isn't UDF a file system for re-writable CDs?

I cannot imagine UDF being suitable for standard disks, not even for solid state.
It's suitable for packet writing on optical media (both re-writable and write-once!) that require wear-levelling because it is, in essence, a log structured file system which means that the file system is one big journal (which makes it similar to logfs, lfs, nilfs and jffs2, though I probably wouldn't put it on bare flash).

That doesn't mean it's unsuitable for other uses, and I know of no reason not to use it on a hard drive or a flash drive with a flash translation layer. It should be a better choice than VFAT, and I've heard it being cited as better choice than NTFS (which when you have to use NTFS-3G must be true). And it's the only other filesystem that works on all modern operating systems out of the box. Which is why I inquired about any known issues here.

Apparently I stumbled on an unexpected kind of issue though: It's hugely unpopular except for optical media, and nobody is using rewritable optical media any more, so I apparently I stumbled on a rare bug that nobody ever noticed, and there are probably more to come.

That's unfortunate, since from the little research I did, UDF promised to be the best filesystem for any kind of removable storage.

Last edited by Warrior; 2011-10-31 at 15:04.
 

The Following User Says Thank You to Warrior For This Useful Post:
Posts: 16 | Thanked: 3 times | Joined on Feb 2010 @ Edmonton, AB, Canada
#7
How did you manage format the internal MMC (~/MyDocs) into UDF? I cannot find UDF formatting tools that run in N900 and formatting the volume when mounted as "Mass Storage" does not work.

Thanks!
__________________
-- S P Arif Sahari Wibowo

Last edited by arifsaha; 2012-09-01 at 16:12. Reason: clarification
 
pichlo's Avatar
Posts: 6,445 | Thanked: 20,981 times | Joined on Sep 2012 @ UK
#8
I had the same question after installing modRana (a map application). After downloading a few of maps, Windows explorer said size 800 KB, size on disk 4.5 MB. Ouch!

My solution was simple: copy everything to the PC, reformat from Windows using the smallest allocation unit size available, copy everything back.

I kept the format at FAT32 but changed the cluster size from default 64 KB to 8 KB (the smallest Windows let me) and my map overhead dropped from 4.5 MB to 1.2 MB. That's a number I can live with. After copying everything back to the phone, I also noticed that my free space increased from about 5.5 GB before to about 7.5 GB after the reformat.

Needless to say, the N900 can still access the partition happily
 

The Following User Says Thank You to pichlo For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 12:43.