Reply
Thread Tools
suitti's Avatar
Posts: 96 | Thanked: 7 times | Joined on Sep 2007
#1
My N800 has a 2 GB SD and a 128 MB mini-SD. I wasn't using the 128 for anything, so i installed the ext2 progs app and formatted it with ext3. I want as much space as i can get, so i ask for:

no reserved space for root (-m 0)
smallest blocks (-b 1024)

I ask for journaling, which consumes some space but makes the file system recoverable from a variety of errors. This makes the file system ext3. (-j)

Become root:

On the N800, put the target in the external drive and say:
mke2fs -b 1024 -j -m 0 -L extra /dev/mmcblk1p1

Unfortunately, the busybox 'df' doesn't report inodes (number of files). And mke2fs's default number of inodes is probably double what you need or more. You need an inode per file, so not having enough means you can't create more files. Running out is bad. However, even unused inodes take up space. So too many inodes is bad.

Anyway, the card was recognized by OS2008 immediately. (I didn't have to edit /etc/fstab). And, it lets me execute apps from it (which FAT and VFAT won't do). My Linux (Ubuntu Fiesty Fawn) box mounts it as ext3 automatically. I have to use 'sudo' on the linux box to copy files to it. I may make a 'user' account (uid = 29999, with gid 29999) on the desktop box that would likely do the right thing without fuss.

Since things can be executed on it, i should be able to move stuff from the internal card to it, leaving a symbolic link behind from the root filesystem. That should let me install more total stuff than would otherwise fit on the internal card alone.

People on this forum talk about booting from mmc or one of the SD cards to get what i want. It doesn't look as if it's needed.

Anyway, since i only run Linux on my desktops, this really rocks for me.

BTW, under OS2006 on my 770, this didn't work. I never had root, so i wasn't able to edit /etc/fstab to find out if that would work.
 
Posts: 3,841 | Thanked: 1,079 times | Joined on Nov 2006
#2
Originally Posted by suitti View Post
mke2fs -b 1024 -j -m 0 -L extra /dev/mmcblk1p1

Unfortunately, the busybox 'df' doesn't report inodes (number of files). And mke2fs's default number of inodes is probably double what you need or more. You need an inode per file, so not having enough means you can't create more files. Running out is bad. However, even unused inodes take up space. So too many inodes is bad.
Take a guess at what your average file size will be, and specify that as the bytes-per-inode value. E.g. if you plan to store a lot of files where most of them are, say, 32 kilobytes, then it would make sense to use 32k as bytes-per-inode value, i.e.
mke2fs -b 1024 -i 32768 -j -m 0 -L extra /dev/mmcblk1p1
The default is probably 4k (in any case it shouldn't be smaller than the block size).
__________________
N800/OS2007|N900/Maemo5
-- Metalayer-crawler delenda est.
-- Current state: Fed up with everything MeeGo.
 
free's Avatar
Posts: 739 | Thanked: 159 times | Joined on Sep 2007 @ Germany - Munich
#3
Maybe for more info you can use "di" (it's available in my repo)

di -f "m i"
will display "mountpoint number_of_inodes"

Using -m 0 might create performance penalty on full device..
 
Posts: 64 | Thanked: 7 times | Joined on Oct 2007
#4
In the Fedora linux list, we had a long thread about ext3 on Sd cards. Consensus was that it is bad to do this because it will use up the finite number of writes on the card. They recommend VFAT because it does not make as many separate writes when files are accessed. ext2 is expensive because it tracks so many attributes,especially atime.. ext3 is more costly because of journaling.

In this list, I've not seen much discussion on this, but plenty of people write 'my SD card died.' Maybe that's just a coincidence

PJ
 

The Following 2 Users Say Thank You to pauljohn32 For This Useful Post:
free's Avatar
Posts: 739 | Thanked: 159 times | Joined on Sep 2007 @ Germany - Munich
#5
I remove atime on ext2 filesystem on my PC. Just do the same on the IT?

While FAT is adapted for very small cpu systems, there are a lot of limitations..
->Max File size
->No links (hard/soft) <-- painful for people here who port stuffs
->No security wrt to User Rights. Also no posix file permissions.
->Case insensitive
->No recovery mechanism
->Obscure patent
->Strange naming convention
->Character encoding

I agree about journaling impact..

Last edited by free; 2008-02-20 at 16:28.
 
Benson's Avatar
Posts: 4,930 | Thanked: 2,272 times | Joined on Oct 2007
#6
Originally Posted by pauljohn32 View Post
In the Fedora linux list, we had a long thread about ext3 on Sd cards. Consensus was that it is bad to do this because it will use up the finite number of writes on the card. They recommend VFAT because it does not make as many separate writes when files are accessed. ext2 is expensive because it tracks so many attributes,especially atime.. ext3 is more costly because of journaling.

In this list, I've not seen much discussion on this, but plenty of people write 'my SD card died.' Maybe that's just a coincidence

PJ
There's a "noatime" or similar mount option for e2fs, using that reduces the write load substantially. I agree regarding journalling FSs, probably not a good idea, unless you do some math on how often you want to replace your SD first.

Oops, too slow!

Last edited by Benson; 2008-02-20 at 16:28. Reason: Slow typing
 
free's Avatar
Posts: 739 | Thanked: 159 times | Joined on Sep 2007 @ Germany - Munich
#7
By the way, I've ported some recent ext2fs stuffs in my repo when I was having fun with partition encryption

e2fsck-static 1.40.3-1
e2fslibs 1.40.3-1
e2fsprogs 1.40.3-1
libblkid1 1.40.3-1
libss2 1.40.3-1
libuuid1 1.40.3-1

Just realized I forgot the -dev packages for the developpers hanging here
 
Posts: 2,152 | Thanked: 1,490 times | Joined on Jan 2006 @ Czech Republic
#8
Originally Posted by pauljohn32 View Post
In this list, I've not seen much discussion on this, but plenty of people write 'my SD card died.' Maybe that's just a coincidence
This was brought up few times. I'm lazy to write it again
http://www.internettablettalk.com/fo...1347#post81347
http://www.internettablettalk.com/fo...4708#post34708
http://www.internettablettalk.com/fo...5832#post25832
These are just my opinions.

I've been using ext3 since day one (ok maybe two of mmc booting and the (kingston 2gb mmc) card is sill ok after 1 or 2 years of heavy service in 770. I've switched to ext2 on n800/OS2007 and N810/OS2008 since the OS is sufficiently stable and does not reboot. OS2005 and 6 was very panicky and fragile system on 770 so ext3 definitely paid off.
__________________
Newbies click here before posting. Thanks.

If you really need to PM me with troubleshooting question please consider posting it to the forum instead. It is OK to PM me a link to such post then. Thank you.
 

The Following 2 Users Say Thank You to fanoush For This Useful Post:
free's Avatar
Posts: 739 | Thanked: 159 times | Joined on Sep 2007 @ Germany - Munich
#9
I was talking of the CPU usage of the journaling, not the "finite number of write" which is probably more than you can use..
 
suitti's Avatar
Posts: 96 | Thanked: 7 times | Joined on Sep 2007
#10
Over the years, i've done benchmarking on various Linux systems, starting with my 386. I've taken a disk, formatted it, filled it to full with lots of little files, deleted random files here and there, then ran disk throughput benchmarks with the remaining fragmented space. I saw no evidence of slowdown with and without -m 0. I've heard that others have done this work and have indeed measured a slowdown. But i've been running with -m 0 under Linux since very early on without problems. Tossing 5% to the ether has bothered me since Berkeley included it in 4.2 BSD. It's a tax. There's a similar tax for journaling (ext3), but ext3 has saved my data multiple times. Yes, i do backups too.

New Hampshire does not have an income tax. I haven't figured out what services i'd be missing if i lived there. Maybe nothing. The highways seem to be plowed quicker and better than Taxachuesettes.
 
Reply


 
Forum Jump


All times are GMT. The time now is 00:18.